diff --git a/NEWS b/NEWS index 5f020d622..2eaf2c0c9 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ ver 0.22 (not yet released) * input - ffmpeg: allow partial reads +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 - allow loading playlists specified as absolute filesystem paths 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 93ce3db58..b029d0ec5 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ project( 'mpd', ['c', 'cpp'], version: '0.22~git', - meson_version: '>= 0.47.2', + meson_version: '>= 0.49.0', default_options: [ 'c_std=c99', 'cpp_std=c++14' 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 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'))