[packages/libreoffice] fix build with boost 1.81

atler atler at pld-linux.org
Thu Feb 16 12:39:39 CET 2023


commit b5fdb33e8cba51bb86042643605edb78a5d5b654
Author: Jan Palus <atler at pld-linux.org>
Date:   Thu Feb 16 09:23:41 2023 +0100

    fix build with boost 1.81

 boost1.81.patch  | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 libreoffice.spec |  2 ++
 2 files changed, 48 insertions(+)
---
diff --git a/libreoffice.spec b/libreoffice.spec
index bc33dae..52613bc 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -109,6 +109,7 @@ Source34:	skia-freetype2.11.patch
 Patch0:		disable-failing-test.patch
 Patch1:		pld-skia-patches.patch
 Patch2:		%{name}-poppler.patch
+Patch3:		boost1.81.patch
 URL:		https://www.documentfoundation.org/
 BuildRequires:	/usr/bin/getopt
 %{?with_firebird:BuildRequires:	Firebird-devel >= 3.0.0.0}
@@ -2892,6 +2893,7 @@ oraz narzędzie ui-previewer do sprawdzania wyglądu okien dialogowych.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 for dir in *-%{version}; do
 	[ -f $dir/ChangeLog ] && %{__mv} $dir/ChangeLog ChangeLog-$dir
diff --git a/boost1.81.patch b/boost1.81.patch
new file mode 100644
index 0000000..e92fa5c
--- /dev/null
+++ b/boost1.81.patch
@@ -0,0 +1,46 @@
+From 23dcd4339428e4080029ec5ae658e75f01e79a62 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
+ <congdanhqx at gmail.com>
+Date: Sun, 27 Nov 2022 18:59:24 +0700
+Subject: i18n: fix build with Boost 1.81.0
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Boost.Locale since 1.81.0 switch to enum classes for facet type [1].
+Switch our resource manager accordingly.
+
+1: https://github.com/boostorg/locale/commit/e5ed439ea39a4de915e9fb939cca95cae7d9d8d1
+
+Change-Id: Ief215363ceb79b2019606b20a7cde55c8df6a042
+Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143343
+Reviewed-by: Heiko Becker <heirecka at exherbo.org>
+Tested-by: Caolán McNamara <caolanm at redhat.com>
+Reviewed-by: Caolán McNamara <caolanm at redhat.com>
+---
+ unotools/source/i18n/resmgr.cxx | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+(limited to 'unotools/source/i18n')
+
+diff --git a/unotools/source/i18n/resmgr.cxx b/unotools/source/i18n/resmgr.cxx
+index ddedf5b9e8a2..3a7116350062 100644
+--- a/unotools/source/i18n/resmgr.cxx
++++ b/unotools/source/i18n/resmgr.cxx
+@@ -127,8 +127,13 @@ namespace Translate
+         if (aFind != aCache.end())
+             return aFind->second;
+         boost::locale::generator gen;
++#if BOOST_VERSION < 108100
+         gen.characters(boost::locale::char_facet);
+         gen.categories(boost::locale::message_facet | boost::locale::information_facet);
++#else
++        gen.characters(boost::locale::char_facet_t::char_f);
++        gen.categories(boost::locale::category_t::message | boost::locale::category_t::information);
++#endif
+ #if defined(ANDROID)
+         OString sPath(OString(lo_get_app_data_dir()) + "/program/resource");
+ #else
+-- 
+cgit v1.2.1
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libreoffice.git/commitdiff/b5fdb33e8cba51bb86042643605edb78a5d5b654



More information about the pld-cvs-commit mailing list