package/mpd: bump to version 0.21.7
v3 cover package/mpd: bump to version 0.21.7
MPD switched from Autotools to the Meson build system. This is not really a big deal except that the Qobuz plugin depends on libgcrypt.
The issue is, that libgcrypt version 1.8.4 only provides its own config file libgcrypt-config instead of a pkg-config file. Every custom config file needs to be added to the [binary] section in the cross-compilation.conf file, so that Meson correctly detects the path for the custom config file instead of using the one find in PATH, which directs to the host.
v1 of bumping mpd to the 0.21 version added libgcrypt-config to the cross-compilation.conf.in file which has the drawback, that this variable is creeping into the global cross-compilation file.
v2 added the staging path early to PATH, which is not a wise idea, because $(STAGING_DIR)/usr/bin contains binaries compiled for the target.
There was an ongoing discussion, how to add support to the meson infrastructure to allow adding entries to the [binaries] section on the per-package cross-compilation file. It turned out, that the current meson infrastructure needs some changes to support adding multi-line entries.
v3 does not try to fix the meson build infrastructure, but adds an upstream patch to libgcrypt to provide a pkg-config file. pkg-config files are preferred over custom config files and meson will correctly detect libgcrypt without changing the meson infrastructure. This makes bumping mpd to the 0.21.x version branch much easier.
Note, that meanwhile mpd released version 0.21.11. As soon as this series is applied, a follow up patch will bump mpd to the latest version.
J?rg Krause (3):
package/libgcrypt: replace reconfigure patch with upstream patch package/libgcrypt: add upstream patch to add pkg-config file package/mpd: bump to version 0.21.7
...ult-to-underscore-yes-for-cross-buil.patch | 48 +++++ package/libgcrypt/0001-reconfigure.patch | 27 --- ...-libgcrypt.pc-generated-by-configure.patch | 102 ++++++++++ package/libgcrypt/libgcrypt.mk | 5 +- ...gure.ac-check-if-libatomic-is-needed.patch | 40 ---- package/mpd/Config.in | 29 ++- package/mpd/mpd.hash | 2 +- package/mpd/mpd.mk | 176 +++++++++--------- 8 files changed, 270 insertions(+), 159 deletions(-) create mode 100644 package/libgcrypt/0001-build-Don-t-default-to-underscore-yes-for-cross-buil.patch delete mode 100644 package/libgcrypt/0001-reconfigure.patch create mode 100644 package/libgcrypt/0002-build-Provide-libgcrypt.pc-generated-by-configure.patch delete mode 100644 package/mpd/0001-configure.ac-check-if-libatomic-is-needed.patch
Signature · 1 line
2.22.0
PATCH v3 1/3 package/libgcrypt: replace reconfigure patch with upstream patch
The ac_cv_sys_symbol_underscore reconfigure patch was added to Buildroot back in 2007 [1], but was not reported to upstream back then.
Meanwhile, the issue has been fixed upstream [2] after the version bump to version 1.8.4.
In order to add another upstream patch, which will add a pkg-config file for libgrypt and therefore requires autoreconfiguration as well, replace the current patch with the upstream patch.
[1] https://git.buildroot.net/buildroot/commit/package/libgcrypt?id=f1bcdf518fa7868b7819b0248f4b8da02a954dde
[2] https://github.com/gpg/libgcrypt/commit/0f4545b441b6fbdd6e9c4e95f5f2a367483e78ad
--- ...ult-to-underscore-yes-for-cross-buil.patch | 48 +++++++++++++++++++ package/libgcrypt/0001-reconfigure.patch | 27 ----------- package/libgcrypt/libgcrypt.mk | 4 +- 3 files changed, 50 insertions(+), 29 deletions(-) create mode 100644 package/libgcrypt/0001-build-Don-t-default-to-underscore-yes-for-cross-buil.patch delete mode 100644 package/libgcrypt/0001-reconfigure.patch
package/libgcrypt/0001-build-Don-t-default-to-underscore-yes-for-cross-buil.patch new file +48 -0
@@ -0,0 +1,48 @@ +From 7fec3ac22efb86fce90a9edc5696e16ee88a65c7 Mon Sep 17 00:00:00 2001 +From: NIIBE Yutaka <[email protected]> +Date: Wed, 24 Oct 2018 14:29:45 +0900 +Subject: [PATCH] build: Don't default to underscore=yes for cross-build. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* acinclude.m4: Don't set ac_cv_sys_symbol_underscore +for cross build. + +-- + +It made sense in the past when cross compile were basically for a.out +system, but nowadays, it's better not to assume that. + +Fetched from: 0f4545b441b6fbdd6e9c4e95f5f2a367483e78ad + +Signed-off-by: NIIBE Yutaka <[email protected]> +Signed-off-by: J?rg Krause <[email protected]> +--- + acinclude.m4 | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/acinclude.m4 b/acinclude.m4 +index fc208c53..6f7789d0 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -111,14 +111,10 @@ case "${host}" in + ac_cv_sys_symbol_underscore=yes + ;; + *) +- if test "$cross_compiling" = yes; then +- if test "x$ac_cv_sys_symbol_underscore" = x ; then +- ac_cv_sys_symbol_underscore=yes +- fi +- else ++ if test "$cross_compiling" != yes; then + tmp_do_check="yes" + fi +- ;; ++ ;; + esac + if test "$tmp_do_check" = "yes"; then + AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) +-- +2.22.0 +
package/libgcrypt/0001-reconfigure.patch deleted +0 -27
@@ -1,27 +0,0 @@ -diff --git a/configure b/configure -index 70a6d50..8f55d95 100755 ---- a/configure -+++ b/configure -@@ -22306,14 +22306,15 @@ case "${host}" in - i386-emx-os2 | i345686-pc-os2*emx | i386-pc-msdosdjgpp) - ac_cv_sys_symbol_underscore=yes - ;; -- *) -- if test "$cross_compiling" = yes; then -- if test "x$ac_cv_sys_symbol_underscore" = x ; then -- ac_cv_sys_symbol_underscore=yes -+ *)if test -z "$ac_cv_sys_symbol_underscore";then -+ if test "$cross_compiling" = yes; then -+ if test "x$ac_cv_sys_symbol_underscore" = x ; then -+ ac_cv_sys_symbol_underscore=yes -+ fi -+ else -+ tmp_do_check="yes" -+ fi - fi -- else -- tmp_do_check="yes" -- fi - ;; - esac - if test "$tmp_do_check" = "yes"; then
package/libgcrypt/libgcrypt.mk +2 -2
@@ -13,8 +13,8 @@ LIBGCRYPT_INSTALL_STAGING = YES LIBGCRYPT_DEPENDENCIES = libgpg-error LIBGCRYPT_CONFIG_SCRIPTS = libgcrypt-config -LIBGCRYPT_CONF_ENV = \ - ac_cv_sys_symbol_underscore=no +# Patching acinclude.m4 in 0001 +LIBGCRYPT_AUTORECONF = YES LIBGCRYPT_CONF_OPTS = \ --with-gpg-error-prefix=$(STAGING_DIR)/usr
Signature · 1 line
2.22.0
PATCH v3 2/3 package/libgcrypt: add upstream patch to add pkg-config file
In reply to Jörg Krauselibgrypt provides a config file libgcrypt-config. After the version bump to 1.8.4 upstream added a pkg-config file as well [1].
Using the pkg-config file is preferred over using the package provided config file. For example, the Meson build system requires that for every special config file an entry is added to the [binary] section in the cross-compilation.conf file, otherwise it will use the config file found in PATH. This is bad when cross-compiling as PATH will include pathes to the host and therefore Meson will wrongly use the host config file.
To simplify using libgcrypt for packages using the meson infrastructure lets add the pkg-config file.
[1] https://github.com/gpg/libgcrypt/commit/97194b422bc89a6137f4e218d4cdee118c63e96e
--- ...-libgcrypt.pc-generated-by-configure.patch | 102 ++++++++++++++++++ package/libgcrypt/libgcrypt.mk | 1 + 2 files changed, 103 insertions(+) create mode 100644 package/libgcrypt/0002-build-Provide-libgcrypt.pc-generated-by-configure.patch
package/libgcrypt/0002-build-Provide-libgcrypt.pc-generated-by-configure.patch new file +102 -0
@@ -0,0 +1,102 @@ +From ef6f53ae7f9938a672f96c0c43707bc808c78221 Mon Sep 17 00:00:00 2001 +From: NIIBE Yutaka <[email protected]> +Date: Wed, 24 Oct 2018 14:57:53 +0900 +Subject: [PATCH] build: Provide libgcrypt.pc, generated by configure. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* configure.ac: Generate src/libgcrypt.pc. +* src/Makefile.am (pkgconfigdir, pkgconfig_DATA): New. +(EXTRA_DIST): Add libgcrypt.pc.in. +* src/libgcrypt-config.in: Use @PACKAGE_VERSION at . +* src/libgcrypt.pc.in: New. + +Fetched from: 97194b422bc89a6137f4e218d4cdee118c63e96e + +Signed-off-by: NIIBE Yutaka <[email protected]> + +build: Fix libgcrypt.pc. + +* src/libgcrypt.pc.in: Fix typo. + +Fetched from: 0e071372fc0e6fed4a449955ed0789803ba5e709 + +Signed-off-by: NIIBE Yutaka <[email protected]> +Signed-off-by: J?rg Krause <[email protected]> +--- + configure.ac | 1 + + src/Makefile.am | 5 ++++- + src/libgcrypt-config.in | 2 +- + src/libgcrypt.pc.in | 17 +++++++++++++++++ + 4 files changed, 23 insertions(+), 2 deletions(-) + create mode 100644 src/libgcrypt.pc.in + +diff --git a/configure.ac b/configure.ac +index ce11162d..4e788714 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2613,6 +2613,7 @@ doc/Makefile + src/Makefile + src/gcrypt.h + src/libgcrypt-config ++src/libgcrypt.pc + src/versioninfo.rc + tests/Makefile + ]) +diff --git a/src/Makefile.am b/src/Makefile.am +index 3cc4a552..82d6e8a0 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -20,8 +20,11 @@ + + ## Process this file with automake to produce Makefile.in + ++pkgconfigdir = $(libdir)/pkgconfig ++pkgconfig_DATA = libgcrypt.pc ++ + EXTRA_DIST = libgcrypt-config.in libgcrypt.m4 libgcrypt.vers \ +- gcrypt.h.in libgcrypt.def ++ gcrypt.h.in libgcrypt.def libgcrypt.pc.in + + bin_SCRIPTS = libgcrypt-config + m4datadir = $(datadir)/aclocal +diff --git a/src/libgcrypt-config.in b/src/libgcrypt-config.in +index c052638c..f7a13afe 100644 +--- a/src/libgcrypt-config.in ++++ b/src/libgcrypt-config.in +@@ -14,7 +14,7 @@ + # General. + prefix="@prefix@" + exec_prefix="@exec_prefix@" +-version="@VERSION@" ++version="@PACKAGE_VERSION@" + includedir="@includedir@" + libdir="@libdir@" + gpg_error_libs="@GPG_ERROR_LIBS@" +diff --git a/src/libgcrypt.pc.in b/src/libgcrypt.pc.in +new file mode 100644 +index 00000000..ec68fa2d +--- /dev/null ++++ b/src/libgcrypt.pc.in +@@ -0,0 +1,17 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++includedir=@includedir@ ++libdir=@libdir@ ++host=@LIBGCRYPT_CONFIG_HOST@ ++api_version=@LIBGCRYPT_CONFIG_API_VERSION@ ++symmetric_ciphers="@LIBGCRYPT_CIPHERS@" ++asymmetric_ciphers="@LIBGCRYPT_PUBKEY_CIPHERS@" ++digests="@LIBGCRYPT_DIGESTS@" ++ ++Name: libgcrypt ++Description: General purpose cryptographic library ++Requires: gpg-error ++Version: @PACKAGE_VERSION@ ++Cflags: @LIBGCRYPT_CONFIG_CFLAGS@ ++Libs: @LIBGCRYPT_CONFIG_LIBS@ ++URL: https://www.gnupg.org/software/libgcrypt/index.html +-- +2.22.0 +
package/libgcrypt/libgcrypt.mk +1 -0
@@ -14,6 +14,7 @@ LIBGCRYPT_DEPENDENCIES = libgpg-error LIBGCRYPT_CONFIG_SCRIPTS = libgcrypt-config # Patching acinclude.m4 in 0001 +# Patching configure.ac and Makefile.am in 0002 LIBGCRYPT_AUTORECONF = YES LIBGCRYPT_CONF_OPTS = \ --with-gpg-error-prefix=$(STAGING_DIR)/usr
Signature · 1 line
2.22.0
PATCH 2/3 package/libgcrypt: add upstream patch to add pkg-config file
[snip]
Quoted 13 lines
package/libgcrypt/0002-build-Provide-libgcrypt.pc-generated-by-configure.patch new file +13
-0+From ef6f53ae7f9938a672f96c0c43707bc808c78221 Mon Sep 17 00:00:00 2001 +From: NIIBE Yutaka <[email protected]> +Date: Wed, 24 Oct 2018 14:57:53 +0900 +Subject: [PATCH] build: Provide libgcrypt.pc, generated by configure. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* configure.ac: Generate src/libgcrypt.pc. +* src/Makefile.am (pkgconfigdir, pkgconfig_DATA): New. +(EXTRA_DIST): Add libgcrypt.pc.in. +* src/libgcrypt-config.in: Use @PACKAGE_VERSION at . +* src/libgcrypt.pc.in: New.
package/libgcrypt/0002-build-Provide-libgcrypt.pc-generated-by-configure.patch line 23
Quoted 10 lines
package/libgcrypt/0002-build-Provide-libgcrypt.pc-generated-by-configure.patch new file +10
-0+ +Fetched from: 97194b422bc89a6137f4e218d4cdee118c63e96e + +Signed-off-by: NIIBE Yutaka <[email protected]> + +build: Fix libgcrypt.pc. + +* src/libgcrypt.pc.in: Fix typo. + +Fetched from: 0e071372fc0e6fed4a449955ed0789803ba5e709
These are two upstream patches. We prefer to have them as individual patches,
not squashed.
Regards,
Arnout
Quoted 3 lines
package/libgcrypt/0002-build-Provide-libgcrypt.pc-generated-by-configure.patch new file +3
-0+ +Signed-off-by: NIIBE Yutaka <[email protected]> +Signed-off-by: J?rg Krause <[email protected]>
[snip]
PATCH v3 3/3 package/mpd: bump to version 0.21.7
In reply to Jörg KrauseMPD changed from Autotools to the Meson build system.
Add config options for the qobuz and tidal plugins and group them together with the soundcloud plugin under "Commercial services".
---
v3:
* rebased on current master
* do not pass staging dir to PATH (as done in v2) [Thomas Petazonni]
* requires libcrypt patched to provide pkg-config file
* drop MPD_AUTORECONF
v2:
* do not add the libgrypt-config entry the Meson cross file, but pass the staging dir early through PATH, so that the fallback mechanism finds the libgcrypt-config program installed in the staging dir and not the one installed on the host [Thomas Petazonni]
--- ...gure.ac-check-if-libatomic-is-needed.patch | 40 ---- package/mpd/Config.in | 29 ++- package/mpd/mpd.hash | 2 +- package/mpd/mpd.mk | 176 +++++++++--------- 4 files changed, 117 insertions(+), 130 deletions(-) delete mode 100644 package/mpd/0001-configure.ac-check-if-libatomic-is-needed.patch
package/mpd/0001-configure.ac-check-if-libatomic-is-needed.patch deleted +0 -40
@@ -1,40 +0,0 @@ -From 8eaf14a17244aaf000b4d19e4fde4a637576939f Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni <[email protected]> -Date: Sun, 7 Feb 2016 21:40:47 +0100 -Subject: [PATCH] configure.ac: check if libatomic is needed - -The mpd source code uses the C++11 <atomic> functionality, which -internally is implemented using the __atomic_*() gcc built-ins. On -certain architectures, the __atomic_*() built-ins are implemented in -the libatomic library that comes with the rest of the gcc runtime. Due -to this, code using <atomic> might need to link against libatomic, -otherwise one hits build issues such as: - -GlobalEvents.cxx:(.text._ZN12GlobalEvents4EmitENS_5EventE+0x14): undefined reference to `__atomic_fetch_or_4' - -on an architecture like SPARC. - -To solve this, a configure.ac check is added to know if we need to -link against libatomic or not. - -Signed-off-by: Thomas Petazzoni <[email protected]> ---- - configure.ac | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 107b45a..8e6fab7 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -233,6 +233,8 @@ if test x$have_pthread_setname_np = xyes; then - AC_DEFINE(HAVE_PTHREAD_SETNAME_NP, 1, [Is pthread_setname_np() available?]) - fi - -+AC_SEARCH_LIBS([__atomic_load_4], [atomic]) -+ - dnl --------------------------------------------------------------------------- - dnl Event loop selection - dnl --------------------------------------------------------------------------- --- -2.6.4 -
package/mpd/Config.in +23 -6
@@ -34,6 +34,29 @@ config BR2_PACKAGE_MPD_SQLITE Enable sqlite database support. If you don't use sqlite it will use an ASCII database. +comment "Commercial services" + +config BR2_PACKAGE_MPD_QOBUZ + bool "qobuz" + select BR2_PACKAGE_MPD_CURL + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_YAJL + help + Play songs from the commercial streaming service Qobuz. + +config BR2_PACKAGE_MPD_SOUNDCLOUD + bool "soundcloud" + select BR2_PACKAGE_YAJL + help + Enable soundcloud.com playlist support. + +config BR2_PACKAGE_MPD_TIDAL + bool "tidal" + select BR2_PACKAGE_MPD_CURL + select BR2_PACKAGE_YAJL + help + Play songs from the commercial streaming service TIDAL. + comment "Converter plugins" config BR2_PACKAGE_MPD_LIBSAMPLERATE
@@ -217,12 +240,6 @@ config BR2_PACKAGE_MPD_LIBSMBCLIENT help Enable Samba support. -config BR2_PACKAGE_MPD_SOUNDCLOUD - bool "soundcloud" - select BR2_PACKAGE_YAJL - help - Enable soundcloud.com playlist support. - comment "Output plugins" config BR2_PACKAGE_MPD_ALSA
package/mpd/mpd.hash +1 -1
@@ -1,3 +1,3 @@ # Locally calculated after checking pgp signature -sha256 503e5f9f237290f568ff7956ab2f9aed563594bf749f19b8fe994fb21434afea mpd-0.20.23.tar.xz +sha256 512062bc529bee04d4ccfaa2c6e720afc85bb071e49850a096b5ed518b3b412c mpd-0.21.7.tar.xz sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING
package/mpd/mpd.mk +93 -83
376 lines not on this page · raw message
Signature · 1 line
2.22.0
PATCH v3 3/3 package/mpd: bump to version 0.21.7
Quoted 6 lines · J?rg Krause
MPD changed from Autotools to the Meson build system.
Add config options for the qobuz and tidal plugins and group them together with the soundcloud plugin under "Commercial services".
Signed-off-by J?rg Krause <[email protected]>
Is there any reason why you didn't do the bump to 0.21.11 already?
package/mpd/mpd.mk line 249
Quoted 6 lines
ifeq ($(BR2_PACKAGE_MPD_TREMOR),y)
MPD_DEPENDENCIES+= tremorpackage/mpd/mpd.mk +0
-4-# Help mpd to find tremor in static linking scenarios -MPD_CONF_ENV += \ - TREMOR_LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs vorbisidec`" -MPD_CONF_OPTS += --with-tremor=$(STAGING_DIR)/usr
I guess this is no longer needed because meson properly uses pkg-config. Have
you tested that?
Regards,
Arnout
Quoted 4 lines
package/mpd/mpd.mk +3
-0+MPD_CONF_OPTS += -Dtremor=enabled +else +MPD_CONF_OPTS += -Dtremor=disabled endif
PATCH v3 3/3 package/mpd: bump to version 0.21.7
Hi Arnout,
Quoted 4 lines · Arnout Vandecappelle
Quoted 2 lines · J?rg Krause
MPD changed from Autotools to the Meson build system.
Quoted 8 lines
Quoted 4 lines
Add config options for the qobuz and tidal plugins and group them together with the soundcloud plugin under "Commercial services".
Signed-off-by J?rg Krause <[email protected]>Is there any reason why you didn't do the bump to 0.21.11 already?
The only reason is that the patch was first proposed when version 0.21.7 was the most recent version back then. Shall I bump to version 0.21.11 instead (and change the commit message)?
Quoted 9 lines
package/mpd/mpd.mk line 249
Quoted 6 lines
ifeq ($(BR2_PACKAGE_MPD_TREMOR),y)
MPD_DEPENDENCIES+= tremorpackage/mpd/mpd.mk +0
-4-# Help mpd to find tremor in static linking scenarios -MPD_CONF_ENV += \ - TREMOR_LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs vorbisidec`" -MPD_CONF_OPTS += --with-tremor=$(STAGING_DIR)/usrI guess this is no longer needed because meson properly uses pkg-config. Have
you tested that?
You're right, this is no longer needed and can safely be removed.
J?rg
PATCH v3 3/3 package/mpd: bump to version 0.21.7
Quoted 12 lines · J?rg Krause
Hi Arnout,
Quoted 9 lines · Arnout Vandecappelle
Quoted 6 lines · J?rg Krause
MPD changed from Autotools to the Meson build system.
Add config options for the qobuz and tidal plugins and group them together with the soundcloud plugin under "Commercial services".
Signed-off-by J?rg Krause <[email protected]>
Quoted 7 lines
Quoted 3 lines
Is there any reason why you didn't do the bump to 0.21.11 already?
The only reason is that the patch was first proposed when version 0.21.7 was the most recent version back then. Shall I bump to version 0.21.11 instead (and change the commit message)?
I'd think that that is easier than making an additional patch for the
additional bump.
Quoted 11 lines
Quoted 9 lines
package/mpd/mpd.mk line 249
Quoted 6 lines
ifeq ($(BR2_PACKAGE_MPD_TREMOR),y)
MPD_DEPENDENCIES+= tremorpackage/mpd/mpd.mk +0
-4-# Help mpd to find tremor in static linking scenarios -MPD_CONF_ENV += \ - TREMOR_LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs vorbisidec`" -MPD_CONF_OPTS += --with-tremor=$(STAGING_DIR)/usrI guess this is no longer needed because meson properly uses pkg-config. Have
you tested that?You're right, this is no longer needed and can safely be removed.
If you're anyway respinning, please mention it in the commit message.
Thanks!
Regards,
Arnout