commit 921b18c14fe34eb4df1f536560b3c4fcac4939cf Author: Fijxu Date: Wed Mar 6 01:16:17 2024 -0300 Add FreeBSD Ports package source diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e543419 --- /dev/null +++ b/Makefile @@ -0,0 +1,173 @@ +PORTNAME= yuzu +PORTVERSION= s20240221 +CATEGORIES= emulators wayland +.if make(makesum) +MASTER_SITES= https://api.yuzu-emu.org/gamedb/?dummy=/:gamedb +.else +MASTER_SITES= LOCAL/jbeich:gamedb +.endif +DISTFILES= ${PORTNAME}-s20230424/compatibility_list.json:gamedb +EXTRACT_ONLY= ${DISTFILES:N*\:gamedb:C/\:.*//} + +MAINTAINER= jbeich@FreeBSD.org +COMMENT= Nintendo Switch emulator/debugger +WWW= https://yuzu-emu.org/ + +LICENSE= APACHE20 BSD3CLAUSE GPLv3+ ISCL MIT UNLICENSE +LICENSE_COMB= multi +LICENSE_FILE_BSD3CLAUSE=${WRKSRC}/externals/sirit/LICENSE.txt +LICENSE_FILE_GPLv3+ = ${WRKSRC}/LICENSE.txt +LICENSE_FILE_ISCL= ${WRKSRC}/externals/cubeb/LICENSE +LICENSE_FILE_MIT= ${WRKSRC}/externals/sirit/externals/SPIRV-Headers/LICENSE + +ONLY_FOR_ARCHS= aarch64 amd64 +ONLY_FOR_ARCHS_REASON= requires int128 and dynarmic backend + +BUILD_DEPENDS= boost-libs>0:devel/boost-libs \ + nlohmann-json>0:devel/nlohmann-json \ + simpleini>0:devel/simpleini \ + xbyak>0:devel/xbyak \ + glslangValidator:graphics/glslang \ + vulkan-headers>0:graphics/vulkan-headers \ + vulkan-utility-libraries>0:graphics/vulkan-utility-libraries +LIB_DEPENDS= liblz4.so:archivers/liblz4 \ + libzstd.so:archivers/zstd \ + libopus.so:audio/opus \ + libfmt.so:devel/libfmt \ + libavcodec.so:multimedia/ffmpeg \ + libenet.so:net/enet +TEST_DEPENDS= catch2>0:devel/catch2 + +FLAVORS= qt5 qt6 +qt5_CONFLICTS_INSTALL= ${PORTNAME}-qt6 +qt6_PKGNAMESUFFIX= -qt6 +qt6_CONFLICTS_INSTALL= ${PORTNAME} +qt6_OPTIONS_SLAVE= QT6 +qt6_OPTIONS_EXCLUDE= QT5 + +USE_GITHUB= yes +GH_ACCOUNT= yuzu-emu +GH_TAGNAME= 8bbc209950 +GH_TUPLE= yuzu-emu:mbedtls:v2.16.9-115-g8c88150ca:mbedtls/externals/mbedtls \ + yuzu-emu:sirit:ab75463:sirit/externals/sirit \ + GPUOpen-LibrariesAndSDKs:VulkanMemoryAllocator:v3.0.1-114-g2f382df:VulkanMemoryAllocator/externals/VulkanMemoryAllocator \ + KhronosGroup:SPIRV-Headers:1.5.4.raytracing.fixed-201-gc214f6f:SPIRV_Headers/externals/sirit/externals/SPIRV-Headers \ + merryhime:dynarmic:6.6.2-15-gba8192d8:dynarmic/externals/dynarmic \ + merryhime:oaknut:2.0.1:oaknut/externals/oaknut \ + arun11299:cpp-jwt:v1.4-18-g10ef573:cpp_jwt/externals/cpp-jwt \ + arsenm:sanitizers-cmake:aab6948:sanitizers_cmake/externals/cubeb/cmake/sanitizers-cmake \ + eggert:tz:2022g-11-g16ce126a:tz/externals/nx_tzdb/tzdb_to_nx/externals/tz/tz \ + kinetiknz:cubeb:cubeb-0.2-1452-g48689ae:cubeb/externals/cubeb \ + lat9nq:tzdb_to_nx:221202-15-g9792969:tzdb_to_nx/externals/nx_tzdb/tzdb_to_nx \ + yhirose:cpp-httplib:v0.14.1:cpp_httplib/externals/cpp-httplib + +USES= cmake:testing elfctl localbase:ldflags pkgconfig sdl ssl +USE_SDL= sdl2 +CMAKE_ON= Boost_USE_STATIC_LIBS +CMAKE_ON+= BUNDLE_SPEEX # only used by cubeb tests +CMAKE_ON+= CMAKE_DISABLE_FIND_PACKAGE_LLVM # only need Demangle but llvm* is huge +CMAKE_OFF= YUZU_CHECK_SUBMODULES YUZU_USE_EXTERNAL_SDL2 +CMAKE_OFF+= YUZU_USE_EXTERNAL_VULKAN_HEADERS YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES +CMAKE_OFF+= HTTPLIB_USE_BROTLI_IF_AVAILABLE # unused by ENABLE_WEB_SERVICE +CMAKE_OFF+= ${ARCH:Maarch64:C/.+/YUZU_USE_PRECOMPILED_HEADERS DYNARMIC_USE_PRECOMPILED_HEADERS/} +CMAKE_OFF+= ${CMAKE_TESTING_ON} +CMAKE_TESTING_ON= YUZU_TESTS +LDFLAGS+= -Wl,--as-needed # Qt5Network +ELF_FEATURES= ${PLIST_FILES:Mbin/*:S/^/+wxneeded:/} +PLIST_FILES= bin/${PORTNAME}-cmd \ + bin/${PORTNAME}-room + +OPTIONS_DEFINE= ALSA GUI PULSEAUDIO JACK LTO NLS SNDIO VAAPI VULKAN WEBENGINE +OPTIONS_DEFAULT=PULSEAUDIO JACK LTO QT5 SNDIO VAAPI VULKAN WEBENGINE +OPTIONS_SINGLE= GUI +OPTIONS_SINGLE_GUI= QT5 QT6 +OPTIONS_SLAVE= ${${FLAVOR}_OPTIONS_SLAVE} +OPTIONS_EXCLUDE= ${${FLAVOR}_OPTIONS_EXCLUDE} + +ALSA_BUILD_DEPENDS= alsa-lib>0:audio/alsa-lib +ALSA_CMAKE_BOOL= USE_ALSA + +GUI_USES= desktop-file-utils shared-mime-info +GUI_CMAKE_BOOL= ENABLE_QT +GUI_PLIST_FILES= bin/${PORTNAME} \ + share/applications/org.yuzu_emu.yuzu.desktop \ + share/icons/hicolor/scalable/apps/org.yuzu_emu.yuzu.svg \ + share/metainfo/org.yuzu_emu.yuzu.metainfo.xml \ + share/mime/packages/org.yuzu_emu.yuzu.xml + +JACK_BUILD_DEPENDS= jackit>0:audio/jack +JACK_CMAKE_BOOL= USE_JACK + +LTO_CMAKE_BOOL= YUZU_ENABLE_LTO + +NLS_DESC= UI translations (implies ${NLS_IMPLIES}) +NLS_USE= QT=${"${PORT_OPTIONS:MQT5}":?linguist:}tools:build +NLS_CMAKE_BOOL= ENABLE_QT_TRANSLATION +NLS_IMPLIES= GUI + +PULSEAUDIO_BUILD_DEPENDS=pulseaudio>0:audio/pulseaudio +PULSEAUDIO_CMAKE_BOOL= USE_PULSE + +QT5_USES= qt:5 +QT5_USE= QT=qmake:build,buildtools:build,concurrent:build,core,dbus,gui,multimedia,widgets +QT5_IMPLIES= GUI + +QT6_USES= qt:6 +QT6_USE= QT=base +QT6_CMAKE_BOOL= ENABLE_QT6 +QT6_IMPLIES= GUI + +SNDIO_BUILD_DEPENDS= sndio>0:audio/sndio +SNDIO_CMAKE_BOOL= USE_SNDIO + +VAAPI_LIB_DEPENDS= libva.so:multimedia/libva + +VULKAN_DESC= Vulkan renderer +VULKAN_RUN_DEPENDS= ${LOCALBASE}/lib/libvulkan.so:graphics/vulkan-loader + +WEBENGINE_DESC= Web applet support (implies ${WEBENGINE_IMPLIES}) +WEBENGINE_USE= QT=webengine +WEBENGINE_CMAKE_BOOL= YUZU_USE_QT_WEB_ENGINE +WEBENGINE_IMPLIES= GUI + +post-extract: + @${CP} ${DISTFILES:M*\:gamedb:C/\:.*//:S,^,${_DISTDIR},} \ + ${WRKSRC}/dist/compatibility_list/ + +post-patch: + @${REINPLACE_CMD} -e 's/@GIT_BRANCH@/master/' \ + -e 's/@GIT_DESC@/${GH_TAGNAME}/' \ + ${WRKSRC}/src/common/scm_rev.cpp.in +# Temporarily use ConsoleKit2 like sysutils/gnome-settings-daemon + @${REINPLACE_CMD} -e 's,/login1,/ConsoleKit/Manager,' \ + -e 's,login1,ConsoleKit,' \ + ${WRKSRC}/src/${PORTNAME}/main.cpp + +post-patch-VAAPI-off: + @${REINPLACE_CMD} -i .nova '/pkg_check.*libva/d' \ + ${WRKSRC}/CMakeLists.txt + +# XXX Drop after FreeBSD 13.2 EOL around 2024-05-01 (don't forget distinfo) +.if !exists(/usr/include/c++/v1/__ranges/as_rvalue_view.h) || make(makesum) || make(fetch) +. if !exists(/usr/include/c++/v1/__memory/concepts.h) +USES+= llvm:min=14,build,export +PATH:= ${LLVM_PREFIX}/bin:${PATH} # XXX _CMAKE_TOOLCHAIN_SUFFIX vs. devel/llvm* +CONFIGURE_ENV+= CC="${CC}" CXX="${CXX}" CPP="${CPP}" +. endif + +# XXX Move into separate port and standardize via USES +GH_TUPLE+= llvm:llvm-project:llvmorg-16.0.1:libcxx +CXXFLAGS+= -nostdinc++ -isystem${WRKDIR}/libcxx_prefix/include/c++/v1 +# Don't link against new libc++ to avoid ABI mismatch in Qt +#LDFLAGS+= -nostdlib++ -L${WRKDIR}/libcxx_prefix/lib -l:libc++.a -lcxxrt + +pre-configure: bundled-libcxx +bundled-libcxx: + @${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS:M*Ninja*} \ + -DLIBCXX_INCLUDE_BENCHMARKS:BOOL=OFF \ + -DCMAKE_INSTALL_PREFIX:PATH=${WRKDIR}/libcxx_prefix \ + -B ${WRKDIR}/libcxx_build -S ${WRKSRC_libcxx}/libcxx + @${DO_MAKE_BUILD:NDESTDIR*} install -C ${WRKDIR}/libcxx_build +.endif + +.include diff --git a/distinfo b/distinfo new file mode 100644 index 0000000..39009d5 --- /dev/null +++ b/distinfo @@ -0,0 +1,31 @@ +TIMESTAMP = 1708530226 +SHA256 (yuzu-s20230424/compatibility_list.json) = 382db629d6b060af722a27dfa9cd6bb60ac16a7544c58322f63aa1be4c0c0fac +SIZE (yuzu-s20230424/compatibility_list.json) = 1801327 +SHA256 (yuzu-emu-yuzu-s20240221-8bbc209950_GH0.tar.gz) = 50ebcc6560d69662766f08c7cabff66d13f36bff5fec0ea4b1e2d65e1ae95491 +SIZE (yuzu-emu-yuzu-s20240221-8bbc209950_GH0.tar.gz) = 6965565 +SHA256 (yuzu-emu-mbedtls-v2.16.9-115-g8c88150ca_GH0.tar.gz) = 8cd6d075b4da0ad5fb995eb37390e2e6088be8d41ab1cdfc7e7e4256bd991450 +SIZE (yuzu-emu-mbedtls-v2.16.9-115-g8c88150ca_GH0.tar.gz) = 2679189 +SHA256 (yuzu-emu-sirit-ab75463_GH0.tar.gz) = 6b61e265be182b7a78075fc1b98ccf80fd33008343205dd0e22a10a439c45319 +SIZE (yuzu-emu-sirit-ab75463_GH0.tar.gz) = 23818 +SHA256 (GPUOpen-LibrariesAndSDKs-VulkanMemoryAllocator-v3.0.1-114-g2f382df_GH0.tar.gz) = 20ac76f32dd3236f9b66d1b4583393c35853b7ba2d77ea7f0cab753610415f9b +SIZE (GPUOpen-LibrariesAndSDKs-VulkanMemoryAllocator-v3.0.1-114-g2f382df_GH0.tar.gz) = 877938 +SHA256 (KhronosGroup-SPIRV-Headers-1.5.4.raytracing.fixed-201-gc214f6f_GH0.tar.gz) = 5e32aefc599e6d26c2373b7296a37980b9c6c7ff6f636d5eee49f79b437e5a51 +SIZE (KhronosGroup-SPIRV-Headers-1.5.4.raytracing.fixed-201-gc214f6f_GH0.tar.gz) = 445472 +SHA256 (merryhime-dynarmic-6.6.2-15-gba8192d8_GH0.tar.gz) = b44837dcb53e32afdccff1a82b24c952baf169b1726c54586946fdf23611680c +SIZE (merryhime-dynarmic-6.6.2-15-gba8192d8_GH0.tar.gz) = 3744710 +SHA256 (merryhime-oaknut-2.0.1_GH0.tar.gz) = f41fefd949f75c7cad43fc7ca1363a2a1b5b1a5a0f1e1cdebd5769bc5c0482c7 +SIZE (merryhime-oaknut-2.0.1_GH0.tar.gz) = 86226 +SHA256 (arun11299-cpp-jwt-v1.4-18-g10ef573_GH0.tar.gz) = f88855ae7e94954a8c34688f49eb63542c69496ec8138006a2cc8fc7a51eb8df +SIZE (arun11299-cpp-jwt-v1.4-18-g10ef573_GH0.tar.gz) = 1246202 +SHA256 (arsenm-sanitizers-cmake-aab6948_GH0.tar.gz) = d9009e17948aff769a6f6e16b52d4d8752c5cc2cab1e9c381d3a31fd1a680b58 +SIZE (arsenm-sanitizers-cmake-aab6948_GH0.tar.gz) = 7240 +SHA256 (eggert-tz-2022g-11-g16ce126a_GH0.tar.gz) = 1d1a5d867053ea55f526cb76f18c8fb8ae710188e9db2732fd85f8a557110e46 +SIZE (eggert-tz-2022g-11-g16ce126a_GH0.tar.gz) = 594209 +SHA256 (kinetiknz-cubeb-cubeb-0.2-1452-g48689ae_GH0.tar.gz) = c0f83a493f1d54a92e16baf56f27813ff294ce78bc42fbcc3935580852a624de +SIZE (kinetiknz-cubeb-cubeb-0.2-1452-g48689ae_GH0.tar.gz) = 228346 +SHA256 (lat9nq-tzdb_to_nx-221202-15-g9792969_GH0.tar.gz) = b661401eda279d0a3d43c3df87efe6f408694d9710b031e98efb732999599eed +SIZE (lat9nq-tzdb_to_nx-221202-15-g9792969_GH0.tar.gz) = 8413 +SHA256 (yhirose-cpp-httplib-v0.14.1_GH0.tar.gz) = 2d4fb5544da643e5d0a82585555d8b7502b4137eb321a4abbb075e21d2f00e96 +SIZE (yhirose-cpp-httplib-v0.14.1_GH0.tar.gz) = 1148935 +SHA256 (llvm-llvm-project-llvmorg-16.0.1_GH0.tar.gz) = b5a9ff1793b1e2d388a3819bf35797002b1d2e40bb35a10c65605e0ea1435271 +SIZE (llvm-llvm-project-llvmorg-16.0.1_GH0.tar.gz) = 179289803 diff --git a/files/patch-cubeb-revert b/files/patch-cubeb-revert new file mode 100644 index 0000000..e302ddd --- /dev/null +++ b/files/patch-cubeb-revert @@ -0,0 +1,112 @@ +Revert https://github.com/mozilla/cubeb/commit/0846b39f1fdc +until https://github.com/mozilla/cubeb/issues/746 + +--- externals/cubeb/src/cubeb_sndio.c.orig 2023-05-02 14:18:52 UTC ++++ externals/cubeb/src/cubeb_sndio.c +@@ -68,7 +68,7 @@ struct cubeb_stream { + struct sio_hdl * hdl; /* link us to sndio */ + int mode; /* bitmap of SIO_{PLAY,REC} */ + int active; /* cubec_start() called */ +- int conv; /* need float->s24 conversion */ ++ int conv; /* need float->s16 conversion */ + unsigned char * rbuf; /* rec data consumed from here */ + unsigned char * pbuf; /* play data is prepared here */ + unsigned int nfr; /* number of frames in ibuf and obuf */ +@@ -99,33 +99,33 @@ static void + } + + static void +-float_to_s24(void * ptr, long nsamp, float volume) ++float_to_s16(void * ptr, long nsamp, float volume) + { +- int32_t * dst = ptr; ++ int16_t * dst = ptr; + float * src = ptr; +- float mult = volume * 8388608; ++ float mult = volume * 32768; + int s; + + while (nsamp-- > 0) { + s = lrintf(*(src++) * mult); +- if (s < -8388608) +- s = -8388608; +- else if (s > 8388607) +- s = 8388607; ++ if (s < -32768) ++ s = -32768; ++ else if (s > 32767) ++ s = 32767; + *(dst++) = s; + } + } + + static void +-s24_to_float(void * ptr, long nsamp) ++s16_to_float(void * ptr, long nsamp) + { +- int32_t * src = ptr; ++ int16_t * src = ptr; + float * dst = ptr; + + src += nsamp; + dst += nsamp; + while (nsamp-- > 0) +- *(--dst) = (1. / 8388608) * *(--src); ++ *(--dst) = (1. / 32768) * *(--src); + } + + static const char * +@@ -213,7 +213,7 @@ sndio_mainloop(void * arg) + } + + if ((s->mode & SIO_REC) && s->conv) +- s24_to_float(s->rbuf, s->nfr * s->rchan); ++ s16_to_float(s->rbuf, s->nfr * s->rchan); + + /* invoke call-back, it returns less that s->nfr if done */ + pthread_mutex_unlock(&s->mtx); +@@ -244,7 +244,7 @@ sndio_mainloop(void * arg) + + if (s->mode & SIO_PLAY) { + if (s->conv) +- float_to_s24(s->pbuf, nfr * s->pchan, s->volume); ++ float_to_s16(s->pbuf, nfr * s->pchan, s->volume); + else + s16_setvol(s->pbuf, nfr * s->pchan, s->volume); + } +@@ -429,25 +429,21 @@ sndio_stream_init(cubeb * context, cubeb_stream ** str + } + WRAP(sio_initpar)(&wpar); + wpar.sig = 1; ++ wpar.bits = 16; + switch (format) { + case CUBEB_SAMPLE_S16LE: + wpar.le = 1; +- wpar.bits = 16; + break; + case CUBEB_SAMPLE_S16BE: + wpar.le = 0; +- wpar.bits = 16; + break; + case CUBEB_SAMPLE_FLOAT32NE: + wpar.le = SIO_LE_NATIVE; +- wpar.bits = 24; +- wpar.msb = 0; + break; + default: + DPR("sndio_stream_init() unsupported format\n"); + goto err; + } +- wpar.bps = SIO_BPS(wpar.bits); + wpar.rate = rate; + if (s->mode & SIO_REC) + wpar.rchan = input_stream_params->channels; +@@ -459,8 +455,6 @@ sndio_stream_init(cubeb * context, cubeb_stream ** str + goto err; + } + if (rpar.bits != wpar.bits || rpar.le != wpar.le || rpar.sig != wpar.sig || +- rpar.bps != wpar.bps || +- (wpar.bits < 8 * wpar.bps && rpar.msb != wpar.msb) || + rpar.rate != wpar.rate || + ((s->mode & SIO_REC) && rpar.rchan != wpar.rchan) || + ((s->mode & SIO_PLAY) && rpar.pchan != wpar.pchan)) { diff --git a/files/patch-libusb b/files/patch-libusb new file mode 100644 index 0000000..dcde9c0 --- /dev/null +++ b/files/patch-libusb @@ -0,0 +1,16 @@ +FreeBSD hasn't updated version string since 2014 despite improving +compatibility with newer versions of the reference implementation. + +-- Could NOT find libusb: Found unsuitable version "1.0.13", but required is at least "1.0.24" (found /usr/lib/libusb.so) + +--- CMakeLists.txt.orig 2023-01-02 18:45:36 UTC ++++ CMakeLists.txt +@@ -217,7 +217,7 @@ if (ENABLE_LIBUSB) + endif() + + if (ENABLE_LIBUSB) +- find_package(libusb 1.0.24 MODULE) ++ find_package(libusb MODULE) + endif() + + if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64) diff --git a/files/patch-nogit b/files/patch-nogit new file mode 100644 index 0000000..c76b65a --- /dev/null +++ b/files/patch-nogit @@ -0,0 +1,91 @@ +Don't depend on devel/git as distfiles are generated by git-archive(1) +thus don't contain .git subdirs. + +--- externals/nx_tzdb/CMakeLists.txt.orig 2023-06-23 13:27:28 UTC ++++ externals/nx_tzdb/CMakeLists.txt +@@ -5,15 +5,11 @@ add_library(nx_tzdb INTERFACE) + + add_library(nx_tzdb INTERFACE) + +-find_program(GIT git) + find_program(GNU_MAKE make) + find_program(DATE_PROG date) + + set(CAN_BUILD_NX_TZDB true) + +-if (NOT GIT) +- set(CAN_BUILD_NX_TZDB false) +-endif() + if (NOT GNU_MAKE) + set(CAN_BUILD_NX_TZDB false) + endif() +--- externals/nx_tzdb/tzdb_to_nx/externals/tz/CMakeLists.txt.orig 2024-02-10 22:27:31 UTC ++++ externals/nx_tzdb/tzdb_to_nx/externals/tz/CMakeLists.txt +@@ -13,20 +13,11 @@ endif() + message(FATAL_ERROR "GNU make not found") + endif() + +-find_program(GIT_PROGRAM git) +-if (NOT GIT_PROGRAM) +- message(FATAL_ERROR "git program not found") +-endif() +- + if (NOT EXISTS "${TZ_DIR}" OR NOT EXISTS "${TZIF_LIST_FILE}") + if (NOT TZDB2NX_ZONEINFO_DIR) # If a custom zoneinfo directory was specified + # tz's makefile can only build in-tree, so copy the whole source tree to a + # separate directory before building. +- execute_process( +- COMMAND +- ${GIT_PROGRAM} clone --depth 1 "file://${TZ_SOURCE_DIR}" "${TZ_TMP_SOURCE_DIR}" +- COMMAND_ERROR_IS_FATAL ANY +- ) ++ file(COPY ${TZ_SOURCE_DIR}/ DESTINATION ${TZ_TMP_SOURCE_DIR}) + + if (APPLE) + set(TZ_MAKEFLAGS "LDLIBS=${Intl_LIBRARY}") +--- externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/version.orig 2024-02-12 23:43:35 UTC ++++ externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/version +@@ -0,0 +1 @@ ++2022c +--- externals/nx_tzdb/tzdb_to_nx/src/tzdb/CMakeLists.txt.orig 2024-02-10 22:27:31 UTC ++++ externals/nx_tzdb/tzdb_to_nx/src/tzdb/CMakeLists.txt +@@ -1,8 +1,3 @@ +-find_program(GIT_PROGRAM git) +-if (NOT GIT_PROGRAM) +- message(FATAL_ERROR "git program not found") +-endif() +- + find_program(GNU_DATE date) + if (NOT GNU_DATE) + message(FATAL_ERROR "date program not found") +@@ -16,29 +11,7 @@ else() + if (NOT "${TZDB2NX_VERSION}" STREQUAL "") + set(TZDB_VERSION "${TZDB2NX_VERSION}\n") + else() +- execute_process( +- COMMAND +- ${GIT_PROGRAM} log --pretty=%at -n1 NEWS +- OUTPUT_VARIABLE +- TZ_COMMIT_TIME +- WORKING_DIRECTORY +- ${TZ_SOURCE_DIR} +- COMMAND_ERROR_IS_FATAL ANY) +- +- string(REPLACE "\n" "" TZ_COMMIT_TIME "${TZ_COMMIT_TIME}") +- +- if (APPLE OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|NetBSD|OpenBSD") +- set(VERSION_COMMAND ${GNU_DATE} -r ${TZ_COMMIT_TIME} +%y%m%d) +- else () +- set(VERSION_COMMAND ${GNU_DATE} +%y%m%d --date=@${TZ_COMMIT_TIME}) +- endif () +- +- execute_process( +- COMMAND +- ${VERSION_COMMAND} +- OUTPUT_VARIABLE +- TZDB_VERSION +- COMMAND_ERROR_IS_FATAL ANY) ++ set(TZDB_VERSION 230620) + endif() + + set(NX_VERSION_FILE ${NX_TZDB_DIR}/version.txt) diff --git a/files/patch-renderdoc b/files/patch-renderdoc new file mode 100644 index 0000000..225f281 --- /dev/null +++ b/files/patch-renderdoc @@ -0,0 +1,28 @@ +In file included from src/core/tools/renderdoc.cpp:4: +externals/./renderdoc/renderdoc_app.h:46:2: error: "Unknown platform" + 46 | #error "Unknown platform" + | ^ +externals/./renderdoc/renderdoc_app.h:240:26: error: expected ')' + 240 | typedef int(RENDERDOC_CC *pRENDERDOC_SetCaptureOptionU32)(RENDERDOC_CaptureOption opt, uint32_t val); + | ^ +externals/./renderdoc/renderdoc_app.h:240:12: note: to match this '(' + 240 | typedef int(RENDERDOC_CC *pRENDERDOC_SetCaptureOptionU32)(RENDERDOC_CaptureOption opt, uint32_t val); + | ^ +[...] + +--- externals/./renderdoc/renderdoc_app.h~ 2023-09-18 13:31:05.000000000 +0000 ++++ externals/./renderdoc/renderdoc_app.h 2023-09-18 17:24:14.130392873 +0000 +@@ -38,12 +38,8 @@ + + #if defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) + #define RENDERDOC_CC __cdecl +-#elif defined(__linux__) +-#define RENDERDOC_CC +-#elif defined(__APPLE__) +-#define RENDERDOC_CC + #else +-#error "Unknown platform" ++#define RENDERDOC_CC + #endif + + #ifdef __cplusplus diff --git a/files/patch-simpleini b/files/patch-simpleini new file mode 100644 index 0000000..3193801 --- /dev/null +++ b/files/patch-simpleini @@ -0,0 +1,36 @@ +Temporarily revert https://github.com/yuzu-emu/yuzu/commit/645961613fd5 +until devel/simpleini installs CMake config and/or pkg-config files. + +--- CMakeModules/FindSimpleIni.cmake.orig 2024-01-26 15:23:08 UTC ++++ CMakeModules/FindSimpleIni.cmake +@@ -2,20 +2,18 @@ + # + # SPDX-License-Identifier: GPL-3.0-or-later + ++find_path(SimpleIni_INCLUDE_DIR SimpleIni.h) ++ + include(FindPackageHandleStandardArgs) ++find_package_handle_standard_args(SimpleIni ++ REQUIRED_VARS SimpleIni_INCLUDE_DIR ++) + +-find_package(SimpleIni QUIET CONFIG) +-if (SimpleIni_CONSIDERED_CONFIGS) +- find_package_handle_standard_args(SimpleIni CONFIG_MODE) +-else() +- find_package(PkgConfig QUIET) +- pkg_search_module(SIMPLEINI QUIET IMPORTED_TARGET simpleini) +- find_package_handle_standard_args(SimpleIni +- REQUIRED_VARS SIMPLEINI_INCLUDEDIR +- VERSION_VAR SIMPLEINI_VERSION ++if (SimpleIni_FOUND AND NOT TARGET SimpleIni::SimpleIni) ++ add_library(SimpleIni::SimpleIni INTERFACE IMPORTED) ++ set_target_properties(SimpleIni::SimpleIni PROPERTIES ++ INTERFACE_INCLUDE_DIRECTORIES "${SimpleIni_INCLUDE_DIR}" + ) + endif() + +-if (SimpleIni_FOUND AND NOT TARGET SimpleIni::SimpleIni) +- add_library(SimpleIni::SimpleIni ALIAS PkgConfig::SIMPLEINI) +-endif() ++mark_as_advanced(SimpleIni_INCLUDE_DIR) diff --git a/files/patch-xbyak7 b/files/patch-xbyak7 new file mode 100644 index 0000000..55ee08d --- /dev/null +++ b/files/patch-xbyak7 @@ -0,0 +1,26 @@ +CMake Warning at CMakeLists.txt:313 (find_package): + Could not find a configuration file for package "xbyak" that is compatible + with requested version "6". + + The following configuration files were considered but not accepted: + + /usr/local/lib/cmake/xbyak/xbyak-config.cmake, version: 7.0 + +CMake Error at externals/CMakeLists.txt:19 (add_subdirectory): + The source directory + + externals/xbyak + + does not contain a CMakeLists.txt file. + +--- CMakeLists.txt.orig 2023-12-04 02:59:11 UTC ++++ CMakeLists.txt +@@ -310,7 +310,7 @@ + endif() + + if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64) +- find_package(xbyak 6 CONFIG) ++ find_package(xbyak CONFIG) + endif() + + if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) diff --git a/pkg-descr b/pkg-descr new file mode 100644 index 0000000..fddb091 --- /dev/null +++ b/pkg-descr @@ -0,0 +1,5 @@ +yuzu is the world's most popular, open-source, Nintendo Switch emulator, +started by the creators of Citra. It is written in C++ with portability in +mind, with builds actively maintained for Windows and Linux. The emulator is +capable of running most commercial games at full speed, provided you meet +the necessary hardware requirements.