diff options
| -rw-r--r-- | meta-oe/recipes-support/spdlog/spdlog/fix-build-for-master-fmt.patch | 44 | ||||
| -rw-r--r-- | meta-oe/recipes-support/spdlog/spdlog_1.11.0.bb | 1 |
2 files changed, 45 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/spdlog/spdlog/fix-build-for-master-fmt.patch b/meta-oe/recipes-support/spdlog/spdlog/fix-build-for-master-fmt.patch new file mode 100644 index 0000000000..c767db919f --- /dev/null +++ b/meta-oe/recipes-support/spdlog/spdlog/fix-build-for-master-fmt.patch | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | Upstream-Status: Backport | ||
| 2 | [https://github.com/gabime/spdlog/commit/0ca574ae168820da0268b3ec7607ca7b33024d05] | ||
| 3 | |||
| 4 | Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> | ||
| 5 | |||
| 6 | From 0ca574ae168820da0268b3ec7607ca7b33024d05 Mon Sep 17 00:00:00 2001 | ||
| 7 | From: H1X4 <10332146+H1X4Dev@users.noreply.github.com> | ||
| 8 | Date: Fri, 31 Mar 2023 20:39:32 +0300 | ||
| 9 | Subject: [PATCH] fix build for master fmt (non-bundled) (#2694) | ||
| 10 | |||
| 11 | * fix build for master fmt (non-bundled) | ||
| 12 | |||
| 13 | * update fmt_runtime_string macro | ||
| 14 | |||
| 15 | * fix build of updated macro | ||
| 16 | --- | ||
| 17 | include/spdlog/common.h | 9 ++++++++- | ||
| 18 | 1 file changed, 8 insertions(+), 1 deletion(-) | ||
| 19 | |||
| 20 | diff --git a/include/spdlog/common.h b/include/spdlog/common.h | ||
| 21 | index e69201a81..5f671c5c6 100644 | ||
| 22 | --- a/include/spdlog/common.h | ||
| 23 | +++ b/include/spdlog/common.h | ||
| 24 | @@ -173,12 +173,19 @@ using format_string_t = fmt::format_string<Args...>; | ||
| 25 | template<class T> | ||
| 26 | using remove_cvref_t = typename std::remove_cv<typename std::remove_reference<T>::type>::type; | ||
| 27 | |||
| 28 | +template <typename Char> | ||
| 29 | +#if FMT_VERSION >= 90101 | ||
| 30 | +using fmt_runtime_string = fmt::runtime_format_string<Char>; | ||
| 31 | +#else | ||
| 32 | +using fmt_runtime_string = fmt::basic_runtime<Char>; | ||
| 33 | +#endif | ||
| 34 | + | ||
| 35 | // clang doesn't like SFINAE disabled constructor in std::is_convertible<> so have to repeat the condition from basic_format_string here, | ||
| 36 | // in addition, fmt::basic_runtime<Char> is only convertible to basic_format_string<Char> but not basic_string_view<Char> | ||
| 37 | template<class T, class Char = char> | ||
| 38 | struct is_convertible_to_basic_format_string | ||
| 39 | : std::integral_constant<bool, | ||
| 40 | - std::is_convertible<T, fmt::basic_string_view<Char>>::value || std::is_same<remove_cvref_t<T>, fmt::basic_runtime<Char>>::value> | ||
| 41 | + std::is_convertible<T, fmt::basic_string_view<Char>>::value || std::is_same<remove_cvref_t<T>, fmt_runtime_string<Char>>::value> | ||
| 42 | {}; | ||
| 43 | |||
| 44 | # if defined(SPDLOG_WCHAR_FILENAMES) || defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) | ||
diff --git a/meta-oe/recipes-support/spdlog/spdlog_1.11.0.bb b/meta-oe/recipes-support/spdlog/spdlog_1.11.0.bb index ec985fb039..2800be4784 100644 --- a/meta-oe/recipes-support/spdlog/spdlog_1.11.0.bb +++ b/meta-oe/recipes-support/spdlog/spdlog_1.11.0.bb | |||
| @@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ad | |||
| 6 | SRCREV = "ad0e89cbfb4d0c1ce4d097e134eb7be67baebb36" | 6 | SRCREV = "ad0e89cbfb4d0c1ce4d097e134eb7be67baebb36" |
| 7 | SRC_URI = "git://github.com/gabime/spdlog.git;protocol=https;branch=v1.x \ | 7 | SRC_URI = "git://github.com/gabime/spdlog.git;protocol=https;branch=v1.x \ |
| 8 | file://0001-Do-not-use-LFS64-functions-on-linux-musl.patch \ | 8 | file://0001-Do-not-use-LFS64-functions-on-linux-musl.patch \ |
| 9 | file://fix-build-for-master-fmt.patch \ | ||
| 9 | " | 10 | " |
| 10 | 11 | ||
| 11 | DEPENDS += "fmt" | 12 | DEPENDS += "fmt" |
