From 072243ebb224b4574a798246eefa8c44a6f326a1 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Thu, 6 Apr 2023 20:57:36 +0200 Subject: [PATCH 1/2] boost: apply upstream patches to 1.80.0 --- recipes/boost/all/conandata.yml | 8 ++++++++ .../patches/1.80.0-0005-config-libcpp15.patch | 16 ++++++++++++++++ .../1.80.0-0006-unordered-msvc-rtcc.patch | 18 ++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 recipes/boost/all/patches/1.80.0-0005-config-libcpp15.patch create mode 100644 recipes/boost/all/patches/1.80.0-0006-unordered-msvc-rtcc.patch diff --git a/recipes/boost/all/conandata.yml b/recipes/boost/all/conandata.yml index ce580a269e8fd..9d4951e246f10 100644 --- a/recipes/boost/all/conandata.yml +++ b/recipes/boost/all/conandata.yml @@ -88,6 +88,14 @@ patches: patch_description: "On POSIX systems that don't support *at APIs, compilation fails due to a missing include" patch_type: "official" patch_source: "https://github.com/boostorg/filesystem/issues/250" + - patch_file: "patches/1.80.0-0005-config-libcpp15.patch" + patch_description: "Support for libcpp15 which removes std::unary_function and std::binary_function." + patch_type: "official" + patch_source: "https://www.boost.org/patches/1_80_0/0005-config-libcpp15.patch" + - patch_file: "patches/1.80.0-0006-unordered-msvc-rtcc.patch" + patch_description: "Fix MSVC /RTCc build runtime failures." + patch_type: "official" + patch_source: "https://www.boost.org/patches/1_80_0/0006-unordered-msvc-rtcc.patch" "1.79.0": - patch_file: "patches/boost_locale_fail_on_missing_backend.patch" patch_description: "Fails the build when there is no iconv backend" diff --git a/recipes/boost/all/patches/1.80.0-0005-config-libcpp15.patch b/recipes/boost/all/patches/1.80.0-0005-config-libcpp15.patch new file mode 100644 index 0000000000000..1e84702f8b06b --- /dev/null +++ b/recipes/boost/all/patches/1.80.0-0005-config-libcpp15.patch @@ -0,0 +1,16 @@ +--- a/boost/config/stdlib/libcpp.hpp 2022-08-03 22:47:07.000000000 -0400 ++++ b/boost/config/stdlib/libcpp.hpp 2022-09-16 22:16:17.044119011 -0400 +@@ -168,4 +168,13 @@ + # define BOOST_NO_CXX14_HDR_SHARED_MUTEX + #endif + ++#if _LIBCPP_VERSION >= 15000 ++// ++// Unary function is now deprecated in C++11 and later: ++// ++#if __cplusplus >= 201103L ++#define BOOST_NO_CXX98_FUNCTION_BASE ++#endif ++#endif ++ + // --- end --- diff --git a/recipes/boost/all/patches/1.80.0-0006-unordered-msvc-rtcc.patch b/recipes/boost/all/patches/1.80.0-0006-unordered-msvc-rtcc.patch new file mode 100644 index 0000000000000..ff133016a2022 --- /dev/null +++ b/recipes/boost/all/patches/1.80.0-0006-unordered-msvc-rtcc.patch @@ -0,0 +1,18 @@ +--- a/boost/unordered/detail/prime_fmod.hpp 2022-08-03 22:47:16.000000000 -0400 ++++ b/boost/unordered/detail/prime_fmod.hpp 2022-12-14 01:45:27.368620146 -0500 +@@ -117,9 +117,15 @@ + #if defined(BOOST_UNORDERED_FCA_HAS_64B_SIZE_T) + std::size_t sizes_under_32bit = inv_sizes32_len; + if (BOOST_LIKELY(size_index < sizes_under_32bit)) { ++#if defined(__MSVC_RUNTIME_CHECKS) ++ return fast_modulo( ++ boost::uint32_t(hash & 0xffffffffu) + boost::uint32_t(hash >> 32), ++ inv_sizes32[size_index], boost::uint32_t(sizes[size_index])); ++#else + return fast_modulo( + boost::uint32_t(hash) + boost::uint32_t(hash >> 32), + inv_sizes32[size_index], boost::uint32_t(sizes[size_index])); ++#endif + } else { + return positions[size_index - sizes_under_32bit](hash); + } From d705b1dd945644083bd68fc2fef051cdb9696c05 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Mon, 17 Apr 2023 12:11:09 +0200 Subject: [PATCH 2/2] boost: address review comments --- recipes/boost/all/conandata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/boost/all/conandata.yml b/recipes/boost/all/conandata.yml index 9d4951e246f10..66fc9b08da551 100644 --- a/recipes/boost/all/conandata.yml +++ b/recipes/boost/all/conandata.yml @@ -90,7 +90,7 @@ patches: patch_source: "https://github.com/boostorg/filesystem/issues/250" - patch_file: "patches/1.80.0-0005-config-libcpp15.patch" patch_description: "Support for libcpp15 which removes std::unary_function and std::binary_function." - patch_type: "official" + patch_type: "portability" patch_source: "https://www.boost.org/patches/1_80_0/0005-config-libcpp15.patch" - patch_file: "patches/1.80.0-0006-unordered-msvc-rtcc.patch" patch_description: "Fix MSVC /RTCc build runtime failures."