Skip to content

Commit

Permalink
games-emulation/pcsx2: fix wxwidgets detection, ignore /usr/lib64
Browse files Browse the repository at this point in the history
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 <[email protected]>
Bug: https://bugs.gentoo.org/833100
Signed-off-by: Ionen Wolkens <[email protected]>
  • Loading branch information
ionenwks committed Feb 19, 2022
1 parent 89a6c8e commit 67703b6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
20 changes: 20 additions & 0 deletions games-emulation/pcsx2/files/pcsx2-1.6.0-wx-config.patch
Original file line number Diff line number Diff line change
@@ -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)
4 changes: 4 additions & 0 deletions games-emulation/pcsx2/pcsx2-1.6.0-r3.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ FILECAPS=(

PATCHES=(
"${FILESDIR}/${P}-disable-setcap.patch"
"${FILESDIR}/${P}-wx-config.patch"
)

pkg_setup() {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 67703b6

Please sign in to comment.