# Maintainer: Carlo Landmeter pkgname=gettext pkgver=0.18.3.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" ./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 rm "$pkgdir"/usr/lib/*.la } 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="3fc808f7d25487fc72b5759df7419e02 gettext-0.18.3.1.tar.gz" sha256sums="0d8f9a33531b77776b3dc473e7940019ca19bfca5b4c06db6e96065eeb07245d gettext-0.18.3.1.tar.gz" sha512sums="b41f4ae5b5dc6459a9b87d6445c259ab8d8500fe760e4c5e6992245e96a1bf1b8ce424be82ff07bd67942301af7d9af4d2219643297e4baadfc8570ad9ab72cc gettext-0.18.3.1.tar.gz"