From 2a9e845beea7344934c6f855fb231bcb3e108512e326a4aab6939a7c917e32c7 Mon Sep 17 00:00:00 2001 From: Luigi Baldoni Date: Fri, 29 Nov 2019 10:25:23 +0000 Subject: [PATCH 1/4] Accepting request 752319 from home:alois:branches:devel:libraries:c_c++ update to 6.0.0 OBS-URL: https://build.opensuse.org/request/show/752319 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/fmt?expand=0&rev=9 --- ...-install-pkg-config-file-into-libdir.patch | 30 ------------------- baselibs.conf | 2 +- fmt-5.3.0.tar.gz | 3 -- fmt-6.0.0.tar.gz | 3 ++ fmt.changes | 10 +++++++ fmt.spec | 9 +++--- 6 files changed, 18 insertions(+), 39 deletions(-) delete mode 100644 0001-install-pkg-config-file-into-libdir.patch delete mode 100644 fmt-5.3.0.tar.gz create mode 100644 fmt-6.0.0.tar.gz diff --git a/0001-install-pkg-config-file-into-libdir.patch b/0001-install-pkg-config-file-into-libdir.patch deleted file mode 100644 index f4d36a3..0000000 --- a/0001-install-pkg-config-file-into-libdir.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Olaf Hering -Date: Mon, 25 Mar 2019 17:10:40 +0100 -Subject: install pkg-config file into libdir - -Most pkgconfig files contain a Libs: variable, which is either /usr/lib -or /usr/lib64. If a 32bit and a 64bit variant of fmt libraries is -installed, the last one wins. As a result compiling for the other -bitsize will fail. - -Instead of sharedir use libdir as install target. - -Fixes commit 9d0c9c4bb145a286f725cd38c90331eee7addc7f -Fixes commit 287342dab10a5a96479b3e21cd11ce671ed8125c - -Signed-off-by: Olaf Hering ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -205,7 +205,7 @@ if (FMT_INSTALL) - set(FMT_INC_DIR ${CMAKE_INSTALL_INCLUDEDIR}/fmt CACHE STRING - "Installation directory for include files, relative to ${CMAKE_INSTALL_PREFIX}.") - -- set(FMT_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/share/pkgconfig" CACHE PATH -+ set(FMT_PKGCONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig CACHE PATH - "Installation directory for pkgconfig (.pc) files, relative to ${CMAKE_INSTALL_PREFIX}.") - - # Generate the version, config and target files into the build directory. diff --git a/baselibs.conf b/baselibs.conf index 7afeb8b..bdc9cea 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1 +1 @@ -libfmt5 +libfmt6 diff --git a/fmt-5.3.0.tar.gz b/fmt-5.3.0.tar.gz deleted file mode 100644 index 69bd8e9..0000000 --- a/fmt-5.3.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:defa24a9af4c622a7134076602070b45721a43c51598c8456ec6f2c4dbb51c89 -size 662493 diff --git a/fmt-6.0.0.tar.gz b/fmt-6.0.0.tar.gz new file mode 100644 index 0000000..576ed18 --- /dev/null +++ b/fmt-6.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f1907a58d5e86e6c382e51441d92ad9e23aea63827ba47fd647eacc0d3a16c78 +size 708425 diff --git a/fmt.changes b/fmt.changes index 191b3da..d0bb4c3 100644 --- a/fmt.changes +++ b/fmt.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Nov 29 08:46:30 UTC 2019 - Luigi Baldoni + +- Update to version 6.0.0 + (too many changes to list, see ChangeLog.rst) +- Dropped 0001-install-pkg-config-file-into-libdir.patch (no + longer necessary) +- Switched to MIT license +- Increased SOVERSION to 6 + ------------------------------------------------------------------- Mon Mar 25 16:21:01 UTC 2019 - olaf@aepfle.de diff --git a/fmt.spec b/fmt.spec index da0c8a7..5ac35c4 100644 --- a/fmt.spec +++ b/fmt.spec @@ -1,7 +1,7 @@ # # spec file for package fmt # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,17 +16,16 @@ # -%define sover 5 +%define sover 6 Name: fmt -Version: 5.3.0 +Version: 6.0.0 Release: 0 Summary: A formatting library for C++ -License: BSD-2-Clause +License: MIT Group: Development/Libraries/C and C++ URL: http://fmtlib.net/ Source0: https://github.com/fmtlib/fmt/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: baselibs.conf -Patch0: 0001-install-pkg-config-file-into-libdir.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkgconfig From 093c9ccab8ae55be9a4df569bba7ec4b3f82c1973fc1ced8aa31ac4b4635d512 Mon Sep 17 00:00:00 2001 From: Luigi Baldoni Date: Sun, 1 Dec 2019 09:17:42 +0000 Subject: [PATCH 2/4] Accepting request 752684 from home:alois:branches:devel:libraries:c_c++ fix big endian build OBS-URL: https://build.opensuse.org/request/show/752684 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/fmt?expand=0&rev=10 --- fmt-bigendian_1.patch | 102 ++++++++++++++++++++++++++++++++++++++++++ fmt-bigendian_2.patch | 25 +++++++++++ fmt-bigendian_3.patch | 35 +++++++++++++++ fmt-bigendian_4.patch | 38 ++++++++++++++++ fmt.changes | 7 +++ fmt.spec | 8 ++++ 6 files changed, 215 insertions(+) create mode 100644 fmt-bigendian_1.patch create mode 100644 fmt-bigendian_2.patch create mode 100644 fmt-bigendian_3.patch create mode 100644 fmt-bigendian_4.patch diff --git a/fmt-bigendian_1.patch b/fmt-bigendian_1.patch new file mode 100644 index 0000000..1e7f6af --- /dev/null +++ b/fmt-bigendian_1.patch @@ -0,0 +1,102 @@ +From bb205d940d8929d086eadb59705349dbdaa1a274 Mon Sep 17 00:00:00 2001 +From: Victor Zverovich +Date: Fri, 29 Nov 2019 05:15:59 -0800 +Subject: [PATCH] Fix fallback pointer formatting on big endian + +--- + include/fmt/format-inl.h | 2 +- + include/fmt/format.h | 40 ++++++++++++++++++++++++++++------------ + test/format-impl-test.cc | 2 +- + 3 files changed, 30 insertions(+), 14 deletions(-) + +Index: fmt-6.0.0/include/fmt/format-inl.h +=================================================================== +--- fmt-6.0.0.orig/include/fmt/format-inl.h ++++ fmt-6.0.0/include/fmt/format-inl.h +@@ -241,7 +241,7 @@ FMT_FUNC void system_error::init(int err + namespace internal { + + template <> FMT_FUNC int count_digits<4>(internal::fallback_uintptr n) { +- // Assume little endian; pointer formatting is implementation-defined anyway. ++ // fallback_uintptr is always stored in little endian. + int i = static_cast(sizeof(void*)) - 1; + while (i > 0 && n.value[i] == 0) --i; + auto char_digits = std::numeric_limits::digits / 4; +Index: fmt-6.0.0/include/fmt/format.h +=================================================================== +--- fmt-6.0.0.orig/include/fmt/format.h ++++ fmt-6.0.0/include/fmt/format.h +@@ -196,17 +196,7 @@ FMT_END_NAMESPACE + FMT_BEGIN_NAMESPACE + namespace internal { + +-// A fallback implementation of uintptr_t for systems that lack it. +-struct fallback_uintptr { +- unsigned char value[sizeof(void*)]; +-}; +-#ifdef UINTPTR_MAX +-using uintptr_t = ::uintptr_t; +-#else +-using uintptr_t = fallback_uintptr; +-#endif +- +-// An equivalent of `*reinterpret_cast(&source)` that doesn't produce ++// An equivalent of `*reinterpret_cast(&source)` that doesn't have + // undefined behavior (e.g. due to type aliasing). + // Example: uint64_t d = bit_cast(2.718); + template +@@ -217,6 +207,32 @@ inline Dest bit_cast(const Source& sourc + return dest; + } + ++inline bool is_big_endian() { ++ auto u = 1u; ++ struct bytes { char data[sizeof(u)]; }; ++ return bit_cast(u).data[0] == 0; ++} ++ ++// A fallback implementation of uintptr_t for systems that lack it. ++struct fallback_uintptr { ++ unsigned char value[sizeof(void*)]; ++ ++ fallback_uintptr() = default; ++ explicit fallback_uintptr(const void* p) { ++ *this = bit_cast(p); ++ if (is_big_endian()) std::memmove(value, value, sizeof(void*)); ++ } ++}; ++#ifdef UINTPTR_MAX ++using uintptr_t = ::uintptr_t; ++inline uintptr_t to_uintptr(const void* p) { return bit_cast(p); } ++#else ++using uintptr_t = fallback_uintptr; ++inline fallback_uintptr to_uintptr(const void* p) { ++ return fallback_uintptr(p); ++} ++#endif ++ + // An approximation of iterator_t for pre-C++20 systems. + template + using iterator_t = decltype(std::begin(std::declval())); +@@ -1731,7 +1747,7 @@ class arg_formatter_base { + } + + void write_pointer(const void* p) { +- writer_.write_pointer(internal::bit_cast(p), specs_); ++ writer_.write_pointer(internal::to_uintptr(p), specs_); + } + + protected: +Index: fmt-6.0.0/test/format-impl-test.cc +=================================================================== +--- fmt-6.0.0.orig/test/format-impl-test.cc ++++ fmt-6.0.0/test/format-impl-test.cc +@@ -259,7 +259,7 @@ TEST(UtilTest, CountDigits) { + TEST(UtilTest, WriteUIntPtr) { + fmt::memory_buffer buf; + fmt::internal::writer writer(buf); +- writer.write_pointer(fmt::internal::bit_cast( ++ writer.write_pointer(fmt::internal::fallback_uintptr( + reinterpret_cast(0xface)), + nullptr); + EXPECT_EQ("0xface", to_string(buf)); diff --git a/fmt-bigendian_2.patch b/fmt-bigendian_2.patch new file mode 100644 index 0000000..69e74e5 --- /dev/null +++ b/fmt-bigendian_2.patch @@ -0,0 +1,25 @@ +From aaf829bfb124fcd7953c33f38154027537efb072 Mon Sep 17 00:00:00 2001 +From: Victor Zverovich +Date: Fri, 29 Nov 2019 07:07:08 -0800 +Subject: [PATCH] Fix fallback pointer formatting on big endian, take 2 + +--- + include/fmt/format.h | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +Index: fmt-6.0.0/include/fmt/format.h +=================================================================== +--- fmt-6.0.0.orig/include/fmt/format.h ++++ fmt-6.0.0/include/fmt/format.h +@@ -220,7 +220,10 @@ struct fallback_uintptr { + fallback_uintptr() = default; + explicit fallback_uintptr(const void* p) { + *this = bit_cast(p); +- if (is_big_endian()) std::memmove(value, value, sizeof(void*)); ++ if (is_big_endian()) { ++ for (size_t i = 0, j = sizeof(void*) - 1; i < j; ++i, --j) ++ std::swap(value[i], value[j]); ++ } + } + }; + #ifdef UINTPTR_MAX diff --git a/fmt-bigendian_3.patch b/fmt-bigendian_3.patch new file mode 100644 index 0000000..4534437 --- /dev/null +++ b/fmt-bigendian_3.patch @@ -0,0 +1,35 @@ +From fafb03fa6d764f3cedf80e222a1e5998b80ef79c Mon Sep 17 00:00:00 2001 +From: Victor Zverovich +Date: Sat, 30 Nov 2019 06:35:52 -0800 +Subject: [PATCH] Fix handling of fallback_uintptr + +--- + include/fmt/format.h | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +Index: fmt-6.0.0/include/fmt/format.h +=================================================================== +--- fmt-6.0.0.orig/include/fmt/format.h ++++ fmt-6.0.0/include/fmt/format.h +@@ -281,6 +281,12 @@ template + inline typename Container::value_type* get_data(Container& c) { + return c.data(); + } ++template constexpr int digits() { ++ return std::numeric_limits::digits; ++} ++template <> constexpr int digits() { ++ return sizeof(void*) * std::numeric_limits::digits; ++} + + #ifdef _SECURE_SCL + // Make a checked iterator to avoid MSVC warnings. +@@ -900,7 +906,7 @@ Char* format_uint(Char* buffer, internal + template + inline It format_uint(It out, UInt value, int num_digits, bool upper = false) { + // Buffer should be large enough to hold all digits (digits / BASE_BITS + 1). +- char buffer[std::numeric_limits::digits / BASE_BITS + 1]; ++ char buffer[digits() / BASE_BITS + 1]; + format_uint(buffer, value, num_digits, upper); + return internal::copy_str(buffer, buffer + num_digits, out); + } diff --git a/fmt-bigendian_4.patch b/fmt-bigendian_4.patch new file mode 100644 index 0000000..cfc746a --- /dev/null +++ b/fmt-bigendian_4.patch @@ -0,0 +1,38 @@ +From ba6e330fd3a9c2d859d651c59d6206620940a265 Mon Sep 17 00:00:00 2001 +From: Victor Zverovich +Date: Sat, 30 Nov 2019 08:19:58 -0800 +Subject: [PATCH] digits -> num_bits + +--- + include/fmt/format.h | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +Index: fmt-6.0.0/include/fmt/format.h +=================================================================== +--- fmt-6.0.0.orig/include/fmt/format.h ++++ fmt-6.0.0/include/fmt/format.h +@@ -281,11 +281,12 @@ template + inline typename Container::value_type* get_data(Container& c) { + return c.data(); + } +-template constexpr int digits() { ++template constexpr int num_bits() { + return std::numeric_limits::digits; + } +-template <> constexpr int digits() { +- return sizeof(void*) * std::numeric_limits::digits; ++template <> constexpr int num_bits() { ++ return static_cast(sizeof(void*) * ++ std::numeric_limits::digits); + } + + #ifdef _SECURE_SCL +@@ -906,7 +907,7 @@ Char* format_uint(Char* buffer, internal + template + inline It format_uint(It out, UInt value, int num_digits, bool upper = false) { + // Buffer should be large enough to hold all digits (digits / BASE_BITS + 1). +- char buffer[digits() / BASE_BITS + 1]; ++ char buffer[num_bits() / BASE_BITS + 1]; + format_uint(buffer, value, num_digits, upper); + return internal::copy_str(buffer, buffer + num_digits, out); + } diff --git a/fmt.changes b/fmt.changes index d0bb4c3..1f01271 100644 --- a/fmt.changes +++ b/fmt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sun Dec 1 08:54:54 UTC 2019 - Luigi Baldoni + +- Added fmt-bigendian_1.patch, fmt-bigendian_2.patch, + fmt-bigendian_3.patch and fmt-bigendian_4.patch to fix tests + on big endian targets + ------------------------------------------------------------------- Fri Nov 29 08:46:30 UTC 2019 - Luigi Baldoni diff --git a/fmt.spec b/fmt.spec index 5ac35c4..e4f5888 100644 --- a/fmt.spec +++ b/fmt.spec @@ -26,6 +26,14 @@ Group: Development/Libraries/C and C++ URL: http://fmtlib.net/ Source0: https://github.com/fmtlib/fmt/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: baselibs.conf +# PATCH-FIX-UPSTREAM fmt-bigendian_1.patch +Patch0: fmt-bigendian_1.patch +# PATCH-FIX-UPSTREAM fmt-bigendian_2.patch +Patch1: fmt-bigendian_2.patch +# PATCH-FIX-UPSTREAM fmt-bigendian_3.patch +Patch2: fmt-bigendian_3.patch +# PATCH-FIX-UPSTREAM fmt-bigendian_4.patch +Patch3: fmt-bigendian_4.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkgconfig From f9b3ea678dec94adafd09ff5629cac4ccc1d6f18a583c12a1cb37a0cb1f45696 Mon Sep 17 00:00:00 2001 From: Luigi Baldoni Date: Mon, 2 Dec 2019 15:29:26 +0000 Subject: [PATCH 3/4] Accepting request 752966 from home:alois:branches:devel:libraries:c_c++ update to 6.1.0 OBS-URL: https://build.opensuse.org/request/show/752966 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/fmt?expand=0&rev=11 --- fmt-6.0.0.tar.gz | 3 - fmt-6.1.0.tar.gz | 3 + fmt-bigendian_1.patch | 102 -------------------------------- fmt-bigendian_2.patch | 25 -------- fmt-bigendian_3.patch | 35 ----------- fmt-bigendian_4.patch | 38 ------------ fmt.changes | 134 ++++++++++++++++++++++++++++++++++++++++-- fmt.spec | 10 +--- 8 files changed, 134 insertions(+), 216 deletions(-) delete mode 100644 fmt-6.0.0.tar.gz create mode 100644 fmt-6.1.0.tar.gz delete mode 100644 fmt-bigendian_1.patch delete mode 100644 fmt-bigendian_2.patch delete mode 100644 fmt-bigendian_3.patch delete mode 100644 fmt-bigendian_4.patch diff --git a/fmt-6.0.0.tar.gz b/fmt-6.0.0.tar.gz deleted file mode 100644 index 576ed18..0000000 --- a/fmt-6.0.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f1907a58d5e86e6c382e51441d92ad9e23aea63827ba47fd647eacc0d3a16c78 -size 708425 diff --git a/fmt-6.1.0.tar.gz b/fmt-6.1.0.tar.gz new file mode 100644 index 0000000..74725d9 --- /dev/null +++ b/fmt-6.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8fb84291a7ed6b4db4769115b57fa56d5467b1ab8c3ba5bdf78c820e4bd17944 +size 722127 diff --git a/fmt-bigendian_1.patch b/fmt-bigendian_1.patch deleted file mode 100644 index 1e7f6af..0000000 --- a/fmt-bigendian_1.patch +++ /dev/null @@ -1,102 +0,0 @@ -From bb205d940d8929d086eadb59705349dbdaa1a274 Mon Sep 17 00:00:00 2001 -From: Victor Zverovich -Date: Fri, 29 Nov 2019 05:15:59 -0800 -Subject: [PATCH] Fix fallback pointer formatting on big endian - ---- - include/fmt/format-inl.h | 2 +- - include/fmt/format.h | 40 ++++++++++++++++++++++++++++------------ - test/format-impl-test.cc | 2 +- - 3 files changed, 30 insertions(+), 14 deletions(-) - -Index: fmt-6.0.0/include/fmt/format-inl.h -=================================================================== ---- fmt-6.0.0.orig/include/fmt/format-inl.h -+++ fmt-6.0.0/include/fmt/format-inl.h -@@ -241,7 +241,7 @@ FMT_FUNC void system_error::init(int err - namespace internal { - - template <> FMT_FUNC int count_digits<4>(internal::fallback_uintptr n) { -- // Assume little endian; pointer formatting is implementation-defined anyway. -+ // fallback_uintptr is always stored in little endian. - int i = static_cast(sizeof(void*)) - 1; - while (i > 0 && n.value[i] == 0) --i; - auto char_digits = std::numeric_limits::digits / 4; -Index: fmt-6.0.0/include/fmt/format.h -=================================================================== ---- fmt-6.0.0.orig/include/fmt/format.h -+++ fmt-6.0.0/include/fmt/format.h -@@ -196,17 +196,7 @@ FMT_END_NAMESPACE - FMT_BEGIN_NAMESPACE - namespace internal { - --// A fallback implementation of uintptr_t for systems that lack it. --struct fallback_uintptr { -- unsigned char value[sizeof(void*)]; --}; --#ifdef UINTPTR_MAX --using uintptr_t = ::uintptr_t; --#else --using uintptr_t = fallback_uintptr; --#endif -- --// An equivalent of `*reinterpret_cast(&source)` that doesn't produce -+// An equivalent of `*reinterpret_cast(&source)` that doesn't have - // undefined behavior (e.g. due to type aliasing). - // Example: uint64_t d = bit_cast(2.718); - template -@@ -217,6 +207,32 @@ inline Dest bit_cast(const Source& sourc - return dest; - } - -+inline bool is_big_endian() { -+ auto u = 1u; -+ struct bytes { char data[sizeof(u)]; }; -+ return bit_cast(u).data[0] == 0; -+} -+ -+// A fallback implementation of uintptr_t for systems that lack it. -+struct fallback_uintptr { -+ unsigned char value[sizeof(void*)]; -+ -+ fallback_uintptr() = default; -+ explicit fallback_uintptr(const void* p) { -+ *this = bit_cast(p); -+ if (is_big_endian()) std::memmove(value, value, sizeof(void*)); -+ } -+}; -+#ifdef UINTPTR_MAX -+using uintptr_t = ::uintptr_t; -+inline uintptr_t to_uintptr(const void* p) { return bit_cast(p); } -+#else -+using uintptr_t = fallback_uintptr; -+inline fallback_uintptr to_uintptr(const void* p) { -+ return fallback_uintptr(p); -+} -+#endif -+ - // An approximation of iterator_t for pre-C++20 systems. - template - using iterator_t = decltype(std::begin(std::declval())); -@@ -1731,7 +1747,7 @@ class arg_formatter_base { - } - - void write_pointer(const void* p) { -- writer_.write_pointer(internal::bit_cast(p), specs_); -+ writer_.write_pointer(internal::to_uintptr(p), specs_); - } - - protected: -Index: fmt-6.0.0/test/format-impl-test.cc -=================================================================== ---- fmt-6.0.0.orig/test/format-impl-test.cc -+++ fmt-6.0.0/test/format-impl-test.cc -@@ -259,7 +259,7 @@ TEST(UtilTest, CountDigits) { - TEST(UtilTest, WriteUIntPtr) { - fmt::memory_buffer buf; - fmt::internal::writer writer(buf); -- writer.write_pointer(fmt::internal::bit_cast( -+ writer.write_pointer(fmt::internal::fallback_uintptr( - reinterpret_cast(0xface)), - nullptr); - EXPECT_EQ("0xface", to_string(buf)); diff --git a/fmt-bigendian_2.patch b/fmt-bigendian_2.patch deleted file mode 100644 index 69e74e5..0000000 --- a/fmt-bigendian_2.patch +++ /dev/null @@ -1,25 +0,0 @@ -From aaf829bfb124fcd7953c33f38154027537efb072 Mon Sep 17 00:00:00 2001 -From: Victor Zverovich -Date: Fri, 29 Nov 2019 07:07:08 -0800 -Subject: [PATCH] Fix fallback pointer formatting on big endian, take 2 - ---- - include/fmt/format.h | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -Index: fmt-6.0.0/include/fmt/format.h -=================================================================== ---- fmt-6.0.0.orig/include/fmt/format.h -+++ fmt-6.0.0/include/fmt/format.h -@@ -220,7 +220,10 @@ struct fallback_uintptr { - fallback_uintptr() = default; - explicit fallback_uintptr(const void* p) { - *this = bit_cast(p); -- if (is_big_endian()) std::memmove(value, value, sizeof(void*)); -+ if (is_big_endian()) { -+ for (size_t i = 0, j = sizeof(void*) - 1; i < j; ++i, --j) -+ std::swap(value[i], value[j]); -+ } - } - }; - #ifdef UINTPTR_MAX diff --git a/fmt-bigendian_3.patch b/fmt-bigendian_3.patch deleted file mode 100644 index 4534437..0000000 --- a/fmt-bigendian_3.patch +++ /dev/null @@ -1,35 +0,0 @@ -From fafb03fa6d764f3cedf80e222a1e5998b80ef79c Mon Sep 17 00:00:00 2001 -From: Victor Zverovich -Date: Sat, 30 Nov 2019 06:35:52 -0800 -Subject: [PATCH] Fix handling of fallback_uintptr - ---- - include/fmt/format.h | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -Index: fmt-6.0.0/include/fmt/format.h -=================================================================== ---- fmt-6.0.0.orig/include/fmt/format.h -+++ fmt-6.0.0/include/fmt/format.h -@@ -281,6 +281,12 @@ template - inline typename Container::value_type* get_data(Container& c) { - return c.data(); - } -+template constexpr int digits() { -+ return std::numeric_limits::digits; -+} -+template <> constexpr int digits() { -+ return sizeof(void*) * std::numeric_limits::digits; -+} - - #ifdef _SECURE_SCL - // Make a checked iterator to avoid MSVC warnings. -@@ -900,7 +906,7 @@ Char* format_uint(Char* buffer, internal - template - inline It format_uint(It out, UInt value, int num_digits, bool upper = false) { - // Buffer should be large enough to hold all digits (digits / BASE_BITS + 1). -- char buffer[std::numeric_limits::digits / BASE_BITS + 1]; -+ char buffer[digits() / BASE_BITS + 1]; - format_uint(buffer, value, num_digits, upper); - return internal::copy_str(buffer, buffer + num_digits, out); - } diff --git a/fmt-bigendian_4.patch b/fmt-bigendian_4.patch deleted file mode 100644 index cfc746a..0000000 --- a/fmt-bigendian_4.patch +++ /dev/null @@ -1,38 +0,0 @@ -From ba6e330fd3a9c2d859d651c59d6206620940a265 Mon Sep 17 00:00:00 2001 -From: Victor Zverovich -Date: Sat, 30 Nov 2019 08:19:58 -0800 -Subject: [PATCH] digits -> num_bits - ---- - include/fmt/format.h | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -Index: fmt-6.0.0/include/fmt/format.h -=================================================================== ---- fmt-6.0.0.orig/include/fmt/format.h -+++ fmt-6.0.0/include/fmt/format.h -@@ -281,11 +281,12 @@ template - inline typename Container::value_type* get_data(Container& c) { - return c.data(); - } --template constexpr int digits() { -+template constexpr int num_bits() { - return std::numeric_limits::digits; - } --template <> constexpr int digits() { -- return sizeof(void*) * std::numeric_limits::digits; -+template <> constexpr int num_bits() { -+ return static_cast(sizeof(void*) * -+ std::numeric_limits::digits); - } - - #ifdef _SECURE_SCL -@@ -906,7 +907,7 @@ Char* format_uint(Char* buffer, internal - template - inline It format_uint(It out, UInt value, int num_digits, bool upper = false) { - // Buffer should be large enough to hold all digits (digits / BASE_BITS + 1). -- char buffer[digits() / BASE_BITS + 1]; -+ char buffer[num_bits() / BASE_BITS + 1]; - format_uint(buffer, value, num_digits, upper); - return internal::copy_str(buffer, buffer + num_digits, out); - } diff --git a/fmt.changes b/fmt.changes index 1f01271..7ed666a 100644 --- a/fmt.changes +++ b/fmt.changes @@ -1,9 +1,135 @@ ------------------------------------------------------------------- -Sun Dec 1 08:54:54 UTC 2019 - Luigi Baldoni +Mon Dec 2 15:07:08 UTC 2019 - Luigi Baldoni -- Added fmt-bigendian_1.patch, fmt-bigendian_2.patch, - fmt-bigendian_3.patch and fmt-bigendian_4.patch to fix tests - on big endian targets +- Update to version 6.1.0 + * {fmt} now formats IEEE 754 ``float`` and ``double`` using + the shortest decimal representation with correct rounding by + default: + .. code:: c++ + + #include + #include + + int main() { + fmt::print("{}", M_PI); + } + + prints ``3.141592653589793``. + * Made the fast binary to decimal floating-point formatter the + default, simplified it and improved performance. {fmt} is now + 15 times faster than libc++'s ``std::ostringstream``, 11 + times faster than ``printf`` and 10% faster than + double-conversion on `dtoa-benchmark + (https://github.com/fmtlib/dtoa-benchmark) + + ================== ========= ======= + Function Time (ns) Speedup + ================== ========= ======= + ostringstream 1,346.30 1.00x + ostrstream 1,195.74 1.13x + sprintf 995.08 1.35x + doubleconv 99.10 13.59x + fmt 88.34 15.24x + ================== ========= ======= + * {fmt} no longer converts ``float`` arguments to ``double``. + In particular this improves the default (shortest) + representation of floats and makes + ``fmt::format`` consistent with ``std::format`` specs + (#1336, #1353, #1360, #1361) + .. code:: c++ + + fmt::print("{}", 0.1f); + + prints ``0.1`` instead of ``0.10000000149011612``. + * Made floating-point formatting output consistent with + ``printf``/iostreams (#1376, #1417) + * Added support for 128-bit integers (#1287) + .. code:: c++ + + fmt::print("{}", std::numeric_limits<__int128_t>::max()); + + prints ``170141183460469231731687303715884105727``. + * The overload of ``print`` that takes ``text_style`` is now + atomic, i.e. the output from different threads doesn't + interleave (#1351) + * Made compile time in the header-only mode ~20% faster by + reducing the number of template instantiations. ``wchar_t`` + overload of ``vprint`` was moved from + ``fmt/core.h`` to ``fmt/format.h``. + * Added an overload of ``fmt::join`` that works with tuples + (#1322, #1330) + .. code:: c++ + + #include + #include + + int main() { + std::tuple t{'a', 1, 2.0f}; + fmt::print("{}", t); + } + + prints ``('a', 1, 2.0)``. + * Changed formatting of octal zero with prefix from "0o0" to + "0": + .. code:: c++ + + fmt::print("{:#o}", 0); + + prints ``0``. + * The locale is now passed to ostream insertion (``<<``) + operators (#1406) + .. code:: c++ + + #include + #include + + struct S { + double value; + }; + + std::ostream& operator<<(std::ostream& os, S s) { + return os << s.value; + } + + int main() { + auto s = fmt::format(std::locale("fr_FR.UTF-8"), "{}", S{0.42}); + // s == "0,42" + } + * Locale-specific number formatting now uses grouping (#1393, + #1394) + * Fixed handling of types with deleted implicit rvalue + conversion to ``const char**`` (#1421) + .. code:: c++ + + struct mystring { + operator const char*() const&; + operator const char*() &; + operator const char*() const&& = delete; + operator const char*() && = delete; + }; + mystring str; + fmt::print("{}", str); // now compiles + * Enums are now mapped to correct underlying types instead of + ``int`` (#1286) + * Enum classes are no longer implicitly converted to ``int`` + (#1424) + * Added ``basic_format_parse_context`` for consistency with + C++20 ``std::format`` and deprecated ``basic_parse_context``. + * Fixed handling of UTF-8 in precision (#1389, #1390) + * Added a CUDA test (#1285, #1317) + * Improved documentation (#1276, #1291, #1296, #1315, #1332, + #1337, #1395, #1418) + * Various code improvements (#1358, #1407) + * Fixed compile-time format string checks for user-defined + types (#1292) + * Worked around a false positive in + ``unsigned-integer-overflow`` sanitizer (#1377) + * Fixed various warnings and compilation issues (#1273, #1278, + #1280, #1281, #1288, #1290, #1301, #1305, #1306, #1309, + #1312, #1313, #1316, #1319, #1320, #1326, #1328, #1344, + #1345, #1347, #1349, #1354, #1362, #1366, #1364, #1370, + #1371, #1385, #1388, #1397, #1414, #1416, #1422, #1427, + #1431, #1433) ------------------------------------------------------------------- Fri Nov 29 08:46:30 UTC 2019 - Luigi Baldoni diff --git a/fmt.spec b/fmt.spec index e4f5888..ce63c73 100644 --- a/fmt.spec +++ b/fmt.spec @@ -18,7 +18,7 @@ %define sover 6 Name: fmt -Version: 6.0.0 +Version: 6.1.0 Release: 0 Summary: A formatting library for C++ License: MIT @@ -26,14 +26,6 @@ Group: Development/Libraries/C and C++ URL: http://fmtlib.net/ Source0: https://github.com/fmtlib/fmt/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: baselibs.conf -# PATCH-FIX-UPSTREAM fmt-bigendian_1.patch -Patch0: fmt-bigendian_1.patch -# PATCH-FIX-UPSTREAM fmt-bigendian_2.patch -Patch1: fmt-bigendian_2.patch -# PATCH-FIX-UPSTREAM fmt-bigendian_3.patch -Patch2: fmt-bigendian_3.patch -# PATCH-FIX-UPSTREAM fmt-bigendian_4.patch -Patch3: fmt-bigendian_4.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkgconfig From 05f4a8eecc8b8be1e563b7c357072fabb014aa56800a1869e2e7d73bada37698 Mon Sep 17 00:00:00 2001 From: Luigi Baldoni Date: Wed, 4 Dec 2019 11:16:33 +0000 Subject: [PATCH 4/4] - Added fmt-bigendian_1.patch, fmt-bigendian_2.patch, fmt-bigendian_3.patch and fmt-bigendian_4.patch to fix tests on big endian targets OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/fmt?expand=0&rev=12 --- fmt-6.0.0.tar.gz | 3 + fmt-6.1.0.tar.gz | 3 - fmt-bigendian_1.patch | 102 ++++++++++++++++++++++++++++++++ fmt-bigendian_2.patch | 25 ++++++++ fmt-bigendian_3.patch | 35 +++++++++++ fmt-bigendian_4.patch | 38 ++++++++++++ fmt.changes | 134 ++---------------------------------------- fmt.spec | 10 +++- 8 files changed, 216 insertions(+), 134 deletions(-) create mode 100644 fmt-6.0.0.tar.gz delete mode 100644 fmt-6.1.0.tar.gz create mode 100644 fmt-bigendian_1.patch create mode 100644 fmt-bigendian_2.patch create mode 100644 fmt-bigendian_3.patch create mode 100644 fmt-bigendian_4.patch diff --git a/fmt-6.0.0.tar.gz b/fmt-6.0.0.tar.gz new file mode 100644 index 0000000..576ed18 --- /dev/null +++ b/fmt-6.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f1907a58d5e86e6c382e51441d92ad9e23aea63827ba47fd647eacc0d3a16c78 +size 708425 diff --git a/fmt-6.1.0.tar.gz b/fmt-6.1.0.tar.gz deleted file mode 100644 index 74725d9..0000000 --- a/fmt-6.1.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8fb84291a7ed6b4db4769115b57fa56d5467b1ab8c3ba5bdf78c820e4bd17944 -size 722127 diff --git a/fmt-bigendian_1.patch b/fmt-bigendian_1.patch new file mode 100644 index 0000000..1e7f6af --- /dev/null +++ b/fmt-bigendian_1.patch @@ -0,0 +1,102 @@ +From bb205d940d8929d086eadb59705349dbdaa1a274 Mon Sep 17 00:00:00 2001 +From: Victor Zverovich +Date: Fri, 29 Nov 2019 05:15:59 -0800 +Subject: [PATCH] Fix fallback pointer formatting on big endian + +--- + include/fmt/format-inl.h | 2 +- + include/fmt/format.h | 40 ++++++++++++++++++++++++++++------------ + test/format-impl-test.cc | 2 +- + 3 files changed, 30 insertions(+), 14 deletions(-) + +Index: fmt-6.0.0/include/fmt/format-inl.h +=================================================================== +--- fmt-6.0.0.orig/include/fmt/format-inl.h ++++ fmt-6.0.0/include/fmt/format-inl.h +@@ -241,7 +241,7 @@ FMT_FUNC void system_error::init(int err + namespace internal { + + template <> FMT_FUNC int count_digits<4>(internal::fallback_uintptr n) { +- // Assume little endian; pointer formatting is implementation-defined anyway. ++ // fallback_uintptr is always stored in little endian. + int i = static_cast(sizeof(void*)) - 1; + while (i > 0 && n.value[i] == 0) --i; + auto char_digits = std::numeric_limits::digits / 4; +Index: fmt-6.0.0/include/fmt/format.h +=================================================================== +--- fmt-6.0.0.orig/include/fmt/format.h ++++ fmt-6.0.0/include/fmt/format.h +@@ -196,17 +196,7 @@ FMT_END_NAMESPACE + FMT_BEGIN_NAMESPACE + namespace internal { + +-// A fallback implementation of uintptr_t for systems that lack it. +-struct fallback_uintptr { +- unsigned char value[sizeof(void*)]; +-}; +-#ifdef UINTPTR_MAX +-using uintptr_t = ::uintptr_t; +-#else +-using uintptr_t = fallback_uintptr; +-#endif +- +-// An equivalent of `*reinterpret_cast(&source)` that doesn't produce ++// An equivalent of `*reinterpret_cast(&source)` that doesn't have + // undefined behavior (e.g. due to type aliasing). + // Example: uint64_t d = bit_cast(2.718); + template +@@ -217,6 +207,32 @@ inline Dest bit_cast(const Source& sourc + return dest; + } + ++inline bool is_big_endian() { ++ auto u = 1u; ++ struct bytes { char data[sizeof(u)]; }; ++ return bit_cast(u).data[0] == 0; ++} ++ ++// A fallback implementation of uintptr_t for systems that lack it. ++struct fallback_uintptr { ++ unsigned char value[sizeof(void*)]; ++ ++ fallback_uintptr() = default; ++ explicit fallback_uintptr(const void* p) { ++ *this = bit_cast(p); ++ if (is_big_endian()) std::memmove(value, value, sizeof(void*)); ++ } ++}; ++#ifdef UINTPTR_MAX ++using uintptr_t = ::uintptr_t; ++inline uintptr_t to_uintptr(const void* p) { return bit_cast(p); } ++#else ++using uintptr_t = fallback_uintptr; ++inline fallback_uintptr to_uintptr(const void* p) { ++ return fallback_uintptr(p); ++} ++#endif ++ + // An approximation of iterator_t for pre-C++20 systems. + template + using iterator_t = decltype(std::begin(std::declval())); +@@ -1731,7 +1747,7 @@ class arg_formatter_base { + } + + void write_pointer(const void* p) { +- writer_.write_pointer(internal::bit_cast(p), specs_); ++ writer_.write_pointer(internal::to_uintptr(p), specs_); + } + + protected: +Index: fmt-6.0.0/test/format-impl-test.cc +=================================================================== +--- fmt-6.0.0.orig/test/format-impl-test.cc ++++ fmt-6.0.0/test/format-impl-test.cc +@@ -259,7 +259,7 @@ TEST(UtilTest, CountDigits) { + TEST(UtilTest, WriteUIntPtr) { + fmt::memory_buffer buf; + fmt::internal::writer writer(buf); +- writer.write_pointer(fmt::internal::bit_cast( ++ writer.write_pointer(fmt::internal::fallback_uintptr( + reinterpret_cast(0xface)), + nullptr); + EXPECT_EQ("0xface", to_string(buf)); diff --git a/fmt-bigendian_2.patch b/fmt-bigendian_2.patch new file mode 100644 index 0000000..69e74e5 --- /dev/null +++ b/fmt-bigendian_2.patch @@ -0,0 +1,25 @@ +From aaf829bfb124fcd7953c33f38154027537efb072 Mon Sep 17 00:00:00 2001 +From: Victor Zverovich +Date: Fri, 29 Nov 2019 07:07:08 -0800 +Subject: [PATCH] Fix fallback pointer formatting on big endian, take 2 + +--- + include/fmt/format.h | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +Index: fmt-6.0.0/include/fmt/format.h +=================================================================== +--- fmt-6.0.0.orig/include/fmt/format.h ++++ fmt-6.0.0/include/fmt/format.h +@@ -220,7 +220,10 @@ struct fallback_uintptr { + fallback_uintptr() = default; + explicit fallback_uintptr(const void* p) { + *this = bit_cast(p); +- if (is_big_endian()) std::memmove(value, value, sizeof(void*)); ++ if (is_big_endian()) { ++ for (size_t i = 0, j = sizeof(void*) - 1; i < j; ++i, --j) ++ std::swap(value[i], value[j]); ++ } + } + }; + #ifdef UINTPTR_MAX diff --git a/fmt-bigendian_3.patch b/fmt-bigendian_3.patch new file mode 100644 index 0000000..4534437 --- /dev/null +++ b/fmt-bigendian_3.patch @@ -0,0 +1,35 @@ +From fafb03fa6d764f3cedf80e222a1e5998b80ef79c Mon Sep 17 00:00:00 2001 +From: Victor Zverovich +Date: Sat, 30 Nov 2019 06:35:52 -0800 +Subject: [PATCH] Fix handling of fallback_uintptr + +--- + include/fmt/format.h | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +Index: fmt-6.0.0/include/fmt/format.h +=================================================================== +--- fmt-6.0.0.orig/include/fmt/format.h ++++ fmt-6.0.0/include/fmt/format.h +@@ -281,6 +281,12 @@ template + inline typename Container::value_type* get_data(Container& c) { + return c.data(); + } ++template constexpr int digits() { ++ return std::numeric_limits::digits; ++} ++template <> constexpr int digits() { ++ return sizeof(void*) * std::numeric_limits::digits; ++} + + #ifdef _SECURE_SCL + // Make a checked iterator to avoid MSVC warnings. +@@ -900,7 +906,7 @@ Char* format_uint(Char* buffer, internal + template + inline It format_uint(It out, UInt value, int num_digits, bool upper = false) { + // Buffer should be large enough to hold all digits (digits / BASE_BITS + 1). +- char buffer[std::numeric_limits::digits / BASE_BITS + 1]; ++ char buffer[digits() / BASE_BITS + 1]; + format_uint(buffer, value, num_digits, upper); + return internal::copy_str(buffer, buffer + num_digits, out); + } diff --git a/fmt-bigendian_4.patch b/fmt-bigendian_4.patch new file mode 100644 index 0000000..cfc746a --- /dev/null +++ b/fmt-bigendian_4.patch @@ -0,0 +1,38 @@ +From ba6e330fd3a9c2d859d651c59d6206620940a265 Mon Sep 17 00:00:00 2001 +From: Victor Zverovich +Date: Sat, 30 Nov 2019 08:19:58 -0800 +Subject: [PATCH] digits -> num_bits + +--- + include/fmt/format.h | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +Index: fmt-6.0.0/include/fmt/format.h +=================================================================== +--- fmt-6.0.0.orig/include/fmt/format.h ++++ fmt-6.0.0/include/fmt/format.h +@@ -281,11 +281,12 @@ template + inline typename Container::value_type* get_data(Container& c) { + return c.data(); + } +-template constexpr int digits() { ++template constexpr int num_bits() { + return std::numeric_limits::digits; + } +-template <> constexpr int digits() { +- return sizeof(void*) * std::numeric_limits::digits; ++template <> constexpr int num_bits() { ++ return static_cast(sizeof(void*) * ++ std::numeric_limits::digits); + } + + #ifdef _SECURE_SCL +@@ -906,7 +907,7 @@ Char* format_uint(Char* buffer, internal + template + inline It format_uint(It out, UInt value, int num_digits, bool upper = false) { + // Buffer should be large enough to hold all digits (digits / BASE_BITS + 1). +- char buffer[digits() / BASE_BITS + 1]; ++ char buffer[num_bits() / BASE_BITS + 1]; + format_uint(buffer, value, num_digits, upper); + return internal::copy_str(buffer, buffer + num_digits, out); + } diff --git a/fmt.changes b/fmt.changes index 7ed666a..1f01271 100644 --- a/fmt.changes +++ b/fmt.changes @@ -1,135 +1,9 @@ ------------------------------------------------------------------- -Mon Dec 2 15:07:08 UTC 2019 - Luigi Baldoni +Sun Dec 1 08:54:54 UTC 2019 - Luigi Baldoni -- Update to version 6.1.0 - * {fmt} now formats IEEE 754 ``float`` and ``double`` using - the shortest decimal representation with correct rounding by - default: - .. code:: c++ - - #include - #include - - int main() { - fmt::print("{}", M_PI); - } - - prints ``3.141592653589793``. - * Made the fast binary to decimal floating-point formatter the - default, simplified it and improved performance. {fmt} is now - 15 times faster than libc++'s ``std::ostringstream``, 11 - times faster than ``printf`` and 10% faster than - double-conversion on `dtoa-benchmark - (https://github.com/fmtlib/dtoa-benchmark) - - ================== ========= ======= - Function Time (ns) Speedup - ================== ========= ======= - ostringstream 1,346.30 1.00x - ostrstream 1,195.74 1.13x - sprintf 995.08 1.35x - doubleconv 99.10 13.59x - fmt 88.34 15.24x - ================== ========= ======= - * {fmt} no longer converts ``float`` arguments to ``double``. - In particular this improves the default (shortest) - representation of floats and makes - ``fmt::format`` consistent with ``std::format`` specs - (#1336, #1353, #1360, #1361) - .. code:: c++ - - fmt::print("{}", 0.1f); - - prints ``0.1`` instead of ``0.10000000149011612``. - * Made floating-point formatting output consistent with - ``printf``/iostreams (#1376, #1417) - * Added support for 128-bit integers (#1287) - .. code:: c++ - - fmt::print("{}", std::numeric_limits<__int128_t>::max()); - - prints ``170141183460469231731687303715884105727``. - * The overload of ``print`` that takes ``text_style`` is now - atomic, i.e. the output from different threads doesn't - interleave (#1351) - * Made compile time in the header-only mode ~20% faster by - reducing the number of template instantiations. ``wchar_t`` - overload of ``vprint`` was moved from - ``fmt/core.h`` to ``fmt/format.h``. - * Added an overload of ``fmt::join`` that works with tuples - (#1322, #1330) - .. code:: c++ - - #include - #include - - int main() { - std::tuple t{'a', 1, 2.0f}; - fmt::print("{}", t); - } - - prints ``('a', 1, 2.0)``. - * Changed formatting of octal zero with prefix from "0o0" to - "0": - .. code:: c++ - - fmt::print("{:#o}", 0); - - prints ``0``. - * The locale is now passed to ostream insertion (``<<``) - operators (#1406) - .. code:: c++ - - #include - #include - - struct S { - double value; - }; - - std::ostream& operator<<(std::ostream& os, S s) { - return os << s.value; - } - - int main() { - auto s = fmt::format(std::locale("fr_FR.UTF-8"), "{}", S{0.42}); - // s == "0,42" - } - * Locale-specific number formatting now uses grouping (#1393, - #1394) - * Fixed handling of types with deleted implicit rvalue - conversion to ``const char**`` (#1421) - .. code:: c++ - - struct mystring { - operator const char*() const&; - operator const char*() &; - operator const char*() const&& = delete; - operator const char*() && = delete; - }; - mystring str; - fmt::print("{}", str); // now compiles - * Enums are now mapped to correct underlying types instead of - ``int`` (#1286) - * Enum classes are no longer implicitly converted to ``int`` - (#1424) - * Added ``basic_format_parse_context`` for consistency with - C++20 ``std::format`` and deprecated ``basic_parse_context``. - * Fixed handling of UTF-8 in precision (#1389, #1390) - * Added a CUDA test (#1285, #1317) - * Improved documentation (#1276, #1291, #1296, #1315, #1332, - #1337, #1395, #1418) - * Various code improvements (#1358, #1407) - * Fixed compile-time format string checks for user-defined - types (#1292) - * Worked around a false positive in - ``unsigned-integer-overflow`` sanitizer (#1377) - * Fixed various warnings and compilation issues (#1273, #1278, - #1280, #1281, #1288, #1290, #1301, #1305, #1306, #1309, - #1312, #1313, #1316, #1319, #1320, #1326, #1328, #1344, - #1345, #1347, #1349, #1354, #1362, #1366, #1364, #1370, - #1371, #1385, #1388, #1397, #1414, #1416, #1422, #1427, - #1431, #1433) +- Added fmt-bigendian_1.patch, fmt-bigendian_2.patch, + fmt-bigendian_3.patch and fmt-bigendian_4.patch to fix tests + on big endian targets ------------------------------------------------------------------- Fri Nov 29 08:46:30 UTC 2019 - Luigi Baldoni diff --git a/fmt.spec b/fmt.spec index ce63c73..e4f5888 100644 --- a/fmt.spec +++ b/fmt.spec @@ -18,7 +18,7 @@ %define sover 6 Name: fmt -Version: 6.1.0 +Version: 6.0.0 Release: 0 Summary: A formatting library for C++ License: MIT @@ -26,6 +26,14 @@ Group: Development/Libraries/C and C++ URL: http://fmtlib.net/ Source0: https://github.com/fmtlib/fmt/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: baselibs.conf +# PATCH-FIX-UPSTREAM fmt-bigendian_1.patch +Patch0: fmt-bigendian_1.patch +# PATCH-FIX-UPSTREAM fmt-bigendian_2.patch +Patch1: fmt-bigendian_2.patch +# PATCH-FIX-UPSTREAM fmt-bigendian_3.patch +Patch2: fmt-bigendian_3.patch +# PATCH-FIX-UPSTREAM fmt-bigendian_4.patch +Patch3: fmt-bigendian_4.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkgconfig