commit:     0c06dec36acae7fa390460376aff96bdef21ab03
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat Oct  1 12:50:08 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sat Oct  1 13:17:42 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c06dec3

games-emulation/pcsx2: live temporary quick fixes

PCSX2 upstream has replaced the cubeb submodule by hard-including
it in its source /and/ modified them. Meaning unbundling is not
reasonable anymore without non-modified system copy.

New unbundling patch now omits cubeb, however this "fix" is partial
given cubeb will do automagic for its backends. Still need to
implement IUSE="jack alsa sndio ...". There's also a rust backend
full with crates but may not bother with that one in pcsx2's ebuild
(will explore how to handle these when do another nightly release).

Also need a new submodule (rcheevos), which may be possible to
force-unbundle (not looked at yet).

Users having problems with any of the above are advised to stick
to non-live =pcsx2-1.7*, or at least for now.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../pcsx2/files/pcsx2-1.7.3351-unbundle.patch      | 34 ++++++++++++++++++++++
 games-emulation/pcsx2/pcsx2-9999.ebuild            | 10 +++++--
 2 files changed, 41 insertions(+), 3 deletions(-)

diff --git a/games-emulation/pcsx2/files/pcsx2-1.7.3351-unbundle.patch 
b/games-emulation/pcsx2/files/pcsx2-1.7.3351-unbundle.patch
new file mode 100644
index 000000000000..014548ae9882
--- /dev/null
+++ b/games-emulation/pcsx2/files/pcsx2-1.7.3351-unbundle.patch
@@ -0,0 +1,34 @@
+Adjust to unbundle a few extras.
+
+zstd changes only needed because of https://bugs.gentoo.org/872254
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -54,3 +54,4 @@
+       set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
+-      add_subdirectory(3rdparty/gtest EXCLUDE_FROM_ALL)
++      find_package(GTest REQUIRED)
++      alias_library(gtest_main GTest::gtest_main)
+       add_subdirectory(tests/ctest)
+--- a/cmake/SearchForStuff.cmake
++++ b/cmake/SearchForStuff.cmake
+@@ -177,3 +177,3 @@
+ set(ACTUALLY_ENABLE_TESTS ${ENABLE_TESTS})
+-if(ENABLE_TESTS)
++if(0)
+       if(NOT EXISTS "${CMAKE_SOURCE_DIR}/3rdparty/gtest/CMakeLists.txt")
+@@ -210,7 +210,4 @@
+ find_optional_system_library(ryml 3rdparty/rapidyaml/rapidyaml 0.4.0)
+-find_optional_system_library(zstd 3rdparty/zstd 1.4.5)
+-if (${zstd_TYPE} STREQUAL System)
+-      alias_library(Zstd::Zstd zstd::libzstd_shared)
+-      alias_library(pcsx2-zstd zstd::libzstd_shared)
+-endif()
++pkg_check_modules(zstd REQUIRED IMPORTED_TARGET libzstd)
++alias_library(Zstd::Zstd PkgConfig::zstd)
+ find_optional_system_library(libzip 3rdparty/libzip 1.8.0)
+@@ -248,3 +245,4 @@
+ add_subdirectory(3rdparty/lzma EXCLUDE_FROM_ALL)
+-add_subdirectory(3rdparty/libchdr EXCLUDE_FROM_ALL)
++pkg_check_modules(chdr REQUIRED IMPORTED_TARGET libchdr)
++alias_library(chdr-static PkgConfig::chdr)
+ 

diff --git a/games-emulation/pcsx2/pcsx2-9999.ebuild 
b/games-emulation/pcsx2/pcsx2-9999.ebuild
index f84ec7bab70e..36b8e5ccf0b7 100644
--- a/games-emulation/pcsx2/pcsx2-9999.ebuild
+++ b/games-emulation/pcsx2/pcsx2-9999.ebuild
@@ -25,9 +25,10 @@ DESCRIPTION="PlayStation 2 emulator"
 HOMEPAGE="https://pcsx2.net/";
 
 LICENSE="
-       GPL-3+ Apache-2.0 BSD BSD-2 BSD-4 Boost-1.0 GPL-2+ LGPL-2.1+
+       GPL-3+ Apache-2.0 BSD BSD-2 BSD-4 Boost-1.0 GPL-2+ ISC LGPL-2.1+
        LGPL-3+ MIT OFL-1.1 ZLIB public-domain"
 SLOT="0"
+# TODO: proper IUSE to handle cubeb backends with the now-required bundled copy
 IUSE="cpu_flags_x86_sse4_1 pulseaudio qt6 test vulkan wayland"
 REQUIRED_USE="cpu_flags_x86_sse4_1" # dies at runtime if no support
 RESTRICT="!test? ( test )"
@@ -40,7 +41,6 @@ RDEPEND="
        dev-libs/libchdr
        >=dev-libs/libfmt-7.1.3:=
        dev-libs/libzip:=[zstd]
-       media-libs/cubeb
        media-libs/harfbuzz
        media-libs/libglvnd
        media-libs/libpng:=
@@ -84,8 +84,8 @@ PATCHES=(
        "${FILESDIR}"/${PN}-1.7.3329-lto.patch
        "${FILESDIR}"/${PN}-1.7.3329-musl.patch
        "${FILESDIR}"/${PN}-1.7.3329-qt6.patch
-       "${FILESDIR}"/${PN}-1.7.3329-unbundle.patch
        "${FILESDIR}"/${PN}-1.7.3329-wx-vs-sdl.patch
+       "${FILESDIR}"/${PN}-1.7.3351-unbundle.patch
 )
 
 src_unpack() {
@@ -102,6 +102,10 @@ src_unpack() {
                                3rdparty/rapidyaml/rapidyaml
                                3rdparty/rapidyaml/rapidyaml/extern/c4core
                                
3rdparty/rapidyaml/rapidyaml/ext/c4core/src/c4/ext/fast_float
+
+                               # TODO?: check if easy to unbundle when look at 
next nightly bump
+                               # (there is a -DUSE_ACHIVEMENTS to be optional 
too)
+                               3rdparty/rcheevos/rcheevos
                        )
                fi
                git-r3_src_unpack

Reply via email to