Source: openal-soft
Version: 1:1.24.2-2
Severity: normal
Tags: patch fixed-upstream ftbfs
Forwarded: https://github.com/kcat/openal-soft/issues/1165

openal-soft fails to build from source if libsdl3-dev happens to be
installed (see upstream issue report for a full reproducer). I'm reporting
this as low-severity, since official buildds work in a minimal environment.

The attached patches fix the build in my environment (a Debian testing
derivative that has libsdl3-dev preinstalled, namely a possible future
branch of the Steam Runtime).

Thanks,
    smcv
>From 478723e4989c0bab1e70e2aba31101547588767b Mon Sep 17 00:00:00 2001
From: Simon McVittie <[email protected]>
Date: Wed, 20 Aug 2025 14:42:17 +0100
Subject: [PATCH] d/rules: Update the spelling of the option that disables
 examples

---
 debian/rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index 7d25785d2..42e57132b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -21,8 +21,8 @@ endif
 # Use this variable to allow options passed to cmake to be overridable
 DEB_CMAKE_OPTIONS ?= -DCMAKE_VERBOSE_MAKEFILE=ON \
 		-DALSOFT_BACKEND_SNDIO=OFF \
+		-DALSOFT_EXAMPLES=OFF \
 		-DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" \
-		-DEXAMPLES=OFF \
 		..
 
 ifeq ($(DEB_HOST_ARCH_CPU),i386)
-- 
2.39.5

>From 0bb9b8d8b75709fe9d0da5c0982020526d99948d Mon Sep 17 00:00:00 2001
From: Simon McVittie <[email protected]>
Date: Wed, 20 Aug 2025 14:43:36 +0100
Subject: [PATCH] d/patches: Add patch from upstream to fix FTBFS in a
 non-minimal environment

Disabling the examples didn't disable all of the checks for their
dependencies, and the check for ffmpeg wasn't quite right. Removing
the automagic dependency altogether seems better than fixing the check,
since it also makes the package's build more deterministic.
---
 ...r-ffmpeg-if-ALSOFT_EXAMPLES-is-false.patch | 26 +++++++++++++++++++
 debian/patches/series                         |  1 +
 2 files changed, 27 insertions(+)
 create mode 100644 debian/patches/Don-t-check-for-ffmpeg-if-ALSOFT_EXAMPLES-is-false.patch
 create mode 100644 debian/patches/series

diff --git a/debian/patches/Don-t-check-for-ffmpeg-if-ALSOFT_EXAMPLES-is-false.patch b/debian/patches/Don-t-check-for-ffmpeg-if-ALSOFT_EXAMPLES-is-false.patch
new file mode 100644
index 000000000..84de3e0cd
--- /dev/null
+++ b/debian/patches/Don-t-check-for-ffmpeg-if-ALSOFT_EXAMPLES-is-false.patch
@@ -0,0 +1,26 @@
+From: Chris Robinson <[email protected]>
+Date: Wed, 12 Feb 2025 03:31:14 -0800
+Subject: Don't check for ffmpeg if ALSOFT_EXAMPLES is false
+
+Origin: upstream, commit:https://github.com/kcat/openal-soft/commit/eb2b8b8e474c161794bb1c5a0590548d3f27c237
+---
+ CMakeLists.txt | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b85a7e8..d59cb76 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1316,9 +1316,9 @@ if(ALSOFT_UTILS)
+ endif()
+ if(ALSOFT_UTILS OR ALSOFT_EXAMPLES)
+     find_package(SndFile)
+-    if(SDL3_FOUND)
+-        find_package(FFmpeg COMPONENTS AVFORMAT AVCODEC AVUTIL SWSCALE SWRESAMPLE)
+-    endif()
++endif()
++if(ALSOFT_EXAMPLES AND SDL3_FOUND)
++    find_package(FFmpeg COMPONENTS AVFORMAT AVCODEC AVUTIL SWSCALE SWRESAMPLE)
+ endif()
+ 
+ if(NOT WIN32)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 000000000..240159cea
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+Don-t-check-for-ffmpeg-if-ALSOFT_EXAMPLES-is-false.patch
-- 
2.39.5

Reply via email to