aboutsummaryrefslogtreecommitdiffstats
path: root/main/gettext/APKBUILD
blob: 4a5c0de14dc800c59fa80f79449cb9b96d0438d8 (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
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=gettext
pkgver=0.18.3
pkgrel=0
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
	"
subpackages="$pkgname-doc $pkgname-dev libintl $pkgname-lang"

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

prepare() {
	cd "$_builddir"
	for i in ../*.patch; do
		[ -r "$i" ] || continue
		msg "Applying $i..."
		patch -p1 < $i || return 1
	done
        # fix eglibc-2.16+ build issue
        sed -i -e '/gets is a/d' \
		gettext-tools/gnulib-lib/stdio.in.h \
		gettext-tools/libgettextpo/stdio.in.h \
		gettext-runtime/gnulib-lib/stdio.in.h \
		|| return 1
}

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
	if [ "$ALPINE_LIBC" != "eglibc" ]; then
		mv "$pkgdir"/usr/lib/libintl.so.* \
			"$subpkgdir"/usr/lib || return 1
	fi
}

md5sums="3fa4236c41b7e837355de144210207ec  gettext-0.18.3.tar.gz"
sha256sums="36f3c1043df803565d4977c1efbd41e1ec0f0301acf5f057984406c34cb9f948  gettext-0.18.3.tar.gz"
sha512sums="812074a74c946c34b97efa351a3d2b1ff5b6321714e88912d188ba70c868c9d9b7263a8507514c05c1667bc5613e88d9a44569575db73dd046780824b0975bfd  gettext-0.18.3.tar.gz"