Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-emulation/pcsx2/
Date: Sat, 01 Jan 2022 20:42:10
Message-Id: 1641069669.44e830cfcd062429cd2a99f008e3020de14bd166.ionen@gentoo
1 commit: 44e830cfcd062429cd2a99f008e3020de14bd166
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 1 20:27:41 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 1 20:41:09 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44e830cf
7
8 games-emulation/pcsx2: unbundle cubeb+libchdr, make pulse optional
9
10 Optimally be nice to get these handled upstream, but just
11 a rough sed for now.
12
13 cubeb seems to work well from a quick try.
14
15 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
16
17 games-emulation/pcsx2/pcsx2-9999.ebuild | 27 +++++++++++++++++++--------
18 1 file changed, 19 insertions(+), 8 deletions(-)
19
20 diff --git a/games-emulation/pcsx2/pcsx2-9999.ebuild b/games-emulation/pcsx2/pcsx2-9999.ebuild
21 index c80113c34e62..2df1c8c2ebc9 100644
22 --- a/games-emulation/pcsx2/pcsx2-9999.ebuild
23 +++ b/games-emulation/pcsx2/pcsx2-9999.ebuild
24 @@ -9,16 +9,12 @@ inherit cmake fcaps flag-o-matic git-r3 toolchain-funcs wxwidgets
25 DESCRIPTION="A PlayStation 2 emulator"
26 HOMEPAGE="https://pcsx2.net/"
27 EGIT_REPO_URI="https://github.com/PCSX2/${PN}.git"
28 -EGIT_SUBMODULES=(
29 - # TODO: unbundle
30 - 3rdparty/cubeb/cubeb
31 - 3rdparty/libchdr/libchdr
32 -)
33 +EGIT_SUBMODULES=()
34
35 -LICENSE="GPL-3 BSD ISC"
36 +LICENSE="GPL-3"
37 SLOT="0"
38 KEYWORDS=""
39 -IUSE="test"
40 +IUSE="pulseaudio test"
41
42 RESTRICT="!test? ( test )"
43
44 @@ -27,16 +23,17 @@ RDEPEND="
45 dev-cpp/rapidyaml:=
46 dev-libs/glib:2
47 dev-libs/libaio
48 + dev-libs/libchdr
49 >=dev-libs/libfmt-7.1.3:=
50 dev-libs/libxml2:2
51 media-libs/alsa-lib
52 + media-libs/cubeb
53 media-libs/freetype
54 media-libs/libglvnd
55 media-libs/libpng:=
56 media-libs/libsamplerate
57 media-libs/libsdl2[haptic,joystick,sound]
58 media-libs/libsoundtouch:=
59 - media-sound/pulseaudio
60 net-libs/libpcap
61 sys-libs/zlib
62 virtual/libudev:=
63 @@ -46,6 +43,7 @@ RDEPEND="
64 x11-libs/libX11
65 x11-libs/libXext
66 x11-libs/wxGTK:${WX_GTK_VER}[X]
67 + pulseaudio? ( media-sound/pulseaudio )
68 "
69 DEPEND="
70 ${RDEPEND}
71 @@ -66,6 +64,19 @@ pkg_setup() {
72 fi
73 }
74
75 +src_prepare() {
76 + cmake_src_prepare
77 +
78 + # unbundle, use sed over patch for less chances to break -9999
79 + sed -e '/add_subdir.*cubeb/c\find_package(cubeb REQUIRED)' \
80 + -e '/add_subdir.*libchdr/c\pkg_check_modules(chdr REQUIRED IMPORTED_TARGET libchdr)' \
81 + -i cmake/SearchForStuff.cmake || die
82 + sed -i 's/chdr-static/PkgConfig::chdr/' pcsx2/CMakeLists.txt || die
83 +
84 + # pulseaudio is only used for usb-mic, not audio output
85 + use pulseaudio || > cmake/FindPulseAudio.cmake || die
86 +}
87 +
88 src_configure() {
89 # Build with ld.gold fails
90 # https://github.com/PCSX2/pcsx2/issues/1671