Accepting request 1233567 from devel:libraries:c_c++

OBS-URL: https://build.opensuse.org/request/show/1233567
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/spdlog?expand=0&rev=39
This commit is contained in:
Ana Guerrero 2024-12-29 10:55:42 +00:00 committed by Git OBS Bridge
commit 90a1c8f071
3 changed files with 43 additions and 3 deletions

View File

@ -0,0 +1,35 @@
From 276ee5f5c0eb13626bd367b006ace5eae9526d8a Mon Sep 17 00:00:00 2001
From: Rui Chen <rui@chenrui.dev>
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 <rui@chenrui.dev>
---
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 <typename T, typename... Args>
+inline fmt::basic_string_view<T> to_string_view(fmt::basic_format_arg<T> fmt) {
+ return fmt;
+}
+#else
template <typename T, typename... Args>
inline fmt::basic_string_view<T> to_string_view(fmt::basic_format_string<T, Args...> fmt) {
return fmt;
}
+#endif
#elif __cpp_lib_format >= 202207L
template <typename T, typename... Args>
SPDLOG_CONSTEXPR_FUNC std::basic_string_view<T> to_string_view(
--
2.47.1

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Dec 27 00:33:38 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
- 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 <comrad@opensuse.org>

View File

@ -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