games-emulation/RetroArch: fix build failure with USE=-pipewire

Closes: https://bugs.gentoo.org/960043
Signed-off-by: Takuya Wakazono <pastalian46@gmail.com>
This commit is contained in:
Takuya Wakazono
2025-08-10 23:01:07 +09:00
parent fd7356a2a0
commit 7074645b1d
2 changed files with 22 additions and 0 deletions

View File

@@ -83,6 +83,10 @@ BDEPEND="
wayland? ( dev-util/wayland-scanner )
"
PATCHES=(
"${FILESDIR}/${P}-fix-no-pipewire-build.patch"
)
src_configure() {
if use cg; then
append-ldflags -L"${EPREFIX}/"opt/nvidia-cg-toolkit/$(get_libdir)

View File

@@ -0,0 +1,18 @@
https://github.com/libretro/RetroArch/commit/3162b6a4386cee72af5539849d24a35cfe7652a2
https://bugs.gentoo.org/960043
Fix build with disable-pipewire on systems with pipewire installed
On systems where pipewire is installed but the build is configured with
--disable-pipewire, HAVE_PIPEWIRE_STABLE is set to 1 while HAVE_PIPEWIRE
is 0. Checking only HAVE_PIPEWIRE_STABLE leads to a build failure.
--- a/camera/camera_driver.c
+++ b/camera/camera_driver.c
@@ -55,7 +55,7 @@ const camera_driver_t *camera_drivers[] = {
#ifdef HAVE_V4L2
&camera_v4l2,
#endif
-#ifdef HAVE_PIPEWIRE_STABLE
+#if defined(HAVE_PIPEWIRE) && defined(HAVE_PIPEWIRE_STABLE)
&camera_pipewire,
#endif
#ifdef EMSCRIPTEN