From e8dbdee2385ee77c5b1f0e03dd3f3f912ee98a8e Mon Sep 17 00:00:00 2001 From: Thomas Hebb Date: Mon, 30 Nov 2020 17:01:58 -0800 Subject: [PATCH 1/3] Make spdlog use the same version of fmt we use spdlog bundles a version of fmt. However, we also depend on and use fmt directly. If we don't tell spdlog not to use its bundled version, we end up with two versions of fmt in our include path, since both libraries are header-only, meaning any slight API mismatches will cause build failures and undesired behavior. We seem to have gotten lucky so far, but I ran into all sorts of issues when I tried to update to a newer version of spdlog. This change prevents them. --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 1e7e22c..70067ee 100644 --- a/meson.build +++ b/meson.build @@ -80,7 +80,7 @@ is_openbsd = host_machine.system() == 'openbsd' thread_dep = dependency('threads') fmt = dependency('fmt', version : ['>=5.3.0'], fallback : ['fmt', 'fmt_dep']) -spdlog = dependency('spdlog', version : ['>=1.3.1'], fallback : ['spdlog', 'spdlog_dep']) +spdlog = dependency('spdlog', version : ['>=1.3.1'], fallback : ['spdlog', 'spdlog_dep'], default_options : ['external_fmt=true']) wayland_client = dependency('wayland-client') wayland_cursor = dependency('wayland-cursor') wayland_protos = dependency('wayland-protocols') From ad40511358ef057c1a0a8ff9b0bcfcf61ede6ff0 Mon Sep 17 00:00:00 2001 From: Thomas Hebb Date: Mon, 30 Nov 2020 17:10:02 -0800 Subject: [PATCH 2/3] Update spdlog subproject to 1.8.1 Among other changes, this adds spdlog::should_log(), which lets us easily determine whether a log message will be printed so that we can avoid extra computation when unnecessary. New wrap file taken from https://wrapdb.mesonbuild.com/spdlog and modified to download from GitHub as per commit 99dde1aff8db ("Download patch files from Github instead of wrapdb"). --- meson.build | 2 +- subprojects/spdlog.wrap | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index 70067ee..7f9db5f 100644 --- a/meson.build +++ b/meson.build @@ -80,7 +80,7 @@ is_openbsd = host_machine.system() == 'openbsd' thread_dep = dependency('threads') fmt = dependency('fmt', version : ['>=5.3.0'], fallback : ['fmt', 'fmt_dep']) -spdlog = dependency('spdlog', version : ['>=1.3.1'], fallback : ['spdlog', 'spdlog_dep'], default_options : ['external_fmt=true']) +spdlog = dependency('spdlog', version : ['>=1.8.0'], fallback : ['spdlog', 'spdlog_dep'], default_options : ['external_fmt=true']) wayland_client = dependency('wayland-client') wayland_cursor = dependency('wayland-cursor') wayland_protos = dependency('wayland-protocols') diff --git a/subprojects/spdlog.wrap b/subprojects/spdlog.wrap index 750036b..c30450e 100644 --- a/subprojects/spdlog.wrap +++ b/subprojects/spdlog.wrap @@ -1,10 +1,13 @@ [wrap-file] -directory = spdlog-1.3.1 +directory = spdlog-1.8.1 -source_url = https://github.com/gabime/spdlog/archive/v1.3.1.tar.gz -source_filename = v1.3.1.tar.gz -source_hash = 160845266e94db1d4922ef755637f6901266731c4cb3b30b45bf41efa0e6ab70 +source_url = https://github.com/gabime/spdlog/archive/v1.8.1.tar.gz +source_filename = v1.8.1.tar.gz +source_hash = 5197b3147cfcfaa67dd564db7b878e4a4b3d9f3443801722b3915cdeced656cb -patch_url = https://github.com/mesonbuild/spdlog/releases/download/1.3.1-1/spdlog.zip -patch_filename = spdlog-1.3.1-1-wrap.zip -patch_hash = 715a0229781019b853d409cc0bf891ee4b9d3a17bec0cf87f4ad30b28bbecc87 +patch_url = https://github.com/mesonbuild/spdlog/releases/download/1.8.1-1/spdlog.zip +patch_filename = spdlog-1.8.1-1-wrap.zip +patch_hash = 76844292a8e912aec78450618271a311841b33b17000988f215ddd6c64dd71b3 + +[provide] +spdlog = spdlog_dep From 407bf27401c25a96cefd332fd9a5d9f1fef12fce Mon Sep 17 00:00:00 2001 From: Thomas Hebb Date: Mon, 30 Nov 2020 17:32:06 -0800 Subject: [PATCH 3/3] Update fmt subproject to 7.1.3 There is no particular change in this update that we require. However, our previous version, 5.3.0, is nearly two years old, so it seems prudent to pull in all the upstream fixes that have been made since then. New wrap file taken from https://wrapdb.mesonbuild.com/fmt and modified to download from GitHub as per commit 99dde1aff8db ("Download patch files from Github instead of wrapdb"). --- subprojects/fmt.wrap | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/subprojects/fmt.wrap b/subprojects/fmt.wrap index eb79283..71abc80 100644 --- a/subprojects/fmt.wrap +++ b/subprojects/fmt.wrap @@ -1,10 +1,13 @@ [wrap-file] -directory = fmt-5.3.0 +directory = fmt-7.1.3 -source_url = https://github.com/fmtlib/fmt/archive/5.3.0.tar.gz -source_filename = fmt-5.3.0.tar.gz -source_hash = defa24a9af4c622a7134076602070b45721a43c51598c8456ec6f2c4dbb51c89 +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://github.com/mesonbuild/fmt/releases/download/5.3.0-1/fmt.zip -patch_filename = fmt-5.3.0-1-wrap.zip -patch_hash = 18f21a3b8833949c35d4ac88a7059577d5fa24b98786e4b1b2d3d81bb811440f \ No newline at end of file +patch_url = https://github.com/mesonbuild/fmt/releases/download/7.1.3-1/fmt.zip +patch_filename = fmt-7.1.3-1-wrap.zip +patch_hash = 6eb951a51806fd6ffd596064825c39b844c1fe1799840ef507b61a53dba08213 + +[provide] +fmt = fmt_dep