package/shairport-sync: fix static build with soxr
PATCH v2 1/1 package/shairport-sync: fix static build with soxr
Commit 4a28f22383f07b7ea96ee1d63ee2fbeadaec5444 "package/shairport-sync: bump to version 3.2.2", wrongly removed first and second patches so add them back to fix static build with soxr. Indeed, these patches were only merged in version 3.3.
Fixes:
- http://autobuild.buildroot.org/results/7edc8f8bafdc9982f8f35e171010227d6b00da46
---
Changes v1 -> v2:
- Add URL to autobuilder failure
...ibsoxr-is-built-to-rely-on-libavutil.patch | 40 +++++++++++++++++++ ...f-HAVE_LIBSOXR-with-using-pkg_config.patch | 24 +++++++++++ 2 files changed, 64 insertions(+) create mode 100644 package/shairport-sync/0001-Sometimes-libsoxr-is-built-to-rely-on-libavutil.patch create mode 100644 package/shairport-sync/0002-Include-a-definition-of-HAVE_LIBSOXR-with-using-pkg_config.patch
package/shairport-sync/0001-Sometimes-libsoxr-is-built-to-rely-on-libavutil.patch new file +40 -0
@@ -0,0 +1,40 @@ +From 5101ab2d13e2b89ea3c1276df5fb7413634eeccd Mon Sep 17 00:00:00 2001 +From: Mike Brady <[email protected]> +Date: Sat, 25 Aug 2018 13:08:37 +0100 +Subject: [PATCH] Sometimes libsoxr is built to rely on libavutil. If libavutil + is detected, link to it when building libsoxr. Add pgk_config support to soxr + selection. + +[Retrieved from: +https://github.com/mikebrady/shairport-sync/commit/5101ab2d13e2b89ea3c1276df5fb7413634eeccd] +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + configure.ac | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 0c917a43..2b6fddb3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -176,7 +176,20 @@ AC_ARG_WITH(ssl, [ choose --with-ssl=openssl, --with-ssl=mbedtls or --with-ssl=p + # Look for soxr flag + AC_ARG_WITH(soxr, [ --with-soxr = choose libsoxr for high-quality interpolation], [ + AC_MSG_RESULT(>>Including support for soxr-based interpolation) +- AC_CHECK_LIB([soxr],[soxr_create], , AC_MSG_ERROR(soxr support requested but libsoxr not found!))], ) ++ if test "x${with_pkg_config}" = xyes ; then ++ PKG_CHECK_MODULES( ++ [SOXR], [soxr], ++ [LIBS="${SOXR_LIBS} ${LIBS}"]) ++ else ++ AC_CHECK_LIB([avutil],[av_get_cpu_flags]) ++ if test "x${ac_cv_lib_avutil_av_get_cpu_flags}" = xyes ; then ++ # soxr may link against libavutil, depending on the architecture, but for the sake of simplicity link with it if it is found ++ AC_CHECK_LIB([soxr],[soxr_create], , AC_MSG_ERROR(soxr support requested but libsoxr not found!), [-lavutil]) ++ else ++ AC_CHECK_LIB([soxr],[soxr_create], , AC_MSG_ERROR(soxr support requested but libsoxr not found!)) ++ fi ++ fi ++], ) + + # Look for metadata flag -- set flag for conditional compilation + AC_ARG_WITH(metadata, [ --with-metadata = include support for a metadata feed], [
package/shairport-sync/0002-Include-a-definition-of-HAVE_LIBSOXR-with-using-pkg_config.patch new file +24 -0
@@ -0,0 +1,24 @@ +From cd6a99a7cfde1c5e1c1cc74ee6a77041bb4012d9 Mon Sep 17 00:00:00 2001 +From: Mike Brady <[email protected]> +Date: Sat, 8 Sep 2018 15:06:18 +0100 +Subject: [PATCH] Include a definition of HAVE_LIBSOXR with using pkg_config + +[Retrieved from: +https://github.com/mikebrady/shairport-sync/commit/cd6a99a7cfde1c5e1c1cc74ee6a77041bb4012d9] +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + configure.ac | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure.ac b/configure.ac +index ceec4af6..690a774f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -180,6 +180,7 @@ AC_ARG_WITH(soxr, [ --with-soxr = choose libsoxr for high-quality interpolation + PKG_CHECK_MODULES( + [SOXR], [soxr], + [LIBS="${SOXR_LIBS} ${LIBS}"]) ++ AC_DEFINE([HAVE_LIBSOXR],[1],[Define to 1 if you are including support for soxr interpolation]) + else + AC_CHECK_LIB([avutil],[av_get_cpu_flags]) + if test "x${ac_cv_lib_avutil_av_get_cpu_flags}" = xyes ; then
Signature · 1 line
2.23.0.rc1
PATCH v2 1/1 package/shairport-sync: fix static build with soxr
Fabrice, All,
On 2019-08-30 20:51 +0200, Fabrice Fontaine spake thusly:
Quoted 9 lines
Commit
4a28f22383f07b7ea96ee1d63ee2fbeadaec5444"package/shairport-sync: bump to version 3.2.2", wrongly removed first and second patches so add them back to fix static build with soxr. Indeed, these patches were only merged in version 3.3.Fixes:
- http://autobuild.buildroot.org/results/7edc8f8bafdc9982f8f35e171010227d6b00da46Signed-off-by Fabrice Fontaine <[email protected]>
Sorry for being late at the party, but this has been superseded by a recent bump to 3.3.2, which includes those changes.
Thanks you!
Regards,
Yann E. MORIN.
Quoted 93 lines
---
Changes v1 -> v2:
- Add URL to autobuilder failure...ibsoxr-is-built-to-rely-on-libavutil.patch | 40 +++++++++++++++++++ ...f-HAVE_LIBSOXR-with-using-pkg_config.patch | 24 +++++++++++ 2 files changed, 64 insertions(+) create mode 100644 package/shairport-sync/0001-Sometimes-libsoxr-is-built-to-rely-on-libavutil.patch create mode 100644 package/shairport-sync/0002-Include-a-definition-of-HAVE_LIBSOXR-with-using-pkg_config.patchpackage/shairport-sync/0001-Sometimes-libsoxr-is-built-to-rely-on-libavutil.patch new file +40
-0@@ -0,0 +1,40 @@ +From 5101ab2d13e2b89ea3c1276df5fb7413634eeccd Mon Sep 17 00:00:00 2001 +From: Mike Brady <[email protected]> +Date: Sat, 25 Aug 2018 13:08:37 +0100 +Subject: [PATCH] Sometimes libsoxr is built to rely on libavutil. If libavutil + is detected, link to it when building libsoxr. Add pgk_config support to soxr + selection. + +[Retrieved from: +https://github.com/mikebrady/shairport-sync/commit/5101ab2d13e2b89ea3c1276df5fb7413634eeccd] +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + configure.ac | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 0c917a43..2b6fddb3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -176,7 +176,20 @@ AC_ARG_WITH(ssl, [ choose --with-ssl=openssl, --with-ssl=mbedtls or --with-ssl=p + # Look for soxr flag + AC_ARG_WITH(soxr, [ --with-soxr = choose libsoxr for high-quality interpolation], [ + AC_MSG_RESULT(>>Including support for soxr-based interpolation) +- AC_CHECK_LIB([soxr],[soxr_create], , AC_MSG_ERROR(soxr support requested but libsoxr not found!))], ) ++ if test "x${with_pkg_config}" = xyes ; then ++ PKG_CHECK_MODULES( ++ [SOXR], [soxr], ++ [LIBS="${SOXR_LIBS} ${LIBS}"]) ++ else ++ AC_CHECK_LIB([avutil],[av_get_cpu_flags]) ++ if test "x${ac_cv_lib_avutil_av_get_cpu_flags}" = xyes ; then ++ # soxr may link against libavutil, depending on the architecture, but for the sake of simplicity link with it if it is found ++ AC_CHECK_LIB([soxr],[soxr_create], , AC_MSG_ERROR(soxr support requested but libsoxr not found!), [-lavutil]) ++ else ++ AC_CHECK_LIB([soxr],[soxr_create], , AC_MSG_ERROR(soxr support requested but libsoxr not found!)) ++ fi ++ fi ++], ) + + # Look for metadata flag -- set flag for conditional compilation + AC_ARG_WITH(metadata, [ --with-metadata = include support for a metadata feed], [package/shairport-sync/0002-Include-a-definition-of-HAVE_LIBSOXR-with-using-pkg_config.patch new file +24
-0@@ -0,0 +1,24 @@ +From cd6a99a7cfde1c5e1c1cc74ee6a77041bb4012d9 Mon Sep 17 00:00:00 2001 +From: Mike Brady <[email protected]> +Date: Sat, 8 Sep 2018 15:06:18 +0100 +Subject: [PATCH] Include a definition of HAVE_LIBSOXR with using pkg_config + +[Retrieved from: +https://github.com/mikebrady/shairport-sync/commit/cd6a99a7cfde1c5e1c1cc74ee6a77041bb4012d9] +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + configure.ac | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure.ac b/configure.ac +index ceec4af6..690a774f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -180,6 +180,7 @@ AC_ARG_WITH(soxr, [ --with-soxr = choose libsoxr for high-quality interpolation + PKG_CHECK_MODULES( + [SOXR], [soxr], + [LIBS="${SOXR_LIBS} ${LIBS}"]) ++ AC_DEFINE([HAVE_LIBSOXR],[1],[Define to 1 if you are including support for soxr interpolation]) + else + AC_CHECK_LIB([avutil],[av_get_cpu_flags]) + if test "x${ac_cv_lib_avutil_av_get_cpu_flags}" = xyes ; thenSignature · 6 lines
2.23.0.rc1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'