package/libsoxr: drop ffmpeg support
PATCH 1/3 package/libsoxr: drop ffmpeg support
Having support for ffmpeg in libsoxr causes several circular dependencies:
- pulseaudio -> libsoxr -> ffmpeg -> pulseaudio
(This one was worked around in fecc337d21f337a30ef7f9f448683d99c01fc245 by dropping the ffmpeg -> pulseaudio dependency, but it's annoying as being able to output audio from ffmpeg into pulseaudio seems useful)
- libopenmpt -> pulseaudio -> libsoxr -> ffmpeg -> libopenmpt
(This is one exists, and is fixed by this commit)
To fix both circular dependencies, we propose to drop the dependency of libsoxr on ffmpeg, which is used to get some optimized FFT implementation. While not being useless, this is the point where breaking the dependency seems the most logical.
Neither Debian nor Fedora build libsoxr with ffmpeg support.
In order to achieve that, we add a new patch making the option WITH_AVFFT actually effective. Since we no longer build against ffmpeg, the previously added patch that was fixing the pkg-config file is no longer needed.
Fixes:
https://autobuild.buildroot.net/results/bbfce69f35cafd56245ebeae79086a8b64592a16/
--- .checkpackageignore | 1 - ...-Add-Libs.private-for-static-linking.patch | 43 ------------------- ...llow-building-without-ffmpeg-support.patch | 33 ++++++++++++++ package/libsoxr/libsoxr.mk | 6 +-- 4 files changed, 34 insertions(+), 49 deletions(-) delete mode 100644 package/libsoxr/0001-Add-Libs.private-for-static-linking.patch create mode 100644 package/libsoxr/0001-CMakeLists.txt-allow-building-without-ffmpeg-support.patch
.checkpackageignore +0 -1
@@ -647,7 +647,6 @@ package/libsigrok/0001-Support-glibmm-2.68.patch lib_patch.Upstream package/libsigrokdecode/0001-configure-ac-Add-support-for-Python-3-9.patch lib_patch.Upstream package/libsigrokdecode/0002-configure-Add-python-3-10-support.patch lib_patch.Upstream package/libsigrokdecode/0003-configure-ac-Use-python3-embed-pc-as-a-fallback.patch lib_patch.Upstream -package/libsoxr/0001-Add-Libs.private-for-static-linking.patch lib_patch.Upstream package/libspatialindex/0001-allow-building-static-libs.patch lib_patch.Upstream package/libspatialindex/0002-CMakeLists.txt-fix-CMAKE_BUILD_TYPE.patch lib_patch.Upstream package/libsquish/0001-Makefile-add-f-option-for-ln-to-remove-existing-dest.patch lib_patch.Upstream
package/libsoxr/0001-Add-Libs.private-for-static-linking.patch deleted +0 -43
43 lines not on this page · raw message
package/libsoxr/0001-CMakeLists.txt-allow-building-without-ffmpeg-support.patch new file +33 -0
@@ -0,0 +1,33 @@ +From 2592f0d38826e8db3603ce1535d82ab427ac73bc Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <[email protected]> +Date: Thu, 28 Aug 2025 18:11:13 +0200 +Subject: [PATCH] CMakeLists.txt: allow building without ffmpeg support + +The ffmpeg support is optional, but is automatically pulled in (if +available) on ARM with SIMD, even when WITH_AVFFT is disabled. + +Instead, ensure WITH_AVFFT does its job, which is to allow disabling +ffmpeg usage if not desired. + +Upstream: https://github.com/chirlu/soxr/pull/16 +Signed-off-by: Thomas Petazzoni <[email protected]> +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ee48f6c..48f91f1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -134,7 +134,7 @@ if (WITH_AVFFT) + endif () + endif () + +-if (WITH_AVFFT OR (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" AND SIMD32_FOUND AND WITH_CR32)) ++if (WITH_AVFFT AND (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" AND SIMD32_FOUND AND WITH_CR32)) + find_package (LibAVUtil) + if (AVUTIL_FOUND) + include_directories (${AVUTIL_INCLUDE_DIRS}) +-- +2.50.1 +
package/libsoxr/libsoxr.mk +1 -5
@@ -10,7 +10,7 @@ LIBSOXR_SITE = http://downloads.sourceforge.net/project/soxr LIBSOXR_LICENSE = LGPL-2.1+ LIBSOXR_LICENSE_FILES = LICENCE COPYING.LGPL LIBSOXR_INSTALL_STAGING = YES -LIBSOXR_CONF_OPTS = -DWITH_OPENMP=OFF +LIBSOXR_CONF_OPTS = -DWITH_OPENMP=OFF -DWITH_AVFFT=OFF ifeq ($(call qstrip,$(BR2_ENDIAN)),BIG) LIBSOXR_CONF_OPTS += -DHAVE_WORDS_BIGENDIAN=1
@@ -18,8 +18,4 @@ else LIBSOXR_CONF_OPTS += -DHAVE_WORDS_BIGENDIAN=0 endif -ifeq ($(BR2_PACKAGE_FFMPEG),y) -LIBSOXR_DEPENDENCIES += ffmpeg -endif - $(eval $(cmake-package))
Signature · 6 lines
2.50.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/3 Reapply "package/ffmpeg: add support for pulseaudio"
This reverts commit fecc337d21f337a30ef7f9f448683d99c01fc245, re-adding optional support for pulseuadio in ffmpeg.
This is possible now that the circular dependency:
pulseaudio -> libsoxr -> ffmpeg -> pulseaudio
has been broken between libsoxr and ffmpeg.
--- package/ffmpeg/ffmpeg.mk | 7 +++++++ 1 file changed, 7 insertions(+)
package/ffmpeg/ffmpeg.mk +7 -0
@@ -94,6 +94,13 @@ else FFMPEG_CONF_OPTS += --disable-libjack endif +ifeq ($(BR2_PACKAGE_PULSEAUDIO),y) +FFMPEG_DEPENDENCIES += pulseaudio +FFMPEG_CONF_OPTS += --enable-libpulse +else +FFMPEG_CONF_OPTS += --disable-libpulse +endif + ifeq ($(BR2_PACKAGE_LIBV4L),y) FFMPEG_DEPENDENCIES += libv4l FFMPEG_CONF_OPTS += --enable-libv4l2
Signature · 6 lines
2.50.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/3] Reapply "package/ffmpeg: add support for pulseaudio"
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni via buildroot <[email protected]> writes:
This reverts commit
fecc337d21f337a30ef7f9f448683d99c01fc245, re-adding optional support for pulseuadio in ffmpeg.
Quoted 7 lines
This is possible now that the circular dependency:
pulseaudio -> libsoxr -> ffmpeg -> pulseaudio
has been broken between libsoxr and ffmpeg.
Signed-off-by Thomas Petazzoni <[email protected]>
Committed, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 3/3 package/ffmpeg: add optional support for libsoxr
In reply to Thomas Petazzoni via buildrootNow that libsoxr no longer depends on ffmpeg, we can actually use libsoxr in ffmpeg.
See:
https://trac.ffmpeg.org/wiki/FFmpeg%20and%20the%20SoX%20Resampler
for some details.
--- package/ffmpeg/ffmpeg.mk | 7 +++++++ 1 file changed, 7 insertions(+)
package/ffmpeg/ffmpeg.mk +7 -0
@@ -378,6 +378,13 @@ else FFMPEG_CONF_OPTS += --disable-libopenmpt endif +ifeq ($(BR2_PACKAGE_LIBSOXR),y) +FFMPEG_CONF_OPTS += --enable-libsoxr +FFMPEG_DEPENDENCIES += libsoxr +else +FFMPEG_CONF_OPTS += --disable-libsoxr +endif + ifeq ($(BR2_PACKAGE_SPEEX),y) FFMPEG_CONF_OPTS += --enable-libspeex FFMPEG_DEPENDENCIES += speex
Signature · 6 lines
2.50.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 3/3] package/ffmpeg: add optional support for libsoxr
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni via buildroot <[email protected]> writes:
Now that libsoxr no longer depends on ffmpeg, we can actually use libsoxr in ffmpeg.
Quoted 7 lines
See:
https://trac.ffmpeg.org/wiki/FFmpeg%20and%20the%20SoX%20Resampler
for some details.
Signed-off-by Thomas Petazzoni <[email protected]>
Committed, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 28 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni via buildroot <[email protected]> writes:
Having support for ffmpeg in libsoxr causes several circular dependencies:
- pulseaudio -> libsoxr -> ffmpeg -> pulseaudio
(This one was worked around in
fecc337d21f337a30ef7f9f448683d99c01fc245by dropping the ffmpeg -> pulseaudio dependency, but it's annoying as being able to output audio from ffmpeg into pulseaudio seems useful)- libopenmpt -> pulseaudio -> libsoxr -> ffmpeg -> libopenmpt
(This is one exists, and is fixed by this commit)
To fix both circular dependencies, we propose to drop the dependency of libsoxr on ffmpeg, which is used to get some optimized FFT implementation. While not being useless, this is the point where breaking the dependency seems the most logical.
Neither Debian nor Fedora build libsoxr with ffmpeg support.
In order to achieve that, we add a new patch making the option
WITH_AVFFTactually effective. Since we no longer build against ffmpeg, the previously added patch that was fixing the pkg-config file is no longer needed.
Quoted 5 lines
Fixes:
https://autobuild.buildroot.net/results/bbfce69f35cafd56245ebeae79086a8b64592a16/
Signed-off-by Thomas Petazzoni <[email protected]>
Committed, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot