aboutsummaryrefslogtreecommitdiffstats
path: root/main/gettext/APKBUILD
blob: b5f83070271ed24a0d6b788a17c5f4518657f2e8 (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
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=gettext
pkgver=0.18.1.1
pkgrel=6
pkgdesc="GNU locale utilities"
url="http://www.gnu.org/software/gettext/gettext.html"
arch="all"
license='GPL'
depends=
depends_dev="libiconv-dev expat-dev ncurses-dev libxml2-dev"
makedepends="$depends_dev bash"
source="ftp://ftp.mirror.nl/pub/mirror/gnu/gettext/gettext-$pkgver.tar.gz
	gettext-uclibc.patch
	"
subpackages="$pkgname-doc $pkgname-dev libintl"

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

prepare() {
	cd "$_builddir"
	for i in ../*.patch; do
		[ -r "$i" ] || continue
		msg "Applying $i..."
		patch -p1 < $i || return 1
	done
}

build() {
	cd "$_builddir"
	# http://bugs.gentoo.org/show_bug.cgi?id=81628
	export CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"

	./configure --prefix=/usr \
		--mandir=/usr/share/man \
		--enable-threads=posix \
		--disable-java \
		--disable-static
	make || return 1
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir/" install
	rm "$pkgdir"/usr/lib/*.la
}

libintl() {
	replaces="gettext"
	mkdir -p "$subpkgdir"/usr/lib

	mv "$pkgdir"/usr/lib/libintl.so.* "$subpkgdir"/usr/lib
}

md5sums="3dd55b952826d2b32f51308f2f91aa89  gettext-0.18.1.1.tar.gz
cbf6444e7c8ad3aa70b2b80f8fcb6016  gettext-uclibc.patch"