From a9c704b76e05571043ece260f517bfe7dc759195 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 19 May 2021 18:58:18 +0200 Subject: [PATCH] meson.build: libfmt integration --- .travis.yml | 4 ++++ NEWS | 1 + doc/user.rst | 1 + meson.build | 3 +++ subprojects/.gitignore | 1 + subprojects/fmt.wrap | 12 ++++++++++++ 6 files changed, 22 insertions(+) create mode 100644 subprojects/fmt.wrap diff --git a/.travis.yml b/.travis.yml index 40c7afcca..2655af6b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ jobs: - meson - libgtest-dev - libboost-dev + - libfmt-dev # Ubuntu Focal (20.04) with GCC 9.3 on big-endian - os: linux @@ -22,6 +23,7 @@ jobs: - meson - libgtest-dev - libboost-dev + - libfmt-dev # Ubuntu Focal (20.04) with GCC 9.3 on ARM64 - os: linux @@ -33,6 +35,7 @@ jobs: - meson - libgtest-dev - libboost-dev + - libfmt-dev # Ubuntu Trusty (16.04) with GCC 8 - os: linux @@ -67,6 +70,7 @@ jobs: packages: - ccache - meson + - fmt - googletest - icu4c - ffmpeg diff --git a/NEWS b/NEWS index 8c157bc24..101a26424 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,7 @@ ver 0.23 (not yet released) - snapcast: new plugin * tags - new tags "ComposerSort", "Ensemble", "Movement", "MovementNumber", and "Location" +* new build-time dependency: libfmt ver 0.22.8 (2021/05/22) * fix crash bug in "albumart" command (0.22.7 regression) diff --git a/doc/user.rst b/doc/user.rst index f82faf734..fdbd4af36 100644 --- a/doc/user.rst +++ b/doc/user.rst @@ -69,6 +69,7 @@ For example, the following installs a fairly complete list of build dependencies .. code-block:: none apt install meson g++ \ + libfmt-dev \ libpcre3-dev \ libmad0-dev libmpg123-dev libid3tag0-dev \ libflac-dev libvorbis-dev libopus-dev libogg-dev \ diff --git a/meson.build b/meson.build index a4bab2405..9c1039bf7 100644 --- a/meson.build +++ b/meson.build @@ -223,6 +223,8 @@ if boost_dep.version() == '1.67' warning('Your Boost version 1.67 is known to be buggy, and the MPD build will fail. Please upgrade to Boost 1.68 or later.') endif +fmt_dep = dependency('fmt') + log = static_library( 'log', 'src/Log.cxx', @@ -527,6 +529,7 @@ mpd = build_target( zeroconf_dep, more_deps, chromaprint_dep, + fmt_dep, ], link_args: link_args, build_by_default: not get_option('fuzzer'), diff --git a/subprojects/.gitignore b/subprojects/.gitignore index e6f228fa3..3b16707d0 100644 --- a/subprojects/.gitignore +++ b/subprojects/.gitignore @@ -1,3 +1,4 @@ /packagecache/ +/fmt-*/ /googletest-*/ diff --git a/subprojects/fmt.wrap b/subprojects/fmt.wrap new file mode 100644 index 000000000..8ce37d969 --- /dev/null +++ b/subprojects/fmt.wrap @@ -0,0 +1,12 @@ +[wrap-file] +directory = fmt-7.1.3 +source_url = https://github.com/fmtlib/fmt/archive/7.1.3.tar.gz +source_filename = fmt-7.1.3.tar.gz +source_hash = 5cae7072042b3043e12d53d50ef404bbb76949dad1de368d7f993a15c8c05ecc +patch_url = https://wrapdb.mesonbuild.com/v1/projects/fmt/7.1.3/1/get_zip +patch_filename = fmt-7.1.3-1-wrap.zip +patch_hash = 6eb951a51806fd6ffd596064825c39b844c1fe1799840ef507b61a53dba08213 + +[provide] +fmt = fmt_dep +