# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=perl-test-runvalgrind
_pkgreal=Test-RunValgrind
_author=SHLOMIF
_au=${_author%%"${_author#??}"}
_a=${_author%%"${_author#?}"}
pkgver=0.2.2
pkgrel=0
pkgdesc="Tests an external program is 'valgrind clean' from Perl"
url="https://metacpan.org/release/Test-RunValgrind"
arch="noarch"
license="MIT"
depends="perl perl-path-tiny perl-test-trap valgrind"
makedepends="perl-dev perl-module-build"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/$_a/$_au/$_author/$_pkgreal-$pkgver.tar.gz
	portable-memory-assumptions.patch
	"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	perl Build.PL installdirs=vendor
	./Build
}

check() {
	./Build test
}

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

sha512sums="6b27657e5ba914fa0bc5d8e4b30c8563e2786e7e91cd8432fa1ff45463a90f0907c2606c25625682e8a2a99c545395cf599a616512d39f4a68a6ec7bdd7c0e0f  Test-RunValgrind-0.2.2.tar.gz
f2ebba2310df820666728e5f59c44f5b63cd03efdb42092f22700da13b4f099ae5c911292fb2a0f271f7629343727ea14c5953d2918c98419a580e5a998cb650  portable-memory-assumptions.patch"