From b63c1a21447e5ef4eaf602c0129f5e11d555ea3c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 18 Mar 2019 09:11:16 +0100 Subject: [PATCH 1/4] increment version number to 0.21.7 --- NEWS | 2 ++ doc/conf.py | 2 +- meson.build | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index f59539972..191af38a0 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +ver 0.21.7 (not yet released) + ver 0.21.6 (2019/03/17) * protocol - allow loading playlists specified as absolute filesystem paths diff --git a/doc/conf.py b/doc/conf.py index 1d486ae48..426eb731b 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -38,7 +38,7 @@ author = 'Max Kellermann' # built documents. # # The short X.Y version. -version = '0.21.6' +version = '0.21.7' # The full version, including alpha/beta/rc tags. release = version diff --git a/meson.build b/meson.build index 723b72295..d57928479 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'mpd', ['c', 'cpp'], - version: '0.21.6', + version: '0.21.7', meson_version: '>= 0.47.2', default_options: [ 'c_std=c99', From c66389a453c6acb8d78bfba86baee9b7071eb553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Krause?= Date: Wed, 27 Feb 2019 22:55:21 +0100 Subject: [PATCH 2/4] meson.build: require Meson 0.49.0 Meson 0.49.0 adds native support for `libgcrypt-config` which is necessary for detecting libgcrypt dependencies, as the latest version 1.8.4 of libgcrypt does not provide a .pc file. --- NEWS | 1 + doc/user.rst | 2 +- meson.build | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 191af38a0..d4b5df01b 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ ver 0.21.7 (not yet released) +* require Meson 0.49.0 for native libgcrypt-config support ver 0.21.6 (2019/03/17) * protocol diff --git a/doc/user.rst b/doc/user.rst index 9bc049d8e..5ab9539db 100644 --- a/doc/user.rst +++ b/doc/user.rst @@ -54,7 +54,7 @@ Download the source tarball from the `MPD home page `_ and In any case, you need: * a C++14 compiler (e.g. gcc 6.0 or clang 3.9) -* `Meson 0.47.2 `__ and `Ninja +* `Meson 0.49.0 `__ and `Ninja `__ * Boost 1.58 * pkg-config diff --git a/meson.build b/meson.build index d57928479..bafe9990e 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ project( 'mpd', ['c', 'cpp'], version: '0.21.7', - meson_version: '>= 0.47.2', + meson_version: '>= 0.49.0', default_options: [ 'c_std=c99', 'cpp_std=c++14' From 7f87de783fb5107048f1d7b98278156c00b2f144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Krause?= Date: Wed, 27 Feb 2019 22:20:46 +0100 Subject: [PATCH 3/4] src/lib/gcrypt/meson.build: use dependency() for quering linker flags Since version 0.49.0 the Meson build system has native support for finding and using the gcrypt library using the `dependency()` function. `dependency()` has the advantage over `find_library()` as it queries the required linker flags for proper linking with external libraries, e.g. libgpg-error. As the latest released version 1.8.4 of libgcrypt does not provide a .pc file, using `libgcrypt-config` is the only way to query the required linker flags. Unfortunately, there is an issue when cross compiling mpd and the user does not define `libgcrypt-config` in the cross file. If the user sets the qobuz feature to `auto` and the target does not have libgcrypt installed, the Meson build system will falsly assume libgcrypt is available for the target as it uses the native `libgcrypt-config` on the host and pretend is has found the library. Therefore, we still rely on `find_library()` to workaround this buggy behavior. This way, if qobuz feature detection is set to `auto`, the feature is disabled in case there is no target libgcrypt available. Fixes building mpd statically with the qobuz feature enabled. Otherwise the build fails with undefined references because of the missing libgpg-error dependency: ``` /sysroot/usr/lib/libgcrypt.a(libgcrypt_la-visibility.o): In function `gcry_strerror': visibility.c:(.text+0x14): undefined reference to `gpg_strerror' ``` --- src/lib/gcrypt/meson.build | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/lib/gcrypt/meson.build b/src/lib/gcrypt/meson.build index 48297e279..5840bfe4d 100644 --- a/src/lib/gcrypt/meson.build +++ b/src/lib/gcrypt/meson.build @@ -1,4 +1,17 @@ +# Since version 0.49.0 Meson has native libgcrypt dependency support, which has +# the advantage over find_library() as it uses libgcrypt-config to query the +# required linker flags. +# However, we still need to use find_library() first, to prevent Meson +# falsly assuming a target libgcrypt is available in case there is no +# libgcrypt-config entry in the cross file and libgcrypt is installed on the +# host. In this case, Meson will falsly use the native libgcrypt-config and +# will falsly assume it has found the gcrypt library for the target. +# +# See: https://github.com/MusicPlayerDaemon/MPD/pull/495 gcrypt_dep = c_compiler.find_library('gcrypt', required: get_option('qobuz')) +if gcrypt_dep.found() + gcrypt_dep = dependency('libgcrypt') +endif if not gcrypt_dep.found() subdir_done() endif From e22bdee8085c902b83b2a32d108b615f89f69522 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 18 Mar 2019 09:58:35 +0100 Subject: [PATCH 4/4] win32/res/meson.build: drop tilde suffix from version number before splitting MPD sometimes uses version numbers like "0.22~git" to mark unreleased versions. That makes the win32 resource compiler unhappy, because it expects numbers only. --- win32/res/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win32/res/meson.build b/win32/res/meson.build index 4a9e536c4..ba021af5f 100644 --- a/win32/res/meson.build +++ b/win32/res/meson.build @@ -1,7 +1,7 @@ windows_conf = configuration_data() windows_conf.set('VERSION', meson.project_version()) -splitted_version = meson.project_version().split('.') +splitted_version = meson.project_version().split('~')[0].split('.') windows_conf.set('VERSION_MAJOR', splitted_version[0]) windows_conf.set('VERSION_MINOR', splitted_version.get(1, '0')) windows_conf.set('VERSION_REVISION', splitted_version.get(2, '0'))