# Maintainer: Carlo Landmeter pkgname=gettext pkgver=0.18.3.2 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.gnu.org/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" 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 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="241aba309d07aa428252c74b40a818ef gettext-0.18.3.2.tar.gz" sha256sums="d1a4e452d60eb407ab0305976529a45c18124bd518d976971ac6dc7aa8b4c5d7 gettext-0.18.3.2.tar.gz" sha512sums="0cf8f2bb844b9d94f5e63a0f4bddc133e2388d103fd4189614d2fc157a94e27836ec399eb32ab69410e2214425676e6bc195bbf13238cc5ad32b454ec6e2b5ef gettext-0.18.3.2.tar.gz"