SHA256
1
0
forked from pool/spdlog

Accepting request 819805 from home:alois:branches:devel:libraries:c_c++

- Update to version 1.7.0
  * Support fmt version 7.x.
  * Fixed to_hex segmentation fault
  * Support for FMT_STRING compile time checking. 
  * Clean CMakeLists.txt.
- Drop spdlog-1.6.1-fmt7_build.patch and
  spdlog-1.6.1-fmt7_tests.patch (merged upstream)

OBS-URL: https://build.opensuse.org/request/show/819805
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/spdlog?expand=0&rev=34
This commit is contained in:
Luigi Baldoni 2020-07-09 20:20:17 +00:00 committed by Git OBS Bridge
parent 37c2f607e8
commit dbab2fe238
6 changed files with 15 additions and 61 deletions

View File

@ -1,31 +0,0 @@
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)

View File

@ -1,22 +0,0 @@
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)
{

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:378a040d91f787aec96d269b0c39189f58a6b852e4cbf9150ccfacbe85ebbbfc
size 285531

3
spdlog-1.7.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f0114a4d3c88be9e696762f37a7c379619443ce9d668546c61b21d41affe5b62
size 285615

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Thu Jul 9 19:59:07 UTC 2020 - aloisio@gmx.com
- Update to version 1.7.0
* Support fmt version 7.x.
* Fixed to_hex segmentation fault
* Support for FMT_STRING compile time checking.
* Clean CMakeLists.txt.
- Drop spdlog-1.6.1-fmt7_build.patch and
spdlog-1.6.1-fmt7_tests.patch (merged upstream)
-------------------------------------------------------------------
Wed Jul 8 11:05:02 UTC 2020 - aloisio@gmx.com

View File

@ -18,16 +18,12 @@
%define _sover 1
Name: spdlog
Version: 1.6.1
Version: 1.7.0
Release: 0
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