aboutsummaryrefslogtreecommitdiffstats
path: root/main/gettext/APKBUILD
blob: 2808e6edcb296b23208d4fe23fbdea19c4419d42 (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
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=gettext
pkgver=0.19.8.1
pkgrel=0
pkgdesc="GNU locale utilities"
url="http://www.gnu.org/software/gettext/gettext.html"
arch="all"
license="GPL"
depends=
# do _not_ add the optional dependencies on libcroco or glib
# they depend on gettext and would introduce cyclic dependencies
makedepends="perl ncurses-dev libxml2-dev libunistring-dev"
source="ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz
	fix-abi.patch"
subpackages="$pkgname-doc $pkgname-dev $pkgname-lang libintl $pkgname-asprintf $pkgname-libs"

_builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$_builddir"
	# force using system posix complaint printf
	# the test is broken and fails with ash
	gt_cv_func_printf_posix=yes \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-threads=posix \
		--disable-java \
		--disable-static \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir" install || return 1
	rm "$pkgdir"/usr/lib/charset.alias
}

libintl() {
	pkgdesc="GNU gettext runtime library"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libintl.so.* "$subpkgdir"/usr/lib
	chmod +x "$subpkgdir"/usr/lib/libintl.so.*
}

asprintf() {
	pkgdesc="GNU gettext asprintf library"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libasprintf.so.* "$subpkgdir"/usr/lib
}

md5sums="df3f5690eaa30fd228537b00cb7b7590  gettext-0.19.8.1.tar.xz
054ee44e6dfb056efd42dc3063e273ae  fix-abi.patch"
sha256sums="105556dbc5c3fbbc2aa0edb46d22d055748b6f5c7cd7a8d99f8e7eb84e938be4  gettext-0.19.8.1.tar.xz
48dff403e8966137e900186b2fbf9adaf7c3743ccc4c4d05b2b250009a0a6273  fix-abi.patch"
sha512sums="3553227b62f2a7d9b67c881ef889c030a6a21d5ecd210c4bf3d649df0b37193a99a68cf8fd5f2c69b6a87e847035dd9576f9bcb9363422866e26b04f4f6dd431  gettext-0.19.8.1.tar.xz
f517a351864bb194117e7147015db9a9b0ffbb1feb22ecf39bc1c99ad904420467e267a893c3b1a76c1adb810d1b37b1c2c1273cda861ff1d260102701bc644a  fix-abi.patch"