summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
Diffstat (limited to 'external')
-rw-r--r--external/boost/0001-Avoid-boost-phoenix-placeholders-uarg1.10-ODR-violat.patch.227
-rw-r--r--external/boost/UnpackedTarball_boost.mk6
-rw-r--r--external/boost/Wundef.patch.055
-rw-r--r--external/boost/boost.between.warning.patch22
-rw-r--r--external/boost/boost.noiconv.patch66
-rw-r--r--external/boost/windows-no-utf8-locales.patch.028
6 files changed, 109 insertions, 95 deletions
diff --git a/external/boost/0001-Avoid-boost-phoenix-placeholders-uarg1.10-ODR-violat.patch.2 b/external/boost/0001-Avoid-boost-phoenix-placeholders-uarg1.10-ODR-violat.patch.2
deleted file mode 100644
index e0989727fb5a..000000000000
--- a/external/boost/0001-Avoid-boost-phoenix-placeholders-uarg1.10-ODR-violat.patch.2
+++ /dev/null
@@ -1,27 +0,0 @@
-From 50973dc10ea16931245ea61a00b2ce9041acc5ba Mon Sep 17 00:00:00 2001
-From: Stephan Bergmann <sbergman@redhat.com>
-Date: Wed, 4 Jan 2023 17:33:31 +0100
-Subject: [PATCH] Avoid boost::phoenix::placeholders::uarg1..10 ODR violations
-
-Those variables, defined in an include file, had external linkage, causing ODR
-violations. Make them const to implicitly give them internal linkage.
----
- include/boost/phoenix/stl/tuple.hpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/boost/phoenix/stl/tuple.hpp b/include/boost/phoenix/stl/tuple.hpp
-index a83014a..7f61a40 100644
---- a/include/boost/phoenix/stl/tuple.hpp
-+++ b/include/boost/phoenix/stl/tuple.hpp
-@@ -110,7 +110,7 @@ namespace boost { namespace phoenix {
- namespace placeholders {
- #define BOOST_PP_LOCAL_LIMITS (1, BOOST_PHOENIX_ARG_LIMIT)
- #define BOOST_PP_LOCAL_MACRO(N) \
-- auto uarg##N = \
-+ auto const uarg##N = \
- boost::phoenix::get_<(N)-1>(boost::phoenix::placeholders::arg1);
- #include BOOST_PP_LOCAL_ITERATE()
- }
---
-2.38.1
-
diff --git a/external/boost/UnpackedTarball_boost.mk b/external/boost/UnpackedTarball_boost.mk
index 8ab4d7949901..c49a2bc099fc 100644
--- a/external/boost/UnpackedTarball_boost.mk
+++ b/external/boost/UnpackedTarball_boost.mk
@@ -32,12 +32,10 @@ boost_patches += msvc2017.patch.0
boost_patches += boost-ios.patch.0
-# <https://github.com/boostorg/phoenix/pull/116> "Avoid boost::phoenix::placeholders::uarg1..10 ODR
-# violations":
-boost_patches += 0001-Avoid-boost-phoenix-placeholders-uarg1.10-ODR-violat.patch.2
-
boost_patches += boost.file_iterator.sharing_win.patch
+boost_patches += Wundef.patch.0
+
$(eval $(call gb_UnpackedTarball_UnpackedTarball,boost))
$(eval $(call gb_UnpackedTarball_set_tarball,boost,$(BOOST_TARBALL)))
diff --git a/external/boost/Wundef.patch.0 b/external/boost/Wundef.patch.0
new file mode 100644
index 000000000000..63dfc4afde00
--- /dev/null
+++ b/external/boost/Wundef.patch.0
@@ -0,0 +1,55 @@
+--- boost/config/workaround.hpp
++++ boost/config/workaround.hpp
+@@ -264,6 +264,10 @@
+ #else
+ #define BOOST_CLANG_VERSION_WORKAROUND_GUARD 0
+ #endif
++
++#if !defined BOOST_LIBSTDCXX_VERSION_WORKAROUND_GUARD
++#define BOOST_LIBSTDCXX_VERSION_WORKAROUND_GUARD 0
++#endif
+
+ // Always define to zero, if it's used it'll be defined my MPL:
+ #define BOOST_MPL_CFG_GCC_WORKAROUND_GUARD 0
+--- boost/locale/detail/facet_id.hpp
++++ boost/locale/detail/facet_id.hpp
+@@ -12,7 +12,7 @@
+
+ /// \cond INTERNAL
+ namespace boost { namespace locale { namespace detail {
+-#if BOOST_CLANG_VERSION >= 40900
++#if defined BOOST_CLANG_VERSION && BOOST_CLANG_VERSION >= 40900
+ # pragma clang diagnostic push
+ # pragma clang diagnostic ignored "-Wundefined-var-template"
+ #endif
+@@ -25,7 +25,7 @@
+ struct BOOST_LOCALE_DECL facet_id {
+ static std::locale::id id;
+ };
+-#if BOOST_CLANG_VERSION >= 40900
++#if defined BOOST_CLANG_VERSION && BOOST_CLANG_VERSION >= 40900
+ # pragma clang diagnostic pop
+ #endif
+ }}} // namespace boost::locale::detail
+--- boost/math/tools/config.hpp
++++ boost/math/tools/config.hpp
+@@ -147,7 +147,7 @@
+ #endif
+
+ // C++23
+-#if __cplusplus > 202002L || _MSVC_LANG > 202002L
++#if __cplusplus > 202002L || (defined _MSVC_LANG && _MSVC_LANG > 202002L)
+ # if __GNUC__ >= 13
+ // libstdc++3 only defines to/from_chars for std::float128_t when one of these defines are set
+ // otherwise we're right out of luck...
+--- boost/math/tools/promotion.hpp
++++ boost/math/tools/promotion.hpp
+@@ -27,7 +27,7 @@
+ #include <type_traits>
+
+ #if defined __has_include
+-# if __cplusplus > 202002L || _MSVC_LANG > 202002L
++# if __cplusplus > 202002L || (defined _MSVC_LANG && _MSVC_LANG > 202002L)
+ # if __has_include (<stdfloat>)
+ # include <stdfloat>
+ # endif
diff --git a/external/boost/boost.between.warning.patch b/external/boost/boost.between.warning.patch
index 349a9065ce62..d000e261d7d6 100644
--- a/external/boost/boost.between.warning.patch
+++ b/external/boost/boost.between.warning.patch
@@ -1,21 +1,13 @@
diff -ru boost.orig/boost/libs/locale/src/encoding/codepage.cpp boost/boost/libs/locale/src/encoding/codepage.cpp
--- foo/misc/boost.orig/libs/locale/src/encoding/codepage.cpp
+++ foo/misc/boost/libs/locale/src/boost/locale/encoding/codepage.cpp
-@@ -8,6 +8,7 @@
- #include <boost/locale/hold_ptr.hpp>
- #include <memory>
- #include <string>
-+#include <string.h>
-
- #include "boost/locale/encoding/conv.hpp"
- #if BOOST_LOCALE_USE_WIN32_API
-@@ -58,6 +58,9 @@
- return cvt->convert(begin, end);
+@@ -52,6 +52,9 @@
+ }
#endif
#endif
-+ // ensures we get a sensible warning in boost's gettext results about a real mismatch.
-+ if (to_charset && from_charset && !strcmp(to_charset, from_charset))
-+ return std::string(begin, end - begin);
- throw invalid_charset_error(std::string(to_charset) + " or " + from_charset);
- }
++ // ensures we get a sensible warning in boost's gettext results about a real mismatch.
++ if (to_charset == from_charset)
++ return std::string(begin, end - begin);
+ throw invalid_charset_error(std::string(to_charset) + " or " + from_charset);
+ }
diff --git a/external/boost/boost.noiconv.patch b/external/boost/boost.noiconv.patch
index 02f206375a4a..12e5d2059cea 100644
--- a/external/boost/boost.noiconv.patch
+++ b/external/boost/boost.noiconv.patch
@@ -1,51 +1,51 @@
diff -ru boost.orig/boost/libs/locale/src/encoding/codepage.cpp boost/boost/libs/locale/src/encoding/codepage.cpp
--- foo/misc/boost.orig/libs/locale/src/encoding/codepage.cpp
+++ foo/misc/boost/libs/locale/src/boost/locale/encoding/codepage.cpp
-@@ -39,6 +39,7 @@
- const char* from_charset,
- method_type how)
- {
+@@ -29,6 +29,7 @@
+ const std::string& from_charset,
+ method_type how)
+ {
+#if defined(BOOST_LOCALE_WITH_ICONV) || defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
- hold_ptr<converter_between> cvt;
#ifdef BOOST_LOCALE_WITH_ICONV
- cvt.reset(new iconv_between());
-@@ -55,6 +56,7 @@
- if(cvt->open(to_charset, from_charset, how))
- return cvt->convert(begin, end);
+ {
+ impl::iconv_between cvt;
+@@ -50,6 +51,7 @@
+ return cvt.convert(begin, end);
+ }
#endif
+#endif
- throw invalid_charset_error(std::string(to_charset) + " or " + from_charset);
- }
+ throw invalid_charset_error(std::string(to_charset) + " or " + from_charset);
+ }
-@@ -65,6 +67,7 @@
- template<typename CharType>
- std::basic_string<CharType> convert_to(const char* begin, const char* end, const char* charset, method_type how)
- {
+@@ -56,6 +58,7 @@
+ template<typename CharType>
+ std::basic_string<CharType> to_utf(const char* begin, const char* end, const std::string& charset, method_type how)
+ {
+#if defined(BOOST_LOCALE_WITH_ICONV) || defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
- hold_ptr<converter_to_utf<CharType>> cvt;
#ifdef BOOST_LOCALE_WITH_ICONV
- cvt.reset(new iconv_to_utf<CharType>());
-@@ -81,6 +84,7 @@
- if(cvt->open(charset, how))
- return cvt->convert(begin, end);
+ {
+ impl::iconv_to_utf<CharType> cvt;
+@@ -77,6 +80,7 @@
+ return cvt.convert(begin, end);
+ }
#endif
+#endif
- throw invalid_charset_error(charset);
- }
+ throw invalid_charset_error(charset);
+ }
-@@ -91,6 +95,7 @@
- template<typename CharType>
- std::string convert_from(const CharType* begin, const CharType* end, const char* charset, method_type how)
- {
+@@ -83,6 +87,7 @@
+ template<typename CharType>
+ std::string from_utf(const CharType* begin, const CharType* end, const std::string& charset, method_type how)
+ {
+#if defined(BOOST_LOCALE_WITH_ICONV) || defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
- hold_ptr<converter_from_utf<CharType>> cvt;
#ifdef BOOST_LOCALE_WITH_ICONV
- cvt.reset(new iconv_from_utf<CharType>());
-@@ -107,6 +112,7 @@
- if(cvt->open(charset, how))
- return cvt->convert(begin, end);
+ {
+ impl::iconv_from_utf<CharType> cvt;
+@@ -104,6 +109,7 @@
+ return cvt.convert(begin, end);
+ }
#endif
+#endif
- throw invalid_charset_error(charset);
- }
+ throw invalid_charset_error(charset);
+ }
diff --git a/external/boost/windows-no-utf8-locales.patch.0 b/external/boost/windows-no-utf8-locales.patch.0
index 519d8bde2fe6..ec0313294375 100644
--- a/external/boost/windows-no-utf8-locales.patch.0
+++ b/external/boost/windows-no-utf8-locales.patch.0
@@ -2,22 +2,18 @@ Don't ever attempt to initialise a std::locale with a UTF-8 locale on Windows -*
--- libs/locale/src/boost/locale/std/std_backend.cpp
+++ libs/locale/src/boost/locale/std/std_backend.cpp
-@@ -86,6 +86,7 @@
- #endif
- utf_mode_ = utf8_support::none;
+@@ -138,10 +138,14 @@
+ } else
+ name_ = "C";
} else {
-+ #if !defined(BOOST_WINDOWS)
++#if !defined(BOOST_WINDOWS)
if(loadable(lid)) {
name_ = lid;
- utf_mode_ = utf8_support::native_with_wide;
-@@ -98,8 +99,8 @@
- utf_mode_ = utf8_support::from_wide;
- #endif
- }
--#if defined(BOOST_WINDOWS)
-- else if(loadable(win_name))
-+ #else
-+ if(loadable(win_name))
- {
- name_ = win_name;
- utf_mode_ = utf8_support::from_wide;
+ utf_mode_ = utf8_support::native;
+ } else {
++#else
++ {
++#endif
+ std::vector<std::string> alt_names;
+ if(l_win)
+ alt_names.push_back(l_win.name);