### this file is sourced not run
PKGVER=0.19.8.1
PKGBUILD=2
PKGARCH=i686

TARBALL=gettext-$PKGVER.tar.xz
MD5SUM=df3f5690eaa30fd228537b00cb7b7590
BUNDLE=fatdog-base-8.2.tar
SRC_URL=http://distro.ibiblio.org/fatdog/source/800/$BUNDLE

SLACKREQ=
SLACKDESC="gettext32: gettext32 $PKGVER (Localisation helper)  
gettext32:  
gettext32: The Gettext package contains utilities for internationalization and 
gettext32: localization. These allow programs to be compiled with NLS (Native 
gettext32: Language Support), enabling them to output messages in the user'\''s 
gettext32: native language.  
gettext32: 
gettext32: This package contains 32-bit libraries for gettext.
gettext32: 
gettext32: 
gettext32:
"


### override download for LFS sources bundle
# $1-src-dir $2-tarball 
pkg_download() {
	echo downloading $BUNDLE for $TARBALL
	wget -P $1 $SRC_URL
	tar -xf $1/$BUNDLE --strip-components=1 -C $1 
	rm $1/$BUNDLE
}

pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/gettext-* &&
	patch -Np1 -i ../pkg/upstream-fix-expansion-of-escape-sequences.patch
}

### package - only collect the libraries
pkg_package() {
	rm -rf bin sbin usr/bin usr/sbin usr/include usr/share
}

### build
pkg_build() {
	export EMACS="no"
	CONFFLAGS="$CONFFLAGS --docdir=/usr/share/doc/gettext-$PKGVER \
		--with-included-glib         \
		--with-included-libcroco     \
		--with-included-libunistring \
		--with-included-libxml       \
	"

	pkg_build_autoconf && pkg_build_slackdesc
}


