aboutsummaryrefslogtreecommitdiffstats
path: root/community/libreoffice/0010-icu-58.patch
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2016-12-26 12:46:50 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2016-12-26 14:17:36 +0000
commitd4cb3b18ec7b9eafc5f92268372beb3d0628eb72 (patch)
tree7843c993261479358f69df1ff6c6fdf16fedfa59 /community/libreoffice/0010-icu-58.patch
parentf18a0b9a55cf09f187aac374f9070abfde378181 (diff)
downloadaports-d4cb3b18ec7b9eafc5f92268372beb3d0628eb72.tar.bz2
aports-d4cb3b18ec7b9eafc5f92268372beb3d0628eb72.tar.xz
community/libreoffice: buildfix for icu-58
Diffstat (limited to 'community/libreoffice/0010-icu-58.patch')
-rw-r--r--community/libreoffice/0010-icu-58.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/community/libreoffice/0010-icu-58.patch b/community/libreoffice/0010-icu-58.patch
new file mode 100644
index 0000000000..362357017c
--- /dev/null
+++ b/community/libreoffice/0010-icu-58.patch
@@ -0,0 +1,42 @@
+Minimal exceprt from upstream fix only to unbreak build
+
+https://cgit.freedesktop.org/libreoffice/core/commit/?id=3e42714c76b1347babfdea0564009d8d82a83af4
+
+--- a/i18npool/source/breakiterator/breakiterator_unicode.cxx.orig 2016-05-04 21:28:24 UTC
++++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx
+@@ -64,10 +64,13 @@ BreakIterator_Unicode::~BreakIterator_Un
+ class OOoRuleBasedBreakIterator : public RuleBasedBreakIterator
+ {
+ public:
++#if (U_ICU_VERSION_MAJOR_NUM < 58)
++ // RuleBasedBreakIterator::setBreakType() is private as of ICU 58.
+ inline void publicSetBreakType(int32_t type)
+ {
+ setBreakType(type);
+ };
++#endif
+ OOoRuleBasedBreakIterator(UDataMemory* image,
+ UErrorCode &status)
+ : RuleBasedBreakIterator(image, status)
+@@ -143,12 +146,21 @@ void SAL_CALL BreakIterator_Unicode::loa
+ }
+ }
+ if (rbi) {
++#if (U_ICU_VERSION_MAJOR_NUM < 58)
++ // ICU 58 made RuleBasedBreakIterator::setBreakType() private
++ // instead of protected, so the old workaround of
++ // https://ssl.icu-project.org/trac/ticket/5498
++ // doesn't work anymore. However, they also claim to have fixed
++ // the cause that an initial fBreakType==-1 would lead to an
++ // endless loop under some circumstances.
++ // Let's see ...
+ switch (rBreakType) {
+ case LOAD_CHARACTER_BREAKITERATOR: rbi->publicSetBreakType(UBRK_CHARACTER); break;
+ case LOAD_WORD_BREAKITERATOR: rbi->publicSetBreakType(UBRK_WORD); break;
+ case LOAD_SENTENCE_BREAKITERATOR: rbi->publicSetBreakType(UBRK_SENTENCE); break;
+ case LOAD_LINE_BREAKITERATOR: rbi->publicSetBreakType(UBRK_LINE); break;
+ }
++#endif
+ icuBI->aBreakIterator = rbi;
+ }
+ }