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
  fecc337d21 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/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Thomas Petazzoni
2025-08-28 19:41:50 +02:00
committed by Peter Korsgaard
parent d5a45fd443
commit 4bf2a854f9
4 changed files with 34 additions and 49 deletions

View File

@@ -651,7 +651,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

View File

@@ -1,43 +0,0 @@
From 7d2d1039f303b6322ecb72eebae39b699fd28d19 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
Date: Fri, 22 Feb 2019 01:31:11 +0100
Subject: [PATCH] Add Libs.private in soxr.pc.in for static linking
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
If libsoxr is build statically against libavutil other applications
needs to know that they must link with `-lavutil` when building in a
static context.
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
---
CMakeLists.txt | 1 +
src/soxr.pc.in | 1 +
2 files changed, 2 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ee48f6c..714bd4d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -139,6 +139,7 @@ if (WITH_AVFFT OR (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" AND SIMD32_FOUND AND WI
if (AVUTIL_FOUND)
include_directories (${AVUTIL_INCLUDE_DIRS})
set (LIBS ${LIBS} ${AVUTIL_LIBRARIES})
+ set (PKGCONF_LIBS_PRIV ${PKGCONF_LIBS_PRIV} -lavutil)
endif ()
endif ()
diff --git a/src/soxr.pc.in b/src/soxr.pc.in
index 69d225b..6c530a6 100644
--- a/src/soxr.pc.in
+++ b/src/soxr.pc.in
@@ -2,4 +2,5 @@ Name: ${PROJECT_NAME}
Description: ${DESCRIPTION_SUMMARY}
Version: ${PROJECT_VERSION}
Libs: -L${LIB_INSTALL_DIR} -l${PROJECT_NAME}
+Libs.private: ${PKGCONF_LIBS_PRIV}
Cflags: -I${INCLUDE_INSTALL_DIR}
--
2.20.1

View File

@@ -0,0 +1,33 @@
From 2592f0d38826e8db3603ce1535d82ab427ac73bc Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
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 <thomas.petazzoni@bootlin.com>
---
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

View File

@@ -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))