[packages/libfmt] up to 10.1.0
atler
atler at pld-linux.org
Sun Aug 13 18:15:05 CEST 2023
commit 3b89f6b2790b1549c90ccc4104a1f6d8faaf341f
Author: Jan Palus <atler at pld-linux.org>
Date: Sun Aug 13 17:44:55 2023 +0200
up to 10.1.0
libfmt-time_point-fix.patch | 63 ---------------------------------------------
libfmt.spec | 6 ++---
2 files changed, 2 insertions(+), 67 deletions(-)
---
diff --git a/libfmt.spec b/libfmt.spec
index 7de79c4..297a531 100644
--- a/libfmt.spec
+++ b/libfmt.spec
@@ -1,14 +1,13 @@
Summary: Small, safe and fast formatting library
Summary(pl.UTF-8): Mała, bezpieczna i szybka biblioteka do formatowania
Name: libfmt
-Version: 10.0.0
+Version: 10.1.0
Release: 1
License: BSD
Group: Libraries
#Source0Download: https://github.com/fmtlib/fmt/releases
Source0: https://github.com/fmtlib/fmt/archive/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: fa629bc1178918b7af4b2ea6b6a271dc
-Patch0: %{name}-time_point-fix.patch
+# Source0-md5: a2704b768020b5e02bcb72cb65be60cc
URL: https://github.com/fmtlib/fmt
BuildRequires: cmake >= 3.8
BuildRequires: libstdc++-devel >= 6:4.7
@@ -48,7 +47,6 @@ Statyczna biblioteka fmt.
%prep
%setup -q -n fmt-%{version}
-%patch0 -p1
%build
install -d build
diff --git a/libfmt-time_point-fix.patch b/libfmt-time_point-fix.patch
deleted file mode 100644
index 4c30040..0000000
--- a/libfmt-time_point-fix.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From d7592ad8bfa41eda239497f672ae8dc7bda00a4b Mon Sep 17 00:00:00 2001
-From: Patrick Geltinger <patlkli at patlkli.org>
-Date: Fri, 12 May 2023 00:25:21 +0200
-Subject: [PATCH] Fix time_point formatting for durations with certain ratios
- (#3430)
-
-* Fix time_point formatting
-
-* Add timestamps_ratios tests
----
- include/fmt/chrono.h | 3 ++-
- test/chrono-test.cc | 24 ++++++++++++++++++++++++
- 2 files changed, 26 insertions(+), 1 deletion(-)
-
-diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h
-index 1a2a12cf767..43daeeb4d39 100644
---- a/include/fmt/chrono.h
-+++ b/include/fmt/chrono.h
-@@ -2142,7 +2142,8 @@ struct formatter<std::chrono::time_point<std::chrono::system_clock, Duration>,
- epoch - std::chrono::duration_cast<std::chrono::seconds>(epoch));
-
- if (subsecs.count() < 0) {
-- auto second = std::chrono::seconds(1);
-+ auto second = std::chrono::duration_cast<Duration>(
-+ std::chrono::seconds(1));
- if (epoch.count() < ((Duration::min)() + second).count())
- FMT_THROW(format_error("duration is too small"));
- subsecs += second;
-diff --git a/test/chrono-test.cc b/test/chrono-test.cc
-index 8e2772fa0f6..33c0c2c6653 100644
---- a/test/chrono-test.cc
-+++ b/test/chrono-test.cc
-@@ -850,6 +850,30 @@ TEST(chrono_test, utc_clock) {
- }
- #endif
-
-+TEST(chrono_test, timestamps_ratios) {
-+ std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds>
-+ t1(std::chrono::milliseconds(67890));
-+
-+ EXPECT_EQ(fmt::format("{:%M:%S}", t1), "01:07.890");
-+
-+ std::chrono::time_point<std::chrono::system_clock, std::chrono::minutes>
-+ t2(std::chrono::minutes(7));
-+
-+ EXPECT_EQ(fmt::format("{:%M:%S}", t2), "07:00");
-+
-+ std::chrono::time_point<std::chrono::system_clock,
-+ std::chrono::duration<int, std::ratio<9>>>
-+ t3(std::chrono::duration<int, std::ratio<9>>(7));
-+
-+ EXPECT_EQ(fmt::format("{:%M:%S}", t3), "01:03");
-+
-+ std::chrono::time_point<std::chrono::system_clock,
-+ std::chrono::duration<int, std::ratio<63>>>
-+ t4(std::chrono::duration<int, std::ratio<63>>(1));
-+
-+ EXPECT_EQ(fmt::format("{:%M:%S}", t4), "01:03");
-+}
-+
- TEST(chrono_test, timestamps_sub_seconds) {
- std::chrono::time_point<std::chrono::system_clock,
- std::chrono::duration<long long, std::ratio<1, 3>>>
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libfmt.git/commitdiff/3b89f6b2790b1549c90ccc4104a1f6d8faaf341f
More information about the pld-cvs-commit
mailing list