From 888a45a673fbf9e0c672713ccfde73be9a5c8fafe9421b23d39c481d839c4311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sat, 17 Feb 2018 13:30:07 +0000 Subject: [PATCH] Accepting request 577605 from home:adamm:branches:LibreOffice:Factory - boost_string_fixes.patch: Boost in Leap 42.3 and SLE-12 is lacking some functionality found in newer versions. Workaround the problem. OBS-URL: https://build.opensuse.org/request/show/577605 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=603 --- boost_string_fixes.patch | 37 +++++++++++++++++++++++++++++++++++++ libreoffice.changes | 6 ++++++ libreoffice.spec | 7 +++++-- 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 boost_string_fixes.patch diff --git a/boost_string_fixes.patch b/boost_string_fixes.patch new file mode 100644 index 0000000..7483b62 --- /dev/null +++ b/boost_string_fixes.patch @@ -0,0 +1,37 @@ +Author: Adam Majer +Date: Sat Feb 17 12:13:32 CET 2018 + +Old boost seems to be missing some boost::optional functionality. +This patch is a simple fix for a few problem spots. If this +problem gets larger, it may need a more generic solution instead. + + +Index: libreoffice-6.0.1.1/sw/source/core/txtnode/txatbase.cxx +=================================================================== +--- libreoffice-6.0.1.1.orig/sw/source/core/txtnode/txatbase.cxx ++++ libreoffice-6.0.1.1/sw/source/core/txtnode/txatbase.cxx +@@ -100,21 +100,21 @@ void SwTextAttr::dumpAsXml(xmlTextWriter + { + pWhich = "character format"; + if (SwCharFormat* pCharFormat = GetCharFormat().GetCharFormat()) +- oValue = "name: " + OUStringToOString(pCharFormat->GetName(), RTL_TEXTENCODING_UTF8); ++ *oValue = OString("name: " + OUStringToOString(pCharFormat->GetName(), RTL_TEXTENCODING_UTF8)); + break; + } + case RES_TXTATR_INETFMT: + { + pWhich = "inet format"; + const SwFormatINetFormat& rFormat = GetINetFormat(); +- oValue = "url: " + rFormat.GetValue().toUtf8(); ++ *oValue = OString("url: " + rFormat.GetValue().toUtf8()); + break; + } + case RES_TXTATR_CJK_RUBY: + { + pWhich = "ruby"; + const SwFormatRuby& rFormat = GetRuby(); +- oValue = "rubytext: " + rFormat.GetText().toUtf8(); ++ *oValue = OString("rubytext: " + rFormat.GetText().toUtf8()); + break; + } + case RES_TXTATR_META: diff --git a/libreoffice.changes b/libreoffice.changes index 56918fb..9d2463c 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Feb 17 11:19:03 UTC 2018 - adam.majer@suse.de + +- boost_string_fixes.patch: Boost in Leap 42.3 and SLE-12 is lacking + some functionality found in newer versions. Workaround the problem. + ------------------------------------------------------------------- Mon Feb 12 09:24:51 UTC 2018 - tchvatal@suse.com diff --git a/libreoffice.spec b/libreoffice.spec index 78a6127..cc47a10 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -91,6 +91,7 @@ Patch2: nlpsolver-no-broken-help.diff Patch3: mediawiki-no-broken-help.diff Patch4: kde5-configure-checks.patch Patch5: 0001-Use-PYTHON_FOR_BUILD-instead-of-calling-python-direc.patch +Patch500: boost_string_fixes.patch # try to save space by using hardlinks Patch990: install-with-hardlinks.diff BuildRequires: %{name}-share-linker @@ -873,10 +874,12 @@ Provides additional %{langname} translations and resources for %{project}. \ %prep %setup -q -b1 -b2 -# The rename of the configdir is needed only on older than factory for compat %if 0%{?suse_version} < 1330 +# The rename of the configdir is needed only on older than factory for compat %patch1 -%endif +# fixes to satisfy old boost versions +%patch500 -p1 +%endif # Leap 42/SLE-12 %patch2 %patch3 %patch4 -p1