diff --git a/spdlog-1.14.1-fmt-11.0.2.patch b/spdlog-1.14.1-fmt-11.0.2.patch new file mode 100644 index 0000000..e760ad8 --- /dev/null +++ b/spdlog-1.14.1-fmt-11.0.2.patch @@ -0,0 +1,24 @@ +From 06f92eae2bb37658561e0c87516c29e8e094f0a8 Mon Sep 17 00:00:00 2001 +From: Yao Zi +Date: Mon, 8 Jul 2024 19:37:05 +0000 +Subject: [PATCH] make example compatible with fmt 11 + +Since fmt 11.0.0, formatter::format() is required to be const. Mark +format() method in example as const to stay compatible with fmt 11. +--- + example/example.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/example/example.cpp b/example/example.cpp +index d4cfa1e29..267e42151 100644 +--- a/example/example.cpp ++++ b/example/example.cpp +@@ -272,7 +272,7 @@ struct my_type { + #ifndef SPDLOG_USE_STD_FORMAT // when using fmtlib + template <> + struct fmt::formatter : fmt::formatter { +- auto format(my_type my, format_context &ctx) -> decltype(ctx.out()) { ++ auto format(my_type my, format_context &ctx) const -> decltype(ctx.out()) { + return fmt::format_to(ctx.out(), "[my_type i={}]", my.i); + } + }; diff --git a/spdlog.spec b/spdlog.spec index 7af0eef..8f4c3fa 100644 --- a/spdlog.spec +++ b/spdlog.spec @@ -1,6 +1,6 @@ Name: spdlog Version: 1.14.1 -Release: 1mamba +Release: 2mamba Summary: Fast C++ logging library Group: System/Libraries Vendor: openmamba @@ -8,6 +8,7 @@ Distribution: openmamba Packager: Silvan Calarco URL: https://github.com/gabime/spdlog Source: https://github.com/gabime/spdlog.git/v%{version}/spdlog-%{version}.tar.bz2 +Patch0: spdlog-1.14.1-fmt-11.0.2.patch License: MIT ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -16,6 +17,7 @@ BuildRequires: libgcc BuildRequires: libstdc++6-devel ## AUTOBUILDREQ-END BuildRequires: cmake +BuildRequires: libfmt-devel >= 11.0.2 Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} %description @@ -43,7 +45,7 @@ This package contains libraries and header files for developing applications tha %prep %setup -q -#%patch 0 -p1 -b .fmt_external +%patch 0 -p1 -b .fmt-11.0.2 %build %cmake -d build \ @@ -74,6 +76,9 @@ This package contains libraries and header files for developing applications tha %doc README.md %changelog +* Tue Sep 03 2024 Silvan Calarco 1.14.1-2mamba +- rebuilt with libfmt 11.0.2 + * Tue Apr 30 2024 Automatic Build System 1.14.1-1mamba - automatic version update by autodist