aboutsummaryrefslogtreecommitdiffstats
path: root/main/icu/APKBUILD
blob: a84f584f70466e4e26dfd84682a765d9c0a8aeba (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
71
72
73
74
75
76
77
78
79
80
81
82
83
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=icu
pkgver=57.1

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

pkgrel=1
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.patch
	CVE-2016-6293.patch
	"

# secfixes:
#   57.1-r1:
#     - CVE-2016-6293

_builddir="$srcdir"/icu/source

prepare() {
	cd "$_builddir"
	update_config_sub || return 1

	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 \
		--build=$CBUILD \
		--host=$CHOST \
		--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="976734806026a4ef8bdd17937c8898b9  icu4c-57_1-src.tgz
2c81d9c9a6ea0af5b7391e001f37a5e0  icu-timezone.patch
7e65666fd48718440d819748118834ba  CVE-2016-6293.patch"
sha256sums="ff8c67cb65949b1e7808f2359f2b80f722697048e90e7cfc382ec1fe229e9581  icu4c-57_1-src.tgz
1c3c432228ee254af7adc995d65b65a4c9dac3b868fe1e49fe588a0ffa55a158  icu-timezone.patch
4b7322fa2d222bf20e74f8fb5d31f3ee44f214fc4b17e60dd89cc6252348435e  CVE-2016-6293.patch"
sha512sums="a3c701e9c81622db545bcf93f315c7b13159750f43f009d0aec59ceae3a8e1ccb751826d4b8a7387aca47f38bff2a85816b1a123b07d2bf731558c7b66e47b8a  icu4c-57_1-src.tgz
40489c36e28e160f08e045acab6c19cdb712ad3b7f87f67099deac7d579aaf13d8841cd3278a6bb0e998b5c34a378348a13fcc8bb14c9c4eb4f6adbd10d66825  icu-timezone.patch
8fba91b583896c52c12a0c8327f12fb77826779e453f91752826143bfdd5d2a2abe8db9836cdb6e12bcd31b9c683c00163e7c787807209d2e87ee8558d6293fb  CVE-2016-6293.patch"