aboutsummaryrefslogtreecommitdiffstats
path: root/main/icu/APKBUILD
blob: bd914c14db49123109104c2a44383093a8dd01ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=icu
pkgver=51.1

# convert x.y.z to x_y_z
_ver=${pkgver//./_}

pkgrel=0
pkgdesc="International Components for Unicode library"
url="http://www.icu-project.org/"
arch="all"
license="custom:icu"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
depends=
makedepends=
source="http://download.icu-project.org/files/icu4c/${pkgver}/${pkgname}4c-$_ver-src.tgz
	icu-timezone-uclibc.patch
	"

_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 \
		--with-data-packaging=library \
		--disable-samples \
		--mandir=/usr/share/man \
		|| return 1
	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
}

libs() {
	default_libs
	replaces="icu"
}

md5sums="6eef33b229d0239d654983028c9c7053  icu4c-51_1-src.tgz
70aabd2c1e14477cfa261e729ffd7054  icu-timezone-uclibc.patch"
sha256sums="87e5ae513bd29f25f8648044af01d5ab77460912f375f9fe11f58a54e783666b  icu4c-51_1-src.tgz
ce246c007664cb2440ad4c3a224e8133b50b302051783d383c67a0e2b116d176  icu-timezone-uclibc.patch"
sha512sums="e6ee38f8e380db41803bf5291f2abd88d2efd27a322fa2345111fee3b58b852e3c079fc5408d0da379f86540f1a20131916a598f2a14bd57edd2f15cd64935f3  icu4c-51_1-src.tgz
4fad17085e9c6b4f16e29b60558fbb594015068466718944ef4a4f2e08bf43d7b0bb81d908f0f7e8e2c1594c44c5923e92a848aef15e7862c64fa65a66a08212  icu-timezone-uclibc.patch"