From 2c7995fa56103f841860a7abf4555eb02ac178b3020af2537a5114a9bcf18566 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 28 Aug 2022 06:39:29 +0000 Subject: [PATCH] - Update to release 9.1 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/fmt?expand=0&rev=48 --- ...-Fix-large-shift-in-uint128_fallback.patch | 52 ------------------- ...-the-correct-fmod-overload-is-called.patch | 25 --------- ...AT128-instead-of-__SIZEOF_FLOAT128__.patch | 34 ------------ 9.1.0.tar.gz | 3 ++ fmt-9.0.0.tar.gz | 3 -- fmt.changes | 14 +++++ fmt.spec | 7 +-- 7 files changed, 19 insertions(+), 119 deletions(-) delete mode 100644 0001-Fix-large-shift-in-uint128_fallback.patch delete mode 100644 0001-Make-sure-the-correct-fmod-overload-is-called.patch delete mode 100644 0002-Use-FMT_USE_FLOAT128-instead-of-__SIZEOF_FLOAT128__.patch create mode 100644 9.1.0.tar.gz delete mode 100644 fmt-9.0.0.tar.gz diff --git a/0001-Fix-large-shift-in-uint128_fallback.patch b/0001-Fix-large-shift-in-uint128_fallback.patch deleted file mode 100644 index 6486213..0000000 --- a/0001-Fix-large-shift-in-uint128_fallback.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 2a1b3ac629bfec51ce70d3c0ebaf28e706754e19 Mon Sep 17 00:00:00 2001 -From: Victor Zverovich -Date: Sun, 10 Jul 2022 08:14:18 -0700 -Subject: [PATCH 1/2] Fix large shift in uint128_fallback - ---- - include/fmt/format.h | 2 ++ - test/format-test.cc | 4 +++- - 2 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/include/fmt/format.h b/include/fmt/format.h -index 0bd2fdb1..6516975e 100644 ---- a/include/fmt/format.h -+++ b/include/fmt/format.h -@@ -366,10 +366,12 @@ class uint128_fallback { - } - FMT_CONSTEXPR auto operator>>(int shift) const -> uint128_fallback { - if (shift == 64) return {0, hi_}; -+ if (shift > 64) return uint128_fallback(0, hi_) >> (shift - 64); - return {hi_ >> shift, (hi_ << (64 - shift)) | (lo_ >> shift)}; - } - FMT_CONSTEXPR auto operator<<(int shift) const -> uint128_fallback { - if (shift == 64) return {lo_, 0}; -+ if (shift > 64) return uint128_fallback(lo_, 0) << (shift - 64); - return {hi_ << shift | (lo_ >> (64 - shift)), (lo_ << shift)}; - } - FMT_CONSTEXPR auto operator>>=(int shift) -> uint128_fallback& { -diff --git a/test/format-test.cc b/test/format-test.cc -index 45a92624..8c1c305f 100644 ---- a/test/format-test.cc -+++ b/test/format-test.cc -@@ -59,6 +59,8 @@ TEST(uint128_test, shift) { - EXPECT_EQ(static_cast(n), 0x8000000000000000); - n = n >> 62; - EXPECT_EQ(static_cast(n), 42); -+ EXPECT_EQ(uint128_fallback(1) << 112, uint128_fallback(0x1000000000000, 0)); -+ EXPECT_EQ(uint128_fallback(0x1000000000000, 0) >> 112, uint128_fallback(1)); - } - - TEST(uint128_test, minus) { -@@ -234,7 +236,7 @@ TEST(util_test, format_system_error) { - throws_on_alloc = true; - } - if (!throws_on_alloc) { -- fmt::print("warning: std::allocator allocates {} chars", max_size); -+ fmt::print("warning: std::allocator allocates {} chars\n", max_size); - return; - } - } --- -2.36.1 - diff --git a/0001-Make-sure-the-correct-fmod-overload-is-called.patch b/0001-Make-sure-the-correct-fmod-overload-is-called.patch deleted file mode 100644 index 0c7804b..0000000 --- a/0001-Make-sure-the-correct-fmod-overload-is-called.patch +++ /dev/null @@ -1,25 +0,0 @@ -From d82e1a108d3b3e3e7b8b019b47df9c4ed127723b Mon Sep 17 00:00:00 2001 -From: Victor Zverovich -Date: Wed, 13 Jul 2022 12:33:57 -0700 -Subject: [PATCH] Make sure the correct fmod overload is called - ---- - include/fmt/chrono.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h -index 9b2aa74d..4a2c3a3d 100644 ---- a/include/fmt/chrono.h -+++ b/include/fmt/chrono.h -@@ -1777,7 +1777,7 @@ struct chrono_formatter { - format_to(std::back_inserter(buf), runtime("{:.{}f}"), - std::fmod(val * static_cast(Period::num) / - static_cast(Period::den), -- 60), -+ static_cast(60)), - num_fractional_digits); - if (negative) *out++ = '-'; - if (buf.size() < 2 || buf[1] == '.') *out++ = '0'; --- -2.36.1 - diff --git a/0002-Use-FMT_USE_FLOAT128-instead-of-__SIZEOF_FLOAT128__.patch b/0002-Use-FMT_USE_FLOAT128-instead-of-__SIZEOF_FLOAT128__.patch deleted file mode 100644 index 7c79f94..0000000 --- a/0002-Use-FMT_USE_FLOAT128-instead-of-__SIZEOF_FLOAT128__.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 05be7a0764f8fbfbdf9c9750ec54d49fe3d2419f Mon Sep 17 00:00:00 2001 -From: Victor Zverovich -Date: Sun, 10 Jul 2022 08:47:16 -0700 -Subject: [PATCH 2/2] Use FMT_USE_FLOAT128 instead of __SIZEOF_FLOAT128__ - ---- - test/format-test.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/test/format-test.cc b/test/format-test.cc -index 8c1c305f..4ec7c838 100644 ---- a/test/format-test.cc -+++ b/test/format-test.cc -@@ -101,7 +101,7 @@ template void check_isfinite() { - - TEST(float_test, isfinite) { - check_isfinite(); --#ifdef __SIZEOF_FLOAT128__ -+#if FMT_USE_FLOAT128 - check_isfinite(); - #endif - } -@@ -122,7 +122,7 @@ template void check_isnan() { - - TEST(float_test, isnan) { - check_isnan(); --#ifdef __SIZEOF_FLOAT128__ -+#if FMT_USE_FLOAT128 - check_isnan(); - #endif - } --- -2.36.1 - diff --git a/9.1.0.tar.gz b/9.1.0.tar.gz new file mode 100644 index 0000000..3f652c1 --- /dev/null +++ b/9.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5dea48d1fcddc3ec571ce2058e13910a0d4a6bab4cc09a809d8b1dd1c88ae6f2 +size 837901 diff --git a/fmt-9.0.0.tar.gz b/fmt-9.0.0.tar.gz deleted file mode 100644 index f1a5fc0..0000000 --- a/fmt-9.0.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9a1e0e9e843a356d65c7604e2c8bf9402b50fe294c355de0095ebd42fb9bd2c5 -size 833639 diff --git a/fmt.changes b/fmt.changes index 7aeed75..d471cf1 100644 --- a/fmt.changes +++ b/fmt.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Sun Aug 28 06:35:23 UTC 2022 - Jan Engelhardt + +- Update to release 9.1 + * fmt::formatted_size now works at compile time + * Fixed handling of invalid UTF-8 (#3038) + * Improved Unicode support in ostream overloads of print + * Added support for wide streams to fmt::streamed + * Added the n specifier that disables the output of delimiters + when formatting ranges (#2981) +- Delete 0001-Fix-large-shift-in-uint128_fallback.patch + 0002-Use-FMT_USE_FLOAT128-instead-of-__SIZEOF_FLOAT128__.patch + 0001-Make-sure-the-correct-fmod-overload-is-called.patch (merged) + ------------------------------------------------------------------- Tue Jul 5 14:16:23 UTC 2022 - Jan Engelhardt diff --git a/fmt.spec b/fmt.spec index b439157..946afcf 100644 --- a/fmt.spec +++ b/fmt.spec @@ -18,16 +18,13 @@ %define sover 9 Name: fmt -Version: 9.0.0 +Version: 9.1.0 Release: 0 Summary: A formatting library for C++ License: MIT URL: http://fmtlib.net/ -Source0: https://github.com/fmtlib/fmt/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source: https://github.com/fmtlib/fmt/archive/%version.tar.gz Source1: baselibs.conf -Patch1: 0001-Fix-large-shift-in-uint128_fallback.patch -Patch2: 0002-Use-FMT_USE_FLOAT128-instead-of-__SIZEOF_FLOAT128__.patch -Patch3: 0001-Make-sure-the-correct-fmod-overload-is-called.patch BuildRequires: c++_compiler BuildRequires: cmake BuildRequires: pkg-config