diff --git a/emulators/pcsx2/Makefile b/emulators/pcsx2/Makefile index 6f917ba94d19..0a1ac1dcdaff 100644 --- a/emulators/pcsx2/Makefile +++ b/emulators/pcsx2/Makefile @@ -1,103 +1,105 @@ PORTNAME= pcsx2 PORTVERSION= 1.7.4970 DISTVERSIONPREFIX= v -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= emulators MAINTAINER= martymac@FreeBSD.org COMMENT= Free and open-source PlayStation 2 emulator WWW= https://pcsx2.net LICENSE= GPLv3 LGPL3 LICENSE_COMB= multi ONLY_FOR_ARCHS= amd64 # Notes on dependencies (see cmake/SearchForStuff.cmake): # - glad comes from 3rdparty/ (conflicts with libglvnd) # - fmt, rapidyaml, soundtouch, zydis, zstd, libzip # are always included from 3rdparty/ LIB_DEPENDS= libpng.so:graphics/png \ libdbus-1.so:devel/dbus \ libavcodec.so:multimedia/ffmpeg \ libavformat.so:multimedia/ffmpeg \ libavutil.so:multimedia/ffmpeg \ libswresample.so:multimedia/ffmpeg \ libswscale.so:multimedia/ffmpeg \ libcurl.so:ftp/curl \ libpulse.so:audio/pulseaudio \ libjack.so:audio/jack \ libsndio.so:audio/sndio \ libbacktrace.so:devel/libbacktrace +# XXX Necessary for Qt6/FindWrapVulkanHeaders.cmake +# then vulkan-haders and glslang are unconditionnaly included from 3rdparty/ +BUILD_DEPENDS= vulkan-headers>0:graphics/vulkan-headers USES= cmake compiler:c++20-lang \ desktop-file-utils elfctl gl pkgconfig qt:6 sdl xorg USE_GITHUB= yes GH_PROJECT= pcsx2 .include "${.CURDIR}/Makefile.tuples" USE_GL= egl USE_SDL= sdl2 USE_XORG= ice x11 xcb xext xpm xrandr USE_QT= base tools ELF_FEATURES= +wxneeded:bin/pcsx2-qt # SSE 4.1 instructions are a hard requirement, if CPUTYPE is defined # use whatever is set and let the build fail if it falls below # baseline requirements. If it's undefined set penryn as target # as it's the oldest CPU arch that supports SSE 4.1 .if defined(CPUTYPE) EXTRA_PATCHES= ${PATCHDIR}/extra-patch-no-march-native .else EXTRA_PATCHES= ${PATCHDIR}/extra-patch-no-march-minimum-req .endif # See: cmake/BuildParameters.cmake CMAKE_ARGS+= \ -DCMAKE_REQUIRED_INCLUDES:STRING=${LOCALBASE}/include/ \ -DPCSX2_RESOURCES_PATH:STRING=${DATADIR}/resources \ -DUSE_VTUNE:BOOL=OFF \ - -DUSE_VULKAN:BOOL=OFF \ -DWAYLAND_API=OFF \ -DENABLE_TESTS:BOOL=OFF OPTIONS_DEFINE= DOCS PORTDOCS= Debugger.pdf GameIndex.pdf # - Program and resources are copied from target dir ${CONFIGURE_WRKSRC}/bin # because only necessary resources are installed there (e.g. no dx11 stuff) do-install: cd ${CONFIGURE_WRKSRC}/bin && \ ${COPYTREE_SHARE} resources/ ${STAGEDIR}${DATADIR}/ ${INSTALL_PROGRAM} ${CONFIGURE_WRKSRC}/bin/pcsx2-qt \ ${STAGEDIR}${PREFIX}/bin/ ${INSTALL_DATA} ${WRKSRC}/pcsx2-qt/resources/icons/AppIcon64.png \ ${STAGEDIR}${PREFIX}/share/pixmaps/PCSX2.png ${INSTALL_DATA} ${WRKSRC}/.github/workflows/scripts/linux/pcsx2-qt.desktop \ ${STAGEDIR}${PREFIX}/share/applications/PCSX2.desktop post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} && \ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/bin/docs/|} \ ${STAGEDIR}${DOCSDIR} # For maintainer (do not forget to clean up Makefile.tuples afterwards to # remove useless submodules) Makefile.tuples:: @${RM} -f ${.CURDIR}/Makefile.tuples @${RM} -rf ${WRKDIR}/.maintainer.checkout @${MKDIR} ${WRKDIR}/.maintainer.checkout && \ cd ${WRKDIR}/.maintainer.checkout && \ git clone --recursive --branch=v${PORTVERSION} \ https://github.com/${PORTNAME}/${PORTNAME} . && \ ${SH} ${FILESDIR}/gen_gh_tuple.sh >> ${.CURDIR}/Makefile.tuples .include # Fixed in 13.2 with commit 4b6eb0e63c69 (libc++ update) .if (${OSVERSION} <= 1301503) BROKEN= needs libc++ with std::bit_cast support .endif .include diff --git a/emulators/pcsx2/Makefile.tuples b/emulators/pcsx2/Makefile.tuples index fe3593f99e02..e04f9da14434 100644 --- a/emulators/pcsx2/Makefile.tuples +++ b/emulators/pcsx2/Makefile.tuples @@ -1,11 +1,13 @@ GH_TUPLE= \ fmtlib:fmt:b6f4ceaed0a0a24ccf575fab6c56dd50ccf6f1a9:fmt/3rdparty/fmt/fmt \ rtissera:libchdr:fec8ab94212cc65d9d9a62cb3da924f5830c04b0:libchdr/3rdparty/libchdr/libchdr \ biojppm:rapidyaml:213b201d264139cd1b887790197e08850af628e3:rapidyaml/3rdparty/rapidyaml/rapidyaml \ + KhronosGroup:glslang:c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5:glslang/3rdparty/glslang/glslang \ + KhronosGroup:Vulkan-Headers:9f4c61a31435a7a90a314fc68aeb386c92a09c0f:VulkanHeaders/3rdparty/vulkan-headers \ facebook:zstd:e47e674cd09583ff0503f0f6defd6d23d8b718d3:zstd/3rdparty/zstd/zstd \ RetroAchievements:rcheevos:3af1e2fc5188d6e932ee379942f4049ea877e648:rcheevos/3rdparty/rcheevos/rcheevos \ biojppm:c4core:d35c7c9bf370134595699d791e6ff8db018ddc8d:c4core/3rdparty/rapidyaml/rapidyaml/ext/c4core \ biojppm:cmake:371982300ff5a076d7c3199057ebed77bbe3472f:cmake/3rdparty/rapidyaml/rapidyaml/ext/c4core/cmake \ biojppm:debugbreak:5dcbe41d2bd4712c8014aa7e843723ad7b40fd74:debugbreak/3rdparty/rapidyaml/rapidyaml/ext/c4core/src/c4/ext/debugbreak \ fastfloat:fast_float:32d21dcecb404514f94fb58660b8029a4673c2c1:fast_float/3rdparty/rapidyaml/rapidyaml/ext/c4core/src/c4/ext/fast_float \ diff --git a/emulators/pcsx2/distinfo b/emulators/pcsx2/distinfo index a90c71e3bebc..c1d43fa38f75 100644 --- a/emulators/pcsx2/distinfo +++ b/emulators/pcsx2/distinfo @@ -1,21 +1,25 @@ TIMESTAMP = 1693509549 SHA256 (pcsx2-pcsx2-v1.7.4970_GH0.tar.gz) = bfbb6ea26d749b5fe80d9275f33de5912f67c259bb255ad73df240fd5632c57c SIZE (pcsx2-pcsx2-v1.7.4970_GH0.tar.gz) = 12536525 SHA256 (fmtlib-fmt-b6f4ceaed0a0a24ccf575fab6c56dd50ccf6f1a9_GH0.tar.gz) = de3061d275cb5c09c30dd809fcb425dce5bfd1dededcb272231263c95de05c61 SIZE (fmtlib-fmt-b6f4ceaed0a0a24ccf575fab6c56dd50ccf6f1a9_GH0.tar.gz) = 826246 SHA256 (rtissera-libchdr-fec8ab94212cc65d9d9a62cb3da924f5830c04b0_GH0.tar.gz) = 8b87f1a2b22de38c9fb1675137c8f19743105b8373ad8ca70ecf03a639e04fcf SIZE (rtissera-libchdr-fec8ab94212cc65d9d9a62cb3da924f5830c04b0_GH0.tar.gz) = 1748513 SHA256 (biojppm-rapidyaml-213b201d264139cd1b887790197e08850af628e3_GH0.tar.gz) = c206d4565ccfa721991a8df90821d1a1f747e68385a0f3f5b9ab995e191c06be SIZE (biojppm-rapidyaml-213b201d264139cd1b887790197e08850af628e3_GH0.tar.gz) = 446070 +SHA256 (KhronosGroup-glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5_GH0.tar.gz) = 9ed562b906c3480b29730e46eb1536af2c82ae6a59d4d2ac93b7e764a2896372 +SIZE (KhronosGroup-glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5_GH0.tar.gz) = 3433325 +SHA256 (KhronosGroup-Vulkan-Headers-9f4c61a31435a7a90a314fc68aeb386c92a09c0f_GH0.tar.gz) = 682e0be6805949da18c5cacbad878493984d3aaf5ac1fbd968d285da78d44ae5 +SIZE (KhronosGroup-Vulkan-Headers-9f4c61a31435a7a90a314fc68aeb386c92a09c0f_GH0.tar.gz) = 1554220 SHA256 (facebook-zstd-e47e674cd09583ff0503f0f6defd6d23d8b718d3_GH0.tar.gz) = 2a7b7e5d3f8c759894f0fea9917a590733600574d20cb53f3be827c7c62862e1 SIZE (facebook-zstd-e47e674cd09583ff0503f0f6defd6d23d8b718d3_GH0.tar.gz) = 1952167 SHA256 (RetroAchievements-rcheevos-3af1e2fc5188d6e932ee379942f4049ea877e648_GH0.tar.gz) = 2350d4479a9ca725a269eee5c1aeccf3e54ea2cf7bf9dd82bd0f07c59f96f5bd SIZE (RetroAchievements-rcheevos-3af1e2fc5188d6e932ee379942f4049ea877e648_GH0.tar.gz) = 541818 SHA256 (biojppm-c4core-d35c7c9bf370134595699d791e6ff8db018ddc8d_GH0.tar.gz) = b768c8fb5dd4740317b7e1a3e43a0b32615d4d4e1e974d7ab515a80d2f1f318d SIZE (biojppm-c4core-d35c7c9bf370134595699d791e6ff8db018ddc8d_GH0.tar.gz) = 262210 SHA256 (biojppm-cmake-371982300ff5a076d7c3199057ebed77bbe3472f_GH0.tar.gz) = 1d3ded3a552a5993c8ebe5059a9829e0e26ae4f4780c179a11882d25da203de6 SIZE (biojppm-cmake-371982300ff5a076d7c3199057ebed77bbe3472f_GH0.tar.gz) = 122880 SHA256 (biojppm-debugbreak-5dcbe41d2bd4712c8014aa7e843723ad7b40fd74_GH0.tar.gz) = 4b424d23dad957937c57c142648d32571a78a6c6b2e473709748e5c1bb8a0f92 SIZE (biojppm-debugbreak-5dcbe41d2bd4712c8014aa7e843723ad7b40fd74_GH0.tar.gz) = 7033 SHA256 (fastfloat-fast_float-32d21dcecb404514f94fb58660b8029a4673c2c1_GH0.tar.gz) = 8035a9ca28a8e3dfee332c7960af3c06ef0ab5169d5f31228b89c469e882bef7 SIZE (fastfloat-fast_float-32d21dcecb404514f94fb58660b8029a4673c2c1_GH0.tar.gz) = 76108 diff --git a/emulators/pcsx2/files/patch-pcsx2-GS-Renderers-Vulkan-GSDeviceVK.h b/emulators/pcsx2/files/patch-pcsx2-GS-Renderers-Vulkan-GSDeviceVK.h new file mode 100644 index 000000000000..cb06827f623c --- /dev/null +++ b/emulators/pcsx2/files/patch-pcsx2-GS-Renderers-Vulkan-GSDeviceVK.h @@ -0,0 +1,10 @@ +--- pcsx2/GS/Renderers/Vulkan/GSDeviceVK.h.orig 2023-08-31 07:45:23 UTC ++++ pcsx2/GS/Renderers/Vulkan/GSDeviceVK.h +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/emulators/pcsx2/files/patch-relocate-resources.txt b/emulators/pcsx2/files/patch-relocate-resources.txt index f2be4ea8e074..316626ecb61f 100644 --- a/emulators/pcsx2/files/patch-relocate-resources.txt +++ b/emulators/pcsx2/files/patch-relocate-resources.txt @@ -1,36 +1,36 @@ Allow relocation of resource files ---- cmake/BuildParameters.cmake.orig 2023-02-10 03:43:10 UTC +--- cmake/BuildParameters.cmake.orig 2023-11-10 10:14:25 UTC +++ cmake/BuildParameters.cmake -@@ -260,6 +260,10 @@ +@@ -259,6 +259,10 @@ endif() list(APPEND PCSX2_DEFS DISABLE_BUILD_DATE) endif() +if(DEFINED PCSX2_RESOURCES_PATH) + add_compile_definitions(PCSX2_RESOURCES_PATH="${PCSX2_RESOURCES_PATH}") +endif() + #------------------------------------------------------------------------------- # MacOS-specific things #------------------------------------------------------------------------------- --- pcsx2/Pcsx2Config.cpp.orig 2023-08-31 07:45:23 UTC +++ pcsx2/Pcsx2Config.cpp -@@ -1676,6 +1676,10 @@ void EmuFolders::SetAppRoot() +@@ -1676,6 +1676,10 @@ void EmuFolders::SetResourcesDirectory() void EmuFolders::SetResourcesDirectory() { +#ifdef PCSX2_RESOURCES_PATH + // Resources' path specified at compile time + EmuFolders::Resources = Path::Canonicalize(PCSX2_RESOURCES_PATH); +#else #ifndef __APPLE__ // On Windows/Linux, these are in the binary directory. Resources = Path::Combine(AppRoot, "resources"); @@ -1683,6 +1687,7 @@ void EmuFolders::SetResourcesDirectory() // On macOS, this is in the bundle resources directory. Resources = Path::Canonicalize(Path::Combine(AppRoot, "../Resources")); #endif +#endif // PCSX2_RESOURCES_PATH } bool EmuFolders::ShouldUsePortableMode()