aboutsummaryrefslogtreecommitdiffstats
path: root/main/icu/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/icu/APKBUILD')
-rw-r--r--main/icu/APKBUILD63
1 files changed, 63 insertions, 0 deletions
diff --git a/main/icu/APKBUILD b/main/icu/APKBUILD
new file mode 100644
index 0000000000..64b09c0964
--- /dev/null
+++ b/main/icu/APKBUILD
@@ -0,0 +1,63 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=icu
+pkgver=4.8
+
+# convert x.y.z to x_y_z
+_x=${pkgver%%.*}
+_y=${pkgver#$_x.}
+_y=${_y%%.*}
+_z=${pkgver#*.*.}
+if [ "$_z" = "$pkgver" ]; then
+ _ver=${_x}_${_y}
+else
+ _ver=${_x}_${_y}_${_z}
+fi
+
+pkgrel=0
+pkgdesc="International Components for Unicode library"
+url="http://www.icu-project.org/"
+arch="all"
+license="custom:icu"
+subpackages="$pkgname-dev $pkgname-doc"
+depends=
+makedepends=
+source="http://download.icu-project.org/files/icu4c/${pkgver}/${pkgname}4c-$_ver-src.tgz
+ "
+
+_builddir="$srcdir"/icu/source
+
+prepare() {
+ cd "$_builddir"
+ local x
+ # https://bugs.icu-project.org/trac/ticket/6102
+ for x in ARFLAGS CFLAGS CPPFLAGS CXXFLAGS FFLAGS LDFLAGS; do
+ sed -i -e "/^${x} =.*/s:@${x}@::" "config/Makefile.inc.in" \
+ || return 1
+ done
+
+ for i in $source; do
+ case "$i" in
+ *.patch)
+ msg "Applying $i"
+ patch -p1 -i "$srcdir"/$i || return 1
+ ;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make -j1 DESTDIR="$pkgdir" install || return 1
+ chmod +x "$pkgdir"/usr/bin/icu-config
+ install -Dm644 "$srcdir"/icu/license.html \
+ "$pkgdir"/usr/share/licenses/icu/license.html
+}
+md5sums="e78194c49d7fd8131353aa180d11b789 icu4c-4_8-src.tgz"