aboutsummaryrefslogtreecommitdiffstats
path: root/main/icu/APKBUILD
blob: 62839b360611c86993dccd628ae20f4b0555bf5e (plain) (blame)
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
# Contributor: Sergey Lukin <sergej.lukin@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=icu
pkgver=66.1
pkgrel=0
pkgdesc="International Components for Unicode library"
url="http://icu-project.org/"
arch="all"
license="MIT ICU Unicode-TOU"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-libs"
depends_dev="$pkgname=$pkgver-r$pkgrel"
checkdepends="diffutils python3"
source="https://github.com/unicode-org/icu/releases/download/release-${pkgver//./-}/icu4c-${pkgver//./_}-src.tgz"
builddir="$srcdir"/icu/source

# secfixes:
#   65.1-r1:
#     - CVE-2020-10531
#   57.1-r1:
#     - CVE-2016-6293
#   58.1-r1:
#     - CVE-2016-7415
#   58.2-r2:
#     - CVE-2017-7867
#     - CVE-2017-7868

# Failing tests on ARMv7
case "$CARCH" in
	armv7) options="!check";;
esac

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--with-data-packaging=library \
		--disable-samples \
		--enable-static \
		--mandir=/usr/share/man
	mkdir -p data/out # work around for s390x build issue
	make
}

check() {
	make check
}

package() {
	make -j1 DESTDIR="$pkgdir" install
	chmod +x "$pkgdir"/usr/bin/icu-config
	install -Dm644 "$srcdir"/icu/license.html \
		"$pkgdir"/usr/share/licenses/icu/license.html
}

static() {
	pkgdesc="$pkgname static libraries"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/
}

libs() {
	default_libs
	replaces="icu"
}

sha512sums="78d87bce65a7bdf7e9a19bda13e353c60846816ff34025f829d1ff15f9ac49aa6061eb192173742be0eca105684ce0e39e95656147afe848520bf60274c8d246  icu4c-66_1-src.tgz"