commit:     4d612b2c012fd7f16b31eb01492a7e31e1317922
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Wed May 25 06:25:42 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed May 25 06:43:54 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d612b2c

games-emulation/pcsx2: update live

Upstream added a generic function to ease unbundling which
has USE_SYSTEM_LIBS to enable all at once, but not everything
is covered yet (e.g. no cubeb/chdr/glslang).

Also switch to using aliases to have less files to modify.

I expect this to break again soon'ish as upstream continues
to work on this (please report or ping on IRC, I do not try
to build this often to check).

Closes: https://bugs.gentoo.org/847343
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 games-emulation/pcsx2/pcsx2-9999.ebuild | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/games-emulation/pcsx2/pcsx2-9999.ebuild 
b/games-emulation/pcsx2/pcsx2-9999.ebuild
index 6ec992906f64..14345f880fa8 100644
--- a/games-emulation/pcsx2/pcsx2-9999.ebuild
+++ b/games-emulation/pcsx2/pcsx2-9999.ebuild
@@ -73,15 +73,12 @@ src_prepare() {
        cmake_src_prepare
 
        # unbundle, use sed over patch for less chances to break -9999
+       # note: gentoo's zstd lacks a cmake module which upstream tries to use
        sed -e '/add_subdir.*cubeb/c\find_package(cubeb REQUIRED)' \
-               -e '/add_subdir.*libchdr/c\pkg_check_modules(chdr REQUIRED 
IMPORTED_TARGET libchdr)' \
-               -e '/add_subdir.*libzip/c\find_package(libzip REQUIRED)' \
-               -e '/add_subdir.*zstd/c\pkg_check_modules(zstd REQUIRED 
IMPORTED_TARGET libzstd)' \
+               -e '/add_subdir.*libchdr/c\pkg_check_modules(chdr REQUIRED 
IMPORTED_TARGET libchdr)\nalias_library(chdr-static PkgConfig::chdr)' \
+               -e '/system_library.*zstd/,/endif()/c\pkg_check_modules(zstd 
REQUIRED IMPORTED_TARGET libzstd)\nalias_library(Zstd::Zstd PkgConfig::zstd)' \
                -e '/compile_options(\(cubeb\|chdr-static\|speex\)/d' \
                -i cmake/SearchForStuff.cmake || die
-       sed -e 's/chdr-static/PkgConfig::chdr/' \
-               -e 's/Zstd::Zstd/PkgConfig::zstd/' \
-               -i pcsx2/CMakeLists.txt || die
 
        # pulseaudio is only used for usb-mic, not audio output
        use pulseaudio || > cmake/FindPulseAudio.cmake || die
@@ -103,9 +100,9 @@ src_configure() {
                -DDISABLE_SETCAP=TRUE
                -DENABLE_TESTS=$(usex test)
                -DPACKAGE_MODE=TRUE
-               -DQT_BUILD=FALSE # TODO
+               -DQT_BUILD=FALSE # TODO when qt6 is in tree
                -DSDL2_API=TRUE # conditionally needed if wxGTK[sdl], 
cmake/ApiValidation.cmake
-               -DUSE_SYSTEM_YAML=TRUE
+               -DUSE_SYSTEM_LIBS=TRUE
                -DUSE_VTUNE=FALSE
                -DXDG_STD=TRUE
        )

Reply via email to