download.lst                                                                   
  |    4 
 
external/boost/0001-Avoid-boost-phoenix-placeholders-uarg1.10-ODR-violat.patch.2
 |   27 ----
 external/boost/UnpackedTarball_boost.mk                                        
  |    6 
 external/boost/Wundef.patch.0                                                  
  |   55 ++++++++
 external/boost/boost.between.warning.patch                                     
  |   22 +--
 external/boost/boost.noiconv.patch                                             
  |   66 +++++-----
 external/boost/windows-no-utf8-locales.patch.0                                 
  |   28 +---
 7 files changed, 111 insertions(+), 97 deletions(-)

New commits:
commit f65d7265c63778ebf630b9d909617d064dce529e
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Thu Dec 21 20:39:17 2023 +0100
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Sun Apr 7 18:11:24 2024 +0200

    Upgrade external/boost to latest Boost 1.84.0
    
    <https://dev-www.libreoffice.org/src/boost_1_84_0.tar.xz> has been 
generated (on
    Fedora 39) with
    
    > $ wget 
https://boostorg.jfrog.io/artifactory/main/release/1.84.0/source/boost_1_84_0.tar.bz2
    > $ printf 
'cc4b893acf645c9d4b698e9a0f08ca8846aa5d6c68275c14c3e7949c24109454 
boost_1_84_0.tar.bz2' | sha256sum -c # cf. 
<https://www.boost.org/users/history/version_1_84_0.html>
    > boost_1_84_0.tar.bz2: OK
    > $ external/boost/repack_tarball.sh boost_1_84_0.tar.bz2
    > Unpacking boost_1_84_0.tar.bz2 ...
    > Removing unnecessary files ...
    > Creating boost_1_84_0.tar.xz ...
    > Cleaning up ...
    > fd4a2ee785ea0e4efc5221a4284e0cf51096e8409871fb70fdaced002eeffc0b  
boost_1_84_0.tar.xz
    > Done.
    
    * 
external/boost/0001-Avoid-boost-phoenix-placeholders-uarg1.10-ODR-violat.patch.2
      was obsoleted by
      
<https://github.com/boostorg/phoenix/commit/665047aac26ad4d96b266d87504b3a88ad21b37e>
      "avoid ODR by making this const".
    
    * The modified external/boost/windows-no-utf8-locales.patch.0, whose 
original
      version no longer applied as-is, should hopefully still mitigate the issue
      described in 072a25e1ef4815bbef4f18f59f025862a0d8e876 "tdf#157135 
workaround:
      restore and update windows-no-utf8-locales.patch.0".
    
    * external/boost/Wundef.patch.0 is needed to silence
    
    > In file included from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/throw_exception.hpp:24,
    >                  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/unordered/detail/serialize_tracked_address.hpp:16,
    >                  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/unordered/detail/fca.hpp:117,
    >                  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/unordered/detail/implementation.hpp:17,
    >                  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/unordered/detail/map.hpp:7,
    >                  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/unordered/unordered_map.hpp:17,
    >                  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/unordered_map.hpp:17,
    >                  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/external/boost/include/boost/unordered_map.hpp:30,
    >                  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/configmgr/source/modifications.hxx:28,
    >                  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/configmgr/source/data.hxx:34,
    >                  from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/configmgr/source/groupnode.cxx:26:
    > 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/unordered/detail/type_traits.hpp:51:22:
 error: "BOOST_LIBSTDCXX_VERSION_WORKAROUND_GUARD" is not defined, evaluates to 
0 [-Werror=undef]
    >    51 | #if BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION, < 50000)
    >       |                      ^~~~~~~~~~~~~~~~~~~~~~~
    > 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/config/workaround.hpp:272:10:
 note: in definition of macro ‘BOOST_WORKAROUND’
    >   272 |        ((symbol ## _WORKAROUND_GUARD + 0 == 0) &&     \
    >       |          ^~~~~~
    > 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/unordered/detail/type_traits.hpp:64:22:
 error: "BOOST_LIBSTDCXX_VERSION_WORKAROUND_GUARD" is not defined, evaluates to 
0 [-Werror=undef]
    >    64 | #if BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION, < 50000)
    >       |                      ^~~~~~~~~~~~~~~~~~~~~~~
    > 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/config/workaround.hpp:272:10:
 note: in definition of macro ‘BOOST_WORKAROUND’
    >   272 |        ((symbol ## _WORKAROUND_GUARD + 0 == 0) &&     \
    >       |          ^~~~~~
    > 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/unordered/detail/type_traits.hpp:77:22:
 error: "BOOST_LIBSTDCXX_VERSION_WORKAROUND_GUARD" is not defined, evaluates to 
0 [-Werror=undef]
    >    77 | #if BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION, < 50000)
    >       |                      ^~~~~~~~~~~~~~~~~~~~~~~
    > 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/UnpackedTarball/boost/boost/config/workaround.hpp:272:10:
 note: in definition of macro ‘BOOST_WORKAROUND’
    >   272 |        ((symbol ## _WORKAROUND_GUARD + 0 == 0) &&     \
    >       |          ^~~~~~
    
      etc. (<https://ci.libreoffice.org/job/gerrit_linux_gcc_release/155922/>) 
as
      seen with some versions of GCC which apparently fail to honor in that
      situation the
    
    > #pragma GCC diagnostic ignored "-Wundef"
    
      in the external/boost/include wrappers.  (Using
    
    > #pragma GCC system_header
    
      in those external/boost/include wrappers had been dismissed with
      29661a886e4157e0cb6141b49fb5602fa621cc9a "boost: stop using #pragma GCC
      system_header".)
    
    Change-Id: Idf1d5a17bc198b8ea7a54751e8e2fa6ca2169167
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161138
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>

diff --git a/download.lst b/download.lst
index af0e9f113ac4..8c732bdb41b0 100644
--- a/download.lst
+++ b/download.lst
@@ -14,8 +14,8 @@ ARGON2_TARBALL := phc-winner-argon2-20190702.tar.gz
 # so that git cherry-pick
 # will not run into conflicts
 # please repack the tarball using external/boost/repack_tarball.sh
-BOOST_SHA256SUM := 
e48ab6953fbd68ba47234bea5173e62427e9f6a7894e152305142895cfe955de
-BOOST_TARBALL := boost_1_82_0.tar.xz
+BOOST_SHA256SUM := 
fd4a2ee785ea0e4efc5221a4284e0cf51096e8409871fb70fdaced002eeffc0b
+BOOST_TARBALL := boost_1_84_0.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
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 <sberg...@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 @@
+ 
+ /// + 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);

Reply via email to