[libreoffice] allow build with icu 4.2

Caolán McNamara caolanm at fedoraproject.org
Thu Jul 3 07:32:52 UTC 2014


commit 57b2800dba0bfb497819f495b293fbb8338b5d1b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jul 3 08:32:41 2014 +0100

    allow build with icu 4.2

 ...lve-crashes-with-ICU-53.1-in-locales-with.patch |  241 --
 0001-allow-build-with-icu-4.2.patch                |   36 +
 0002-upgrade-to-ICU-53.1-fdo-77071-related.patch   | 2893 --------------------
 libreoffice.spec                                   |   21 +-
 4 files changed, 45 insertions(+), 3146 deletions(-)
---
diff --git a/0001-allow-build-with-icu-4.2.patch b/0001-allow-build-with-icu-4.2.patch
new file mode 100644
index 0000000..8cd8a04
--- /dev/null
+++ b/0001-allow-build-with-icu-4.2.patch
@@ -0,0 +1,36 @@
+From 8180370d32d7a6af2b38ffb6bcfa614c1951434c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
+Date: Wed, 2 Jul 2014 12:35:11 +0100
+Subject: [PATCH] allow build with icu 4.2
+
+Change-Id: I4bbcff7963520426d4c04e15d2239431aff65b56
+---
+ i18npool/source/collator/collator_unicode.cxx | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx
+index 42dfef3..35c237d 100644
+--- a/i18npool/source/collator/collator_unicode.cxx
++++ b/i18npool/source/collator/collator_unicode.cxx
+@@ -308,6 +308,10 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
+             if (func && funclen) {
+                 const sal_uInt8* ruleImage=func();
+                 size_t ruleImageSize = funclen();
++
++#if (U_ICU_VERSION_MAJOR_NUM == 4) && (U_ICU_VERSION_MINOR_NUM <= 2)
++                uca_base = new RuleBasedCollator(static_cast<UChar*>(NULL), status);
++#else
+                 // Not only changed ICU 53.1 the API behavior that a negative
+                 // length (ruleImageSize) now leads to failure, but also that
+                 // the base RuleBasedCollator passed as uca_base here needs to
+@@ -319,6 +323,7 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
+                 // NULL (default) locale does not.
+                 uca_base = static_cast<RuleBasedCollator*>(icu::Collator::createInstance(
+                             icu::Locale::getRoot(), status));
++#endif
+                 if (! U_SUCCESS(status)) throw RuntimeException();
+                 collator = new RuleBasedCollator(
+                         reinterpret_cast<const uint8_t*>(ruleImage), ruleImageSize, uca_base, status);
+-- 
+1.9.3
+
diff --git a/libreoffice.spec b/libreoffice.spec
index f0b4c42..acb3e1f 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -285,28 +285,25 @@ Patch5: libreoffice-rhel6poppler.patch
 Patch6: libreoffice-rhel6langs.patch
 # not upstreamed
 Patch7: libreoffice-rhel6glib.patch
-# reverted upstream commit
-Patch8: 0001-Revert-resolve-crashes-with-ICU-53.1-in-locales-with.patch
-# reverted upstream commit
-Patch9: 0002-upgrade-to-ICU-53.1-fdo-77071-related.patch
 # not upstreamed
-Patch10: 0001-disable-failing-test-on-rhel-6.patch
+Patch8: 0001-disable-failing-test-on-rhel-6.patch
 %endif
 # not upstreamed
 # TODO: fails on ppc; investigate
-Patch11: 0001-disable-swui-test-on-RHEL-7.patch
+Patch9: 0001-disable-swui-test-on-RHEL-7.patch
 %endif
 # not upstreamed
-Patch12: 0001-Resolves-rhbz-1035092-no-shortcut-key-for-Italian-To.patch
+Patch10: 0001-Resolves-rhbz-1035092-no-shortcut-key-for-Italian-To.patch
 # not upstreamed
-Patch13: 0001-disable-firebird-unit-test.patch
+Patch11: 0001-disable-firebird-unit-test.patch
 # not upstreamed
-Patch14: 0001-never-run-autogen.sh.patch
+Patch12: 0001-never-run-autogen.sh.patch
 # not upstreamed
-Patch15: 0001-add-X-TryExec-entries-to-desktop-files.patch
+Patch13: 0001-add-X-TryExec-entries-to-desktop-files.patch
 # not upstreamed
-Patch16: 0001-disable-PSD-import-test-which-deadlocks-on-ARM.patch
-Patch17: 0001-rhbz-1111216-allow-to-export-an-empty-sheet-to-PDF.patch
+Patch14: 0001-disable-PSD-import-test-which-deadlocks-on-ARM.patch
+Patch15: 0001-rhbz-1111216-allow-to-export-an-empty-sheet-to-PDF.patch
+Patch16: 0001-allow-build-with-icu-4.2.patch
 
 %define instdir %{_libdir}
 %define baseinstdir %{instdir}/libreoffice


More information about the scm-commits mailing list