From 286727125506839287ae66b0c208b51bcaa4c55f593e60191e18e4b721463669 Mon Sep 17 00:00:00 2001 From: Bernd Ritter Date: Fri, 12 May 2023 07:08:46 +0000 Subject: [PATCH] Added the upstream patch for non bundled fmt. OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/spdlog?expand=0&rev=76 --- ...74ae168820da0268b3ec7607ca7b33024d05.patch | 39 +++++++++++++++++++ spdlog.spec | 4 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0ca574ae168820da0268b3ec7607ca7b33024d05.patch diff --git a/0ca574ae168820da0268b3ec7607ca7b33024d05.patch b/0ca574ae168820da0268b3ec7607ca7b33024d05.patch new file mode 100644 index 0000000..4d418e6 --- /dev/null +++ b/0ca574ae168820da0268b3ec7607ca7b33024d05.patch @@ -0,0 +1,39 @@ +From 0ca574ae168820da0268b3ec7607ca7b33024d05 Mon Sep 17 00:00:00 2001 +From: H1X4 <10332146+H1X4Dev@users.noreply.github.com> +Date: Fri, 31 Mar 2023 20:39:32 +0300 +Subject: [PATCH] fix build for master fmt (non-bundled) (#2694) + +* fix build for master fmt (non-bundled) + +* update fmt_runtime_string macro + +* fix build of updated macro +--- + include/spdlog/common.h | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/include/spdlog/common.h b/include/spdlog/common.h +index e69201a81..5f671c5c6 100644 +--- a/include/spdlog/common.h ++++ b/include/spdlog/common.h +@@ -173,12 +173,19 @@ using format_string_t = fmt::format_string; + template + using remove_cvref_t = typename std::remove_cv::type>::type; + ++template ++#if FMT_VERSION >= 90101 ++using fmt_runtime_string = fmt::runtime_format_string; ++#else ++using fmt_runtime_string = fmt::basic_runtime; ++#endif ++ + // clang doesn't like SFINAE disabled constructor in std::is_convertible<> so have to repeat the condition from basic_format_string here, + // in addition, fmt::basic_runtime is only convertible to basic_format_string but not basic_string_view + template + struct is_convertible_to_basic_format_string + : std::integral_constant>::value || std::is_same, fmt::basic_runtime>::value> ++ std::is_convertible>::value || std::is_same, fmt_runtime_string>::value> + {}; + + # if defined(SPDLOG_WCHAR_FILENAMES) || defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) diff --git a/spdlog.spec b/spdlog.spec index 6789850..7732c20 100644 --- a/spdlog.spec +++ b/spdlog.spec @@ -1,7 +1,7 @@ # # spec file for package spdlog # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,6 +25,8 @@ Summary: C++ logging library License: MIT URL: https://github.com/gabime/spdlog Source0: https://github.com/gabime/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM 0ca574ae168820da0268b3ec7607ca7b33024d05.patch +Patch0: 0ca574ae168820da0268b3ec7607ca7b33024d05.patch Source99: baselibs.conf BuildRequires: cmake >= 3.10 %if 0%{?suse_version} > 1500