# Description: Locale::gettext - Interface to C library functions for internatialization.
# URL: https://metacpan.org/release/gettext
# Maintainer: unmaintained

name=p5-locale-gettext
version=1.07
release=2
source=(https://cpan.metacpan.org/authors/id/P/PV/PVANDRY/gettext-$version.tar.gz)

build() {
  cd Locale-gettext-$version

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make OPTIMIZE="$CFLAGS"
  make DESTDIR=$PKG install

  # Remove perlcrap
  find $PKG \
    -name '.packlist' -delete -or \
    -name '*.bs' -delete -or \
    -name 'autosplit.ix' -delete -or \
    -name 'perllocal.pod' -delete

  # Remove empty directories
  find $PKG -depth -empty -exec rm -rf {} \;
}
