# Automatically generated by apkbuild-cpan, template 3
# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=perl-contextual-return
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Contextual-Return
pkgver=0.004014
pkgrel=0
pkgdesc="Create context-sensitive return values"
url="https://metacpan.org/release/Contextual-Return/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-want"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/D/DC/DCONWAY/Contextual-Return-$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="
5728b6b2347c888f32876226d4a940cafd0c41dc4a15e82d7f2c3a82d5585f2fa0e54477e466bcbdafcd7a607cd05483442f3c6270d08fdd632215b68b8abe27  Contextual-Return-0.004014.tar.gz
"
