Files
loongoffice/external/boost/boost.noiconv.patch
Stephan Bergmann ed259e5efe Upgrade external/boost to latest Boost 1.81.0
<https://dev-www.libreoffice.org/src/boost_1_81_0.tar.xz> has been generated (on
Fedora 37) with

> $ wget https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.bz2
> $ printf '71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa boost_1_81_0.tar.bz2' | sha256sum -c # cf. <https://www.boost.org/users/history/version_1_81_0.html>
> boost_1_81_0.tar.bz2: OK
> $ external/boost/repack_tarball.sh boost_1_81_0.tar.bz2
> Unpacking boost_1_81_0.tar.bz2 ...
> Removing unnecessary files ...
> Creating boost_1_81_0.tar.xz ...
> Cleaning up ...
> 1deb0a5a9e33a6626fcaa1d2efd4c0e74ca2b0eea87c1559e3917f3066b633d6  boost_1_81_0.tar.xz
> Done.

* external/boost/windows-no-utf8-locales.patch.0, introduced with
  f046fed2782f0d4244aff719ba70a56399a2583a "Don't ever attempt to initialise a
  std::locale with a UTF-8 locale on Windows", was presumably obsoleted by
  <f45adfc9b9>
  "Use UTF-16 <-> UTF-8 codecvt on Windows".

* external/boost/libc++.patch.0 was obsoleted by
  <f0af4a9184>
  "The std lib unary/binary_function base classes are deprecated/removed from
  libcpp15."

* external/boost/0001-Change-mpl-integral_c-to-boost-integral_constant-to-.patch.2
  was obsoleted by
  <50a1eae942>
  "Change mpl::integral_c to boost::integral_constant to avoid Clang 16 errors
  when constructing out of range enums (refs #24, boostorg/mpl#69)".

* external/boost/0001-Avoid-boost-phoenix-placeholders-uarg1.10-ODR-violat.patch.2
  is needed to e.g. avoid
> ./.libs/libetonyek_internal.a(libetonyek_internal_la-KEY1DivElement.o):(.bss+0x3e): multiple definition of `boost::phoenix::placeholders::uarg1'; ./.libs/libetonyek_internal.a(libetonyek_internal_la-IWORKFormula.o):(.bss+0x3e): first defined here
  etc. while building ExternalProject_libetonyek, caused by
  <8b6a9c26c1>
  "std::tuple support (Resolving #103) (#104)".

Change-Id: I48773166d0c50f2850d8bb37fa6215d9e5c0d51d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145044
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-01-05 07:14:18 +00:00

52 lines
2.1 KiB
Diff

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)
{
+#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);
#endif
+#endif
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)
{
+#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);
#endif
+#endif
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)
{
+#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);
#endif
+#endif
throw invalid_charset_error(charset);
}