diff --git a/extra/icu/PKGBUILD b/core/icu/PKGBUILD similarity index 57% rename from extra/icu/PKGBUILD rename to core/icu/PKGBUILD index de93ecd5a..fc86d0b8a 100644 --- a/extra/icu/PKGBUILD +++ b/core/icu/PKGBUILD @@ -6,26 +6,35 @@ # - patch to fix icudata library linking on ARM pkgname=icu -pkgver=57.1 -pkgrel=1 +pkgver=58.1 +pkgrel=2 pkgdesc="International Components for Unicode library" arch=(i686 x86_64) url="http://www.icu-project.org/" license=('custom:icu') depends=('gcc-libs>=4.7.1-5' 'sh') #makedepends=('clang') +# no https available source=(#http://download.icu-project.org/files/${pkgname}4c/${pkgver}/${pkgname}4c-${pkgver/./_}-src.tgz - http://download.icu-project.org/files/${pkgname}4c/${pkgver}/${pkgname}4c-${pkgver//./_}-src.tgz - icu.8198.revert.icu5431.patch - icudata-stdlibs.patch) -md5sums=('976734806026a4ef8bdd17937c8898b9' - 'ebd5470fc969c75e52baf4af94a9ee82' + http://download.icu-project.org/files/${pkgname}4c/${pkgver}/${pkgname}4c-${pkgver//./_}-src.tgz + icu-58.1-iterator-reset.patch + icudata-stdlibs.patch) +# icu.8198.revert.icu5431.patch) +# upstream offers md5sum checks, only asc file for md5sum check +md5sums=('1901302aaff1c1633ef81862663d2917' + '8c09ae284967def053e9579d64d0f83c' '4e5202245fce364490334bd66b5edabc') +# 'ebd5470fc969c75e52baf4af94a9ee82') prepare() { cd icu/source - # fix Malayalam encoding https://bugzilla.redhat.com/show_bug.cgi?id=654200 - patch -Rp3 -i ${srcdir}/icu.8198.revert.icu5431.patch + +# that file is no more present in current release, asume the bug to be fixed. +# # fix Malayalam encoding https://bugzilla.redhat.com/show_bug.cgi?id=654200 +# patch -Rp3 -i ${srcdir}/icu.8198.revert.icu5431.patch + + # http://bugs.icu-project.org/trac/ticket/12827 + patch -Np4 -i ${srcdir}/icu-58.1-iterator-reset.patch patch -p2 -i ${srcdir}/icudata-stdlibs.patch } diff --git a/core/icu/icu-58.1-iterator-reset.patch b/core/icu/icu-58.1-iterator-reset.patch new file mode 100644 index 000000000..d2316eb8c --- /dev/null +++ b/core/icu/icu-58.1-iterator-reset.patch @@ -0,0 +1,124 @@ +Index: /icu/trunk/source/common/ulist.c +=================================================================== +--- /icu/trunk/source/common/ulist.c (revision 39483) ++++ /icu/trunk/source/common/ulist.c (revision 39484) +@@ -30,5 +30,4 @@ + + int32_t size; +- int32_t currentIndex; + }; + +@@ -52,5 +51,4 @@ + newList->tail = NULL; + newList->size = 0; +- newList->currentIndex = -1; + + return newList; +@@ -81,6 +79,7 @@ + p->next->previous = p->previous; + } +- list->curr = NULL; +- list->currentIndex = 0; ++ if (p == list->curr) { ++ list->curr = p->next; ++ } + --list->size; + if (p->forceDelete) { +@@ -151,5 +150,4 @@ + list->head->previous = newItem; + list->head = newItem; +- list->currentIndex++; + } + +@@ -194,5 +192,4 @@ + curr = list->curr; + list->curr = curr->next; +- list->currentIndex++; + + return curr->data; +@@ -210,5 +207,4 @@ + if (list != NULL) { + list->curr = list->head; +- list->currentIndex = 0; + } + } +@@ -273,3 +269,2 @@ + return (UList *)(en->context); + } +- +Index: /icu/trunk/source/i18n/ucol_res.cpp +=================================================================== +--- /icu/trunk/source/i18n/ucol_res.cpp (revision 39483) ++++ /icu/trunk/source/i18n/ucol_res.cpp (revision 39484) +@@ -681,4 +681,5 @@ + } + memcpy(en, &defaultKeywordValues, sizeof(UEnumeration)); ++ ulist_resetList(sink.values); // Initialize the iterator. + en->context = sink.values; + sink.values = NULL; // Avoid deletion in the sink destructor. +Index: /icu/trunk/source/test/intltest/apicoll.cpp +=================================================================== +--- /icu/trunk/source/test/intltest/apicoll.cpp (revision 39483) ++++ /icu/trunk/source/test/intltest/apicoll.cpp (revision 39484) +@@ -82,14 +82,7 @@ + col = Collator::createInstance(Locale::getEnglish(), success); + if (U_FAILURE(success)){ +- errcheckln(success, "Default Collator creation failed. - %s", u_errorName(success)); +- return; +- } +- +- StringEnumeration* kwEnum = col->getKeywordValuesForLocale("", Locale::getEnglish(),true,success); +- if (U_FAILURE(success)){ +- errcheckln(success, "Get Keyword Values for Locale failed. - %s", u_errorName(success)); +- return; +- } +- delete kwEnum; ++ errcheckln(success, "English Collator creation failed. - %s", u_errorName(success)); ++ return; ++ } + + col->getVersion(versionArray); +@@ -230,4 +223,27 @@ + delete aFrCol; + delete junk; ++} ++ ++void CollationAPITest::TestKeywordValues() { ++ IcuTestErrorCode errorCode(*this, "TestKeywordValues"); ++ LocalPointer col(Collator::createInstance(Locale::getEnglish(), errorCode)); ++ if (errorCode.logIfFailureAndReset("English Collator creation failed")) { ++ return; ++ } ++ ++ LocalPointer kwEnum( ++ col->getKeywordValuesForLocale("collation", Locale::getEnglish(), TRUE, errorCode)); ++ if (errorCode.logIfFailureAndReset("Get Keyword Values for English Collator failed")) { ++ return; ++ } ++ assertTrue("expect at least one collation tailoring for English", kwEnum->count(errorCode) > 0); ++ const char *kw; ++ UBool hasStandard = FALSE; ++ while ((kw = kwEnum->next(NULL, errorCode)) != NULL) { ++ if (strcmp(kw, "standard") == 0) { ++ hasStandard = TRUE; ++ } ++ } ++ assertTrue("expect at least the 'standard' collation tailoring for English", hasStandard); + } + +@@ -2467,4 +2483,5 @@ + TESTCASE_AUTO_BEGIN; + TESTCASE_AUTO(TestProperty); ++ TESTCASE_AUTO(TestKeywordValues); + TESTCASE_AUTO(TestOperators); + TESTCASE_AUTO(TestDuplicate); +Index: /icu/trunk/source/test/intltest/apicoll.h +=================================================================== +--- /icu/trunk/source/test/intltest/apicoll.h (revision 39483) ++++ /icu/trunk/source/test/intltest/apicoll.h (revision 39484) +@@ -36,4 +36,5 @@ + */ + void TestProperty(/* char* par */); ++ void TestKeywordValues(); + + /** diff --git a/extra/icu/icu.8198.revert.icu5431.patch b/core/icu/icu.8198.revert.icu5431.patch similarity index 100% rename from extra/icu/icu.8198.revert.icu5431.patch rename to core/icu/icu.8198.revert.icu5431.patch diff --git a/extra/icu/icudata-stdlibs.patch b/core/icu/icudata-stdlibs.patch similarity index 100% rename from extra/icu/icudata-stdlibs.patch rename to core/icu/icudata-stdlibs.patch