summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorperry2016-09-04 09:47:11 +0000
committerperry2016-09-04 09:47:11 +0000
commit4b7d76abf761fd3e318de1bb2904193314a55d87 (patch)
tree6f3c779092cbe5588f33dd7f28d223a61c44f648
downloadaur-4b7d76abf761fd3e318de1bb2904193314a55d87.tar.gz
Initial commit
This package is based on the official 'icu' PKGBUILD for version 50.1.2 from 2013-01-19. It includes an additional patch for the TwoDigitYear test which works differently now that it's less than 20 years to 2034.
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD64
-rw-r--r--icu-testtwodigityear.patch13
-rw-r--r--icu.8198.revert.icu5431.patch129
4 files changed, 225 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..01638e500602
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = icu50
+ pkgdesc = International Components for Unicode library
+ pkgver = 50.1.2
+ pkgrel = 1
+ url = http://site.icu-project.org/
+ arch = i686
+ arch = x86_64
+ license = custom:icu
+ depends = gcc-libs>=4.7.1-5
+ depends = sh
+ source = http://download.icu-project.org/files/icu4c/50.1.2/icu4c-50_1_2-src.tgz
+ source = icu.8198.revert.icu5431.patch
+ source = icu-testtwodigityear.patch
+ md5sums = beb98aa972219c9fcd9c8a71314943c9
+ md5sums = ebd5470fc969c75e52baf4af94a9ee82
+ md5sums = 8d14652aee347adba25886cd14af1637
+
+pkgname = icu50
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0a7f3277fb6b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,64 @@
+# Contributor: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: Art Gramlich <art@gramlich-net.com>
+# Maintainer: Kevin Perry <perry+aur@coffee-break.at>
+
+_pkgbase=icu
+_pkgmajor=50
+_pkgminor=1
+_pkgpatch=2
+_libdir='/usr/lib'
+
+pkgname=${_pkgbase}${_pkgmajor}
+pkgver=${_pkgmajor}.${_pkgminor}.${_pkgpatch}
+pkgrel=1
+pkgdesc='International Components for Unicode library'
+url='http://site.icu-project.org/'
+license=('custom:icu')
+
+arch=('i686' 'x86_64')
+depends=('gcc-libs>=4.7.1-5' 'sh')
+source=("http://download.icu-project.org/files/${_pkgbase}4c/${pkgver}/${_pkgbase}4c-${pkgver//./_}-src.tgz"
+ 'icu.8198.revert.icu5431.patch'
+ 'icu-testtwodigityear.patch')
+md5sums=('beb98aa972219c9fcd9c8a71314943c9'
+ 'ebd5470fc969c75e52baf4af94a9ee82'
+ '8d14652aee347adba25886cd14af1637')
+
+prepare() {
+ cd ${srcdir}/${_pkgbase}/source
+
+ # fix Malayalam encoding https://bugzilla.redhat.com/show_bug.cgi?id=654200
+ patch -Rp3 -i ${srcdir}/icu.8198.revert.icu5431.patch
+
+ # fix TestTwoDigitYear https://sourceforge.net/p/icu/mailman/message/32443311/
+ # patch taken from CentOS 7 source package
+ # http://vault.centos.org/7.2.1511/os/Source/SPackages/icu-50.1.2-15.el7.src.rpm
+ patch -p2 -i ${srcdir}/icu-testtwodigityear.patch
+}
+
+build() {
+ cd ${srcdir}/${_pkgbase}/source
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man
+ make
+}
+
+check() {
+ cd ${srcdir}/${_pkgbase}/source
+ make check
+}
+
+package() {
+ cd ${srcdir}/${_pkgbase}/source
+
+ # copy only version specific libs
+ mkdir -p ${pkgdir}${_libdir}
+ cp -a lib/libicu*${_pkgmajor}* ${pkgdir}${_libdir}
+
+ # install license
+ install -Dm644 ${srcdir}/${_pkgbase}/license.html ${pkgdir}/usr/share/licenses/${pkgname}/license.html
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/icu-testtwodigityear.patch b/icu-testtwodigityear.patch
new file mode 100644
index 000000000000..6d2209775d0f
--- /dev/null
+++ b/icu-testtwodigityear.patch
@@ -0,0 +1,13 @@
+In the year 2034 ...
+http://sourceforge.net/p/icu/mailman/message/32443311/
+--- icu.orig/source/test/intltest/dtfmttst.cpp 2013-10-04 22:48:00.000000000 +0200
++++ icu/source/test/intltest/dtfmttst.cpp 2014-06-13 19:34:40.611299572 +0200
+@@ -1129,7 +1129,7 @@
+ return;
+ }
+ parse2DigitYear(fmt, "5/6/17", date(117, UCAL_JUNE, 5));
+- parse2DigitYear(fmt, "4/6/34", date(34, UCAL_JUNE, 4));
++ parse2DigitYear(fmt, "4/6/34", date(134, UCAL_JUNE, 4));
+ }
+
+ // -------------------------------------
diff --git a/icu.8198.revert.icu5431.patch b/icu.8198.revert.icu5431.patch
new file mode 100644
index 000000000000..4c3e78b8ed5d
--- /dev/null
+++ b/icu.8198.revert.icu5431.patch
@@ -0,0 +1,129 @@
+Index: icu/trunk/source/layout/IndicReordering.cpp
+===================================================================
+--- icu/trunk/source/layout/IndicReordering.cpp (revision 25772)
++++ icu/trunk/source/layout/IndicReordering.cpp (revision 26090)
+@@ -126,4 +126,8 @@
+ FeatureMask fSMFeatures;
+
++ LEUnicode fPreBaseConsonant;
++ LEUnicode fPreBaseVirama;
++ le_int32 fPBCIndex;
++ FeatureMask fPBCFeatures;
+
+ void saveMatra(LEUnicode matra, le_int32 matraIndex, IndicClassTable::CharClass matraClass)
+@@ -172,5 +176,6 @@
+ fMatraFeatures(0), fMPreOutIndex(-1), fMPreFixups(mpreFixups),
+ fVMabove(0), fVMpost(0), fVMIndex(0), fVMFeatures(0),
+- fSMabove(0), fSMbelow(0), fSMIndex(0), fSMFeatures(0)
++ fSMabove(0), fSMbelow(0), fSMIndex(0), fSMFeatures(0),
++ fPreBaseConsonant(0), fPreBaseVirama(0), fPBCIndex(0), fPBCFeatures(0)
+ {
+ // nothing else to do...
+@@ -191,4 +196,6 @@
+ fVMabove = fVMpost = 0;
+ fSMabove = fSMbelow = 0;
++
++ fPreBaseConsonant = fPreBaseVirama = 0;
+ }
+
+@@ -386,4 +393,12 @@
+ }
+
++ void notePreBaseConsonant(le_uint32 index,LEUnicode PBConsonant, LEUnicode PBVirama, FeatureMask features)
++ {
++ fPBCIndex = index;
++ fPreBaseConsonant = PBConsonant;
++ fPreBaseVirama = PBVirama;
++ fPBCFeatures = features;
++ }
++
+ void noteBaseConsonant()
+ {
+@@ -465,4 +480,20 @@
+ }
+
++ void writePreBaseConsonant()
++ {
++ // The TDIL spec says that consonant + virama + RRA should produce a rakar in Malayalam. However,
++ // it seems that almost none of the fonts for Malayalam are set up to handle this.
++ // So, we're going to force the issue here by using the rakar as defined with RA in most fonts.
++
++ if (fPreBaseConsonant == 0x0d31) { // RRA
++ fPreBaseConsonant = 0x0d30; // RA
++ }
++
++ if (fPreBaseConsonant != 0) {
++ writeChar(fPreBaseConsonant, fPBCIndex, fPBCFeatures);
++ writeChar(fPreBaseVirama,fPBCIndex-1,fPBCFeatures);
++ }
++ }
++
+ le_int32 getOutputIndex()
+ {
+@@ -723,4 +754,5 @@
+ }
+
++
+ IndicClassTable::CharClass charClass = CC_RESERVED;
+ IndicClassTable::CharClass nextClass = CC_RESERVED;
+@@ -730,7 +762,9 @@
+ le_bool seenVattu = FALSE;
+ le_bool seenBelowBaseForm = FALSE;
++ le_bool seenPreBaseForm = FALSE;
+ le_bool hasNukta = FALSE;
+ le_bool hasBelowBaseForm = FALSE;
+ le_bool hasPostBaseForm = FALSE;
++ le_bool hasPreBaseForm = FALSE;
+
+ if (postBase < markStart && classTable->isNukta(chars[postBase])) {
+@@ -746,12 +780,20 @@
+ hasBelowBaseForm = IndicClassTable::hasBelowBaseForm(charClass) && !hasNukta;
+ hasPostBaseForm = IndicClassTable::hasPostBaseForm(charClass) && !hasNukta;
++ hasPreBaseForm = IndicClassTable::hasPreBaseForm(charClass) && !hasNukta;
+
+ if (IndicClassTable::isConsonant(charClass)) {
+ if (postBaseLimit == 0 || seenVattu ||
+ (baseConsonant > baseLimit && !classTable->isVirama(chars[baseConsonant - 1])) ||
+- !(hasBelowBaseForm || hasPostBaseForm)) {
++ !(hasBelowBaseForm || hasPostBaseForm || hasPreBaseForm)) {
+ break;
+ }
+
++ // Note any pre-base consonants
++ if ( baseConsonant == lastConsonant && lastConsonant > 0 &&
++ hasPreBaseForm && classTable->isVirama(chars[baseConsonant - 1])) {
++ output.notePreBaseConsonant(lastConsonant,chars[lastConsonant],chars[lastConsonant-1],tagArray2);
++ seenPreBaseForm = TRUE;
++
++ }
+ // consonants with nuktas are never vattus
+ seenVattu = IndicClassTable::isVattu(charClass) && !hasNukta;
+@@ -786,10 +828,12 @@
+
+ // write any pre-base consonants
++ output.writePreBaseConsonant();
++
+ le_bool supressVattu = TRUE;
+
+ for (i = baseLimit; i < baseConsonant; i += 1) {
+ LEUnicode ch = chars[i];
+- // Don't put 'blwf' on first consonant.
+- FeatureMask features = (i == baseLimit? tagArray2 : tagArray1);
++ // Don't put 'pstf' or 'blwf' on anything before the base consonant.
++ FeatureMask features = tagArray1 & ~( pstfFeatureMask | blwfFeatureMask );
+
+ charClass = classTable->getCharClass(ch);
+@@ -842,5 +886,5 @@
+
+ // write below-base consonants
+- if (baseConsonant != lastConsonant) {
++ if (baseConsonant != lastConsonant && !seenPreBaseForm) {
+ for (i = bcSpan + 1; i < postBase; i += 1) {
+ output.writeChar(chars[i], i, tagArray1);
+@@ -872,5 +916,5 @@
+ // write post-base consonants
+ // FIXME: does this put the right tags on post-base consonants?
+- if (baseConsonant != lastConsonant) {
++ if (baseConsonant != lastConsonant && !seenPreBaseForm) {
+ if (postBase <= lastConsonant) {
+ for (i = postBase; i <= lastConsonant; i += 1) {