aboutsummaryrefslogtreecommitdiffstats
path: root/main/icu/APKBUILD
blob: 6cd78266d24a749fe05263152fece4414cf8aa7d (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
84
85
86
87
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=icu
pkgver=53.1

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

pkgrel=2
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-2014-8146.patch
	CVE-2014-8147.patch
	CVE-2015-1270.patch
	"

_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="b73baa6fbdfef197608d1f69300919b9  icu4c-53_1-src.tgz
7c5d8b8105c26afa78fa4300bb4bed48  icu-timezone.patch
59b258e7dedf329faa270d7c56efec59  CVE-2014-8146.patch
13c2413b00c25791d2c9240684b6971d  CVE-2014-8147.patch
a96d030215717af9f86df767dad18c9d  CVE-2015-1270.patch"
sha256sums="6fa74fb5aac070c23eaba1711a7178fe582c59867484c5ec07c49002787a9a28  icu4c-53_1-src.tgz
b5bff5392e5c6b8bacd8f06fd32bff08688c7884bd33ffc10ef4338f621c6ef5  icu-timezone.patch
ab82594942d372d6ae54c76a687d9388cc8f53b86360d6b11899ade7d8c28a3e  CVE-2014-8146.patch
c665c5ac66f86815f9c6459f7033e5915ef68e2d365ae458cdd2bd164dbf3174  CVE-2014-8147.patch
ab91523197421856caa4dfd2d0540901d098d1a470a7b3d8fec1986f0ad0f305  CVE-2015-1270.patch"
sha512sums="2172bfa7d61172b62380762f180336cf86264faed247e57f9143a5dcc84c286b96baa100302c0d54fe6f51af2d7e286cc5176db8f99c58157a5a750270e770df  icu4c-53_1-src.tgz
fc424cf0b78c9dcdea309e161b4ead3537207dc1b0ef8a2b0d824360a261f7b358cc0261e8c9e74f61244b67db106c92902ff63fcbaabf31d701d38e37a8e658  icu-timezone.patch
fecf44dd06701978014779f791c6b10c3544a3bc8d9f1fda4f7f93adff84f31361b128e61637bace221e733d95063cefcc23bd7e2e86a7d5d68cfad0a52ef736  CVE-2014-8146.patch
62e1ea2dd5ab91a204dda73f19549c4fb3a16490cd594d567a9f20bad877b504af4b9e6ecf83334e3a51e368e1cfe76ec3fd280c5637c32f1aae7677ff7fdf78  CVE-2014-8147.patch
129ff2e3f12bbce46bfaee13660348fe28a0665b19c27af58484dc25a4ce25cfc8bce3a3c4155bc5ff18fd8269d6e1f061dbbcb5679f285678167b8abcd1f809  CVE-2015-1270.patch"