# Maintainer: Carlo Landmeter pkgname=gettext pkgver=0.18.2.1 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="034c8103b14654ebd300fadac44d6f14 gettext-0.18.2.1.tar.gz" sha256sums="32fc1b85fc249ab81bfc37b942a992c7a34f2e1101357ce0d4591341b9164a0a gettext-0.18.2.1.tar.gz" sha512sums="9290efb692c25f0469fa2aec66e382603d2eb5e6873be30b3f6fea73c1c4ae99250a5d3292100316873dd7e3c791be834655ac3659e36100e8ecb128100a4235 gettext-0.18.2.1.tar.gz"