# Automatically generated by apkbuild-cpan, template 3
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-list-someutils-xs
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=List-SomeUtils-XS
pkgver=0.58
pkgrel=8
pkgdesc="XS implementation for List::SomeUtils"
url="https://metacpan.org/release/List-SomeUtils-XS/"
arch="all"
license="Artistic-2.0"
depends="perl"
makedepends="perl-dev"
checkdepends="perl-test-leaktrace perl-test-warnings"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/List-SomeUtils-XS-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	PERL_MM_USE_DEFAULT=1 perl -I. Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="
f89f5a35224a69a59c1d512a819bd725b324f0968ea447824a42c741c4ba66ee9522db939bd3e75d190e0f2f75d54100912b83a86d5e7dd1079025a57a245c38  List-SomeUtils-XS-0.58.tar.gz
"
