commit:     67703b687d646403482c2b87d61626874097b2ba
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 19 10:08:27 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sat Feb 19 10:45:13 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67703b68

games-emulation/pcsx2: fix wxwidgets detection, ignore /usr/lib64

PCSX2 tries to force a wx-config path while FindwxWidgets.cmake
would otherwise use the eclass' WX_CONFIG. Results in a build
failure if the wx-config-3.0 symlink points to the gtk2 version.

This previously worked by accident when cmake is in cross-compilation
mode given wx-config32-3.0 doesn't exist and fell back to WX_CONFIG.

Dirty fix but also force-ignore /usr/lib64 like the toolchain file
used to for now, many checks are fragile (e.g. GLU). Ultimately
these workarounds shouldn't be needed next release (64bit).

Thanks-to: Yuri Konotopov <ykonotopov <AT> gnome.org>
Bug: https://bugs.gentoo.org/833100
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../pcsx2/files/pcsx2-1.6.0-wx-config.patch          | 20 ++++++++++++++++++++
 games-emulation/pcsx2/pcsx2-1.6.0-r3.ebuild          |  4 ++++
 2 files changed, 24 insertions(+)

diff --git a/games-emulation/pcsx2/files/pcsx2-1.6.0-wx-config.patch 
b/games-emulation/pcsx2/files/pcsx2-1.6.0-wx-config.patch
new file mode 100644
index 000000000000..bfa12b893dcd
--- /dev/null
+++ b/games-emulation/pcsx2/files/pcsx2-1.6.0-wx-config.patch
@@ -0,0 +1,20 @@
+Don't attempt to use /usr/bin/wx-config-3.0 which can point to the
+wrong wx-config depending on eselect'ed wxGTK profile. Furthermore
+that path does not use ESYSROOT.
+
+If unset, FindwxWidgets.cmake will use WX_CONFIG environment
+set by the wxwidgets eclass.
+--- a/cmake/SearchForStuff.cmake
++++ b/cmake/SearchForStuff.cmake
+@@ -50,4 +50,5 @@
+ # lib32-wx3.0 => /usr/bin/wx-config32-3.0
+ # FindwxWidgets only searches for wx-config.
++#[[
+ if(CMAKE_CROSSCOMPILING)
+     # May need to fix the filenames for lib32-wx3.0.
+@@ -71,4 +72,5 @@
+     endif()
+ endif()
++#]]
+ 
+ find_package(wxWidgets COMPONENTS base core adv)

diff --git a/games-emulation/pcsx2/pcsx2-1.6.0-r3.ebuild 
b/games-emulation/pcsx2/pcsx2-1.6.0-r3.ebuild
index cc399bd2cc8a..1986a75b650e 100644
--- a/games-emulation/pcsx2/pcsx2-1.6.0-r3.ebuild
+++ b/games-emulation/pcsx2/pcsx2-1.6.0-r3.ebuild
@@ -46,6 +46,7 @@ FILECAPS=(
 
 PATCHES=(
        "${FILESDIR}/${P}-disable-setcap.patch"
+       "${FILESDIR}/${P}-wx-config.patch"
 )
 
 pkg_setup() {
@@ -87,6 +88,9 @@ src_configure() {
                # wxGTK must be built against same sdl version
                -DSDL2_API=TRUE
                -DUSE_VTUNE=FALSE
+
+               # mimic old toolchain file behavior (bug #833100 comment #20)
+               -DCMAKE_SYSTEM_IGNORE_PATH="${ESYSROOT}"/usr/lib64
        )
 
        setup-wxwidgets

Reply via email to