aboutsummaryrefslogtreecommitdiffstats
path: root/main/icu/APKBUILD
blob: 87f14ef5f3f2368b0d36e92b4cbbf0d826f95db8 (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
# Contributor: Sergey Lukin <sergej.lukin@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=icu
pkgver=67.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="4779f1ce1ca7976f6fad6768853ea8c540da54d11509e3b6cfd864a04b5f2db1c3d4b546387f91ad02fb90804525bc37d2543173f0d705d6ca11dc6f2b7640a8  icu4c-67_1-src.tgz"