From d5a194094a1c648cd991ae3a490b9ab70e6fa6a3 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 30 Mar 2020 15:22:56 +0100 Subject: [PATCH] Patch Boost.Format for C++20 compatibility with GCC 10 (#1818723) --- boost-1.69-format-allocator.patch | 28 ++++++++++++++++++++++++++++ boost.spec | 9 ++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 boost-1.69-format-allocator.patch diff --git a/boost-1.69-format-allocator.patch b/boost-1.69-format-allocator.patch new file mode 100644 index 0000000..28c43a8 --- /dev/null +++ b/boost-1.69-format-allocator.patch @@ -0,0 +1,28 @@ +--- boost_1_69_0/boost/format/alt_sstream_impl.hpp~ 2020-03-30 15:20:18.565658757 +0100 ++++ boost_1_69_0/boost/format/alt_sstream_impl.hpp 2020-03-30 15:20:33.768636162 +0100 +@@ -40,8 +40,11 @@ + #ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC + void *vd_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0); + Ch *new_ptr = static_cast(vd_ptr); +-#else ++#elif defined BOOST_NO_CXX11_ALLOCATOR + Ch *new_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0); ++#else ++ Ch *new_ptr = std::allocator_traits::allocate(alloc_, ++ sz, is_allocated_? eback() : 0); + #endif + // if this didnt throw, we're safe, update the buffer + dealloc(); +@@ -257,8 +260,11 @@ + #ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC + void *vdptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0); + newptr = static_cast(vdptr); +-#else ++#elif defined BOOST_NO_CXX11_ALLOCATOR + newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0); ++#else ++ newptr = std::allocator_traits::allocate(alloc_, ++ new_size, is_allocated_? oldptr : 0); + #endif + } + diff --git a/boost.spec b/boost.spec index 8924579..c8c5960 100644 --- a/boost.spec +++ b/boost.spec @@ -44,7 +44,7 @@ Summary: The free peer-reviewed portable C++ source libraries Version: 1.69.0 %global version_enc 1_69_0 %global version_suffix 169 -Release: 14%{?dist} +Release: 15%{?dist} License: Boost and MIT and Python %global toplev_dirname %{real_name}_%{version_enc} @@ -146,6 +146,9 @@ Patch84: boost-1.69-random.patch # https://github.com/boostorg/mpi/pull/81 Patch85: boost-1.69-mpi-c_data.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1818723 +Patch86: boost-1.69-format-allocator.patch + %bcond_with tests %bcond_with docs_generated @@ -650,6 +653,7 @@ find ./boost -name '*.hpp' -perm /111 | xargs chmod a-x %patch83 -p1 %patch84 -p2 %patch85 -p2 +%patch86 -p1 %build # Dump the versions being used into the build logs. @@ -1269,6 +1273,9 @@ fi %{_mandir}/man1/bjam.1* %changelog +* Mon Mar 30 2020 Jonathan Wakely - 1.69.0-15 +- Patch Boost.Format for C++20 compatibility with GCC 10 (#1818723) + * Tue Jan 28 2020 Fedora Release Engineering - 1.69.0-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild