# Packager: Dimitris Tzemos <djemos~at~slackel~dot~gr>
# Former Packager(s) : Shador <futur~DOT~andy~AT~googlemail.com>

pkgname=perl-locale-gettext
pkgver=1.05
pkgrel=2rl
source=("http://search.cpan.org/CPAN/authors/id/P/PV/PVANDRY/gettext-1.05.tar.gz"
        "http://patch-tracker.debian.org/patch/series/dl/liblocale-gettext-perl/1.05-4/compatibility-with-POSIX-module.diff")
sourcetemplate=http://people.salixos.org/djemos/salix/$pkgname
docs=("readme")
url='http://search.cpan.org/~pvandry/gettext-1.05/gettext.pm'

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"$pkgname (message handling functions)"
"The gettext module permits access from perl to the gettext() family of"
"functions for retrieving message strings from databases constructed to"
"internationalize software."
)

build() {
cd $startdir/src/gettext-$pkgver
  
patch -p1 -i ../compatibility-with-POSIX-module.diff

	perl Makefile.PL || return 1
	make OPTIMIZE="$CFLAGS" || return 1
	make install INSTALLDIRS=vendor DESTDIR=$startdir/pkg || return 1

	# Remove perllocal.pod and .packlist if present in the package
	( for i in perllocal.pod .packlist; do
	        find $startdir/pkg -name "$i" -exec rm -rf {} \;
		  done
	) || return 1
}