diff --git a/0001-fix-update-to_string_view-function-for-fmt-11.1-3301.patch b/0001-fix-update-to_string_view-function-for-fmt-11.1-3301.patch new file mode 100644 index 0000000..a27a7cd --- /dev/null +++ b/0001-fix-update-to_string_view-function-for-fmt-11.1-3301.patch @@ -0,0 +1,35 @@ +From 276ee5f5c0eb13626bd367b006ace5eae9526d8a Mon Sep 17 00:00:00 2001 +From: Rui Chen +Date: Thu, 26 Dec 2024 02:13:57 -0500 +Subject: [PATCH] fix: update to_string_view function for fmt 11.1 (#3301) + +Signed-off-by: Rui Chen +--- + include/spdlog/common.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/include/spdlog/common.h b/include/spdlog/common.h +index aca483c2..2d73f830 100644 +--- a/include/spdlog/common.h ++++ b/include/spdlog/common.h +@@ -365,10 +365,17 @@ SPDLOG_CONSTEXPR_FUNC spdlog::wstring_view_t to_string_view(spdlog::wstring_view + #endif + + #ifndef SPDLOG_USE_STD_FORMAT ++#if FMT_VERSION >= 110100 ++template ++inline fmt::basic_string_view to_string_view(fmt::basic_format_arg fmt) { ++ return fmt; ++} ++#else + template + inline fmt::basic_string_view to_string_view(fmt::basic_format_string fmt) { + return fmt; + } ++#endif + #elif __cpp_lib_format >= 202207L + template + SPDLOG_CONSTEXPR_FUNC std::basic_string_view to_string_view( +-- +2.47.1 + diff --git a/spdlog.changes b/spdlog.changes index a5e3fa7..a95c5c6 100644 --- a/spdlog.changes +++ b/spdlog.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Dec 27 00:33:38 UTC 2024 - Jan Engelhardt + +- Add 0001-fix-update-to_string_view-function-for-fmt-11.1-3301.patch + to cope with fmt 11.1 + ------------------------------------------------------------------- Thu Nov 21 19:49:23 UTC 2024 - Bernd Ritter diff --git a/spdlog.spec b/spdlog.spec index ffa9609..ee0bf30 100644 --- a/spdlog.spec +++ b/spdlog.spec @@ -27,6 +27,7 @@ Group: Development/Libraries/C and C++ URL: https://github.com/gabime/spdlog Source0: https://github.com/gabime/%{name}/archive/refs/tags/v%{version}.tar.gz Source99: baselibs.conf +Patch1: 0001-fix-update-to_string_view-function-for-fmt-11.1-3301.patch BuildRequires: cmake >= 3.10 %if 0%{?suse_version} > 1500 BuildRequires: gcc-c++ >= 13 @@ -100,9 +101,7 @@ v="$PWD/spdlog.sym" export LD_LIBRARY_PATH="$PWD/build" %ctest -%post -n %{lname} -p /sbin/ldconfig - -%postun -n %{lname} -p /sbin/ldconfig +%ldconfig_scriptlets -n %{lname} %files devel %license LICENSE