forked from pool/spdlog
Accepting request 819520 from home:alois:branches:devel:libraries:c_c++
- Add spdlog-1.6.1-fmt7_build.patch and spdlog-1.6.1-fmt7_tests.patch to fix build with fmt 7.x OBS-URL: https://build.opensuse.org/request/show/819520 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/spdlog?expand=0&rev=33
This commit is contained in:
parent
3906ca7bda
commit
37c2f607e8
31
spdlog-1.6.1-fmt7_build.patch
Normal file
31
spdlog-1.6.1-fmt7_build.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From 22bee8128a4150ce37cf761ed9a609ad891848a6 Mon Sep 17 00:00:00 2001
|
||||
From: Craig Andrews <candrews@integralblue.com>
|
||||
Date: Mon, 6 Jul 2020 13:01:52 -0400
|
||||
Subject: [PATCH] fmt 7.0.0 renamed the internal namespace to detail.
|
||||
|
||||
See: https://github.com/fmtlib/fmt/issues/1538
|
||||
---
|
||||
include/spdlog/details/fmt_helper.h | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/spdlog/details/fmt_helper.h b/include/spdlog/details/fmt_helper.h
|
||||
index cbc0bdf3..4f363858 100644
|
||||
--- a/include/spdlog/details/fmt_helper.h
|
||||
+++ b/include/spdlog/details/fmt_helper.h
|
||||
@@ -34,7 +34,15 @@ template<typename T>
|
||||
inline unsigned int count_digits(T n)
|
||||
{
|
||||
using count_type = typename std::conditional<(sizeof(T) > sizeof(uint32_t)), uint64_t, uint32_t>::type;
|
||||
- return static_cast<unsigned int>(fmt::internal::count_digits(static_cast<count_type>(n)));
|
||||
+ return static_cast<unsigned int>(fmt::
|
||||
+// fmt 7.0.0 renamed the internal namespace to detail.
|
||||
+// See: https://github.com/fmtlib/fmt/issues/1538
|
||||
+#if FMT_VERSION < 70000
|
||||
+internal
|
||||
+#else
|
||||
+detail
|
||||
+#endif
|
||||
+::count_digits(static_cast<count_type>(n)));
|
||||
}
|
||||
|
||||
inline void pad2(int n, memory_buf_t &dest)
|
22
spdlog-1.6.1-fmt7_tests.patch
Normal file
22
spdlog-1.6.1-fmt7_tests.patch
Normal file
@ -0,0 +1,22 @@
|
||||
From 19f280466195f347f3f2c474556a6be0b343a7fb Mon Sep 17 00:00:00 2001
|
||||
From: Gabi Melman <gmelman1@gmail.com>
|
||||
Date: Wed, 8 Jul 2020 18:50:51 +0300
|
||||
Subject: [PATCH] Fix #1611
|
||||
|
||||
---
|
||||
include/spdlog/fmt/bin_to_hex.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/spdlog/fmt/bin_to_hex.h b/include/spdlog/fmt/bin_to_hex.h
|
||||
index e974cf51..5393dcac 100644
|
||||
--- a/include/spdlog/fmt/bin_to_hex.h
|
||||
+++ b/include/spdlog/fmt/bin_to_hex.h
|
||||
@@ -92,7 +92,7 @@ struct formatter<spdlog::details::dump_info<T>>
|
||||
auto parse(ParseContext &ctx) -> decltype(ctx.begin())
|
||||
{
|
||||
auto it = ctx.begin();
|
||||
- while (*it && *it != '}')
|
||||
+ while (it != ctx.end() && *it != '}')
|
||||
{
|
||||
switch (*it)
|
||||
{
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 8 11:05:02 UTC 2020 - aloisio@gmx.com
|
||||
|
||||
- Add spdlog-1.6.1-fmt7_build.patch and
|
||||
spdlog-1.6.1-fmt7_tests.patch to fix build with fmt 7.x
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 27 07:38:11 UTC 2020 - Luigi Baldoni <aloisio@gmx.com>
|
||||
|
||||
|
@ -24,6 +24,10 @@ 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 spdlog-1.6.1-fmt7_build.patch
|
||||
Patch0: spdlog-1.6.1-fmt7_build.patch
|
||||
# PATCH-FIX-UPSTREAM spdlog-1.6.1-fmt7_tests.patch
|
||||
Patch1: spdlog-1.6.1-fmt7_tests.patch
|
||||
BuildRequires: benchmark-devel >= 1.4.0
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc
|
||||
|
Loading…
x
Reference in New Issue
Block a user