# Maintainer: Carlo Landmeter pkgname=gettext pkgver=0.19.6 pkgrel=3 pkgdesc="GNU locale utilities" url="http://www.gnu.org/software/gettext/gettext.html" arch="all" license='GPL' depends= depends_dev="expat-dev ncurses-dev libxml2-dev" makedepends="$depends_dev bash" source="ftp://ftp.gnu.org/gnu/gettext/gettext-$pkgver.tar.xz " 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" LIBS="-lrt" \ ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --mandir=/usr/share/man \ --enable-threads=posix \ --disable-java \ --disable-static \ || return 1 make || return 1 } package() { cd "$_builddir" make -j1 DESTDIR="$pkgdir/" install } libintl() { replaces="gettext" mkdir -p "$subpkgdir"/usr/lib rm -rf "$pkgdir"/usr/lib/charset.alias rmdir -p "$pkgdir"/usr/lib 2>/dev/null if [ "$ALPINE_LIBC" != "eglibc" ]; then mv "$pkgdir"/usr/lib/libintl.so.* \ "$subpkgdir"/usr/lib || return 1 fi return 0 } md5sums="69d79254ee3b41df23f41c2f4fd720d9 gettext-0.19.6.tar.xz" sha256sums="9b95816620fd1168cb4eeca0e9dc0ffd86e864fc668f76f5e37cc054d6982e51 gettext-0.19.6.tar.xz" sha512sums="ce30735dea271ed04312a7b06dccf4294658c9776866ff4eb2f3df412154e122a8812af2330aa729d5435fa2ced9da2296a74ec8ef1ad7b0eb024225a8eaaca1 gettext-0.19.6.tar.xz"