summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-01-01 15:27:41 -0500
committerIonen Wolkens <ionen@gentoo.org>2022-01-01 15:41:09 -0500
commit44e830cfcd062429cd2a99f008e3020de14bd166 (patch)
treea67820909e83ba5944ad5e17c2cb9f7060fd4a2c /games-emulation/pcsx2
parentdev-libs/libchdr: initial import, 2021-11-27 snapshot (diff)
downloadgentoo-44e830cfcd062429cd2a99f008e3020de14bd166.tar.gz
gentoo-44e830cfcd062429cd2a99f008e3020de14bd166.tar.bz2
gentoo-44e830cfcd062429cd2a99f008e3020de14bd166.zip
games-emulation/pcsx2: unbundle cubeb+libchdr, make pulse optional
Optimally be nice to get these handled upstream, but just a rough sed for now. cubeb seems to work well from a quick try. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-emulation/pcsx2')
-rw-r--r--games-emulation/pcsx2/pcsx2-9999.ebuild27
1 files changed, 19 insertions, 8 deletions
diff --git a/games-emulation/pcsx2/pcsx2-9999.ebuild b/games-emulation/pcsx2/pcsx2-9999.ebuild
index c80113c34e62..2df1c8c2ebc9 100644
--- a/games-emulation/pcsx2/pcsx2-9999.ebuild
+++ b/games-emulation/pcsx2/pcsx2-9999.ebuild
@@ -9,16 +9,12 @@ inherit cmake fcaps flag-o-matic git-r3 toolchain-funcs wxwidgets
DESCRIPTION="A PlayStation 2 emulator"
HOMEPAGE="https://pcsx2.net/"
EGIT_REPO_URI="https://github.com/PCSX2/${PN}.git"
-EGIT_SUBMODULES=(
- # TODO: unbundle
- 3rdparty/cubeb/cubeb
- 3rdparty/libchdr/libchdr
-)
+EGIT_SUBMODULES=()
-LICENSE="GPL-3 BSD ISC"
+LICENSE="GPL-3"
SLOT="0"
KEYWORDS=""
-IUSE="test"
+IUSE="pulseaudio test"
RESTRICT="!test? ( test )"
@@ -27,16 +23,17 @@ RDEPEND="
dev-cpp/rapidyaml:=
dev-libs/glib:2
dev-libs/libaio
+ dev-libs/libchdr
>=dev-libs/libfmt-7.1.3:=
dev-libs/libxml2:2
media-libs/alsa-lib
+ media-libs/cubeb
media-libs/freetype
media-libs/libglvnd
media-libs/libpng:=
media-libs/libsamplerate
media-libs/libsdl2[haptic,joystick,sound]
media-libs/libsoundtouch:=
- media-sound/pulseaudio
net-libs/libpcap
sys-libs/zlib
virtual/libudev:=
@@ -46,6 +43,7 @@ RDEPEND="
x11-libs/libX11
x11-libs/libXext
x11-libs/wxGTK:${WX_GTK_VER}[X]
+ pulseaudio? ( media-sound/pulseaudio )
"
DEPEND="
${RDEPEND}
@@ -66,6 +64,19 @@ pkg_setup() {
fi
}
+src_prepare() {
+ cmake_src_prepare
+
+ # unbundle, use sed over patch for less chances to break -9999
+ sed -e '/add_subdir.*cubeb/c\find_package(cubeb REQUIRED)' \
+ -e '/add_subdir.*libchdr/c\pkg_check_modules(chdr REQUIRED IMPORTED_TARGET libchdr)' \
+ -i cmake/SearchForStuff.cmake || die
+ sed -i 's/chdr-static/PkgConfig::chdr/' pcsx2/CMakeLists.txt || die
+
+ # pulseaudio is only used for usb-mic, not audio output
+ use pulseaudio || > cmake/FindPulseAudio.cmake || die
+}
+
src_configure() {
# Build with ld.gold fails
# https://github.com/PCSX2/pcsx2/issues/1671