testing/perl-uri-encode-xs: upgrade to 0.11 and modernize

This commit is contained in:
Roberto Oliveira 2018-01-05 00:37:19 +00:00
parent d80f008eda
commit 23e18f5a1f

View File

@ -3,39 +3,42 @@
# Maintainer: Nick Andrew <nick@nick-andrew.net> # Maintainer: Nick Andrew <nick@nick-andrew.net>
pkgname=perl-uri-encode-xs pkgname=perl-uri-encode-xs
_pkgreal=URI-Encode-XS _pkgreal=URI-Encode-XS
pkgver=0.09 pkgver=0.11
pkgrel=1 pkgrel=0
pkgdesc="a Perl URI encoder/decoder using C" pkgdesc="A Perl URI encoder/decoder using C"
url="http://search.cpan.org/dist/URI-Encode-XS/" url="http://search.cpan.org/dist/URI-Encode-XS/"
arch="all" arch="all"
license="freebsd" license="freebsd"
cpandepends="" cpandepends=""
cpanmakedepends=" " cpanmakedepends=""
depends="$cpandepends" depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends" makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc" subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/D/DF/DFARRELL/$_pkgreal-$pkgver.tar.gz" source="http://search.cpan.org/CPAN/authors/id/D/DF/DFARRELL/$_pkgreal-$pkgver.tar.gz"
_builddir="$srcdir/$_pkgreal-$pkgver" builddir="$srcdir/$_pkgreal-$pkgver"
prepare() { prepare() {
cd "$_builddir" cd "$builddir"
export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'` export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
} }
build() { build() {
cd "$_builddir" cd "$builddir"
export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'` export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
make && make test make
}
check() {
cd "$builddir"
make test
} }
package() { package() {
cd "$_builddir" cd "$builddir"
make DESTDIR="$pkgdir" install || return 1 make DESTDIR="$pkgdir" install
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
} }
md5sums="f69fed801e7f5151dbbeefc5595a6a75 URI-Encode-XS-0.09.tar.gz" sha512sums="2035723d68e67f3dceadc6f92c95558f7d30531bd559f4de07f7f3240e4512ae35b5452213be41fa1ee3be65b1803ccbd7299587373fc2c339fdab8a42479d93 URI-Encode-XS-0.11.tar.gz"
sha256sums="2770fe4d947d5947f0e6ffe90fe13de0357e0c9205418ab72a85148b12bf4511 URI-Encode-XS-0.09.tar.gz"
sha512sums="e96c554af5faaa53326b0f583e09deb46fc0c4853a9b154709b32863767001e066e5625f25dc841736f6cce50d59a963d138838418b020acf351f0a08aa058aa URI-Encode-XS-0.09.tar.gz"