# Automatically generated by apkbuild-cpan, template 3
# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=perl-test-vars
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Test-Vars
pkgver=0.015
pkgrel=1
pkgdesc="Detects unused variables in perl modules"
url="https://metacpan.org/release/Test-Vars/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
makedepends="perl-dev perl-module-build-tiny perl-module-build"
checkdepends="perl-moose perl-test-output"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/G/GF/GFUJI/Test-Vars-$pkgver.tar.gz
	fix-check.patch
	"
builddir="$srcdir/$_pkgreal-$pkgver"
options="!check" # still needs more fixes even with above for tests

build() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	perl Build.PL --installdirs=vendor
	./Build
}

check() {
	./Build test
}

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

sha512sums="
4ef674082b4f8247ce983264a962f3572a974ad116d84306a35d2207677feefc1289c23ad4dedab39181e2b69239bc14e38a41d36f539a17615b30f1f34f89bb  Test-Vars-0.015.tar.gz
8830012a6753d4b0341ff5b585209ed3e04a3105477965344d84e3551233ee502899da1faefbeb48d54bbee33bed1e9fc79cf9a058c6d01c5cf0a2f33983a2aa  fix-check.patch
"
