# Automatically generated by apkbuild-cpan, template 4
# Contributor: rubicon <rubicon@mailo.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=perl-devel-caller
pkgver=2.07
pkgrel=3
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Devel-Caller
pkgdesc="Enhanced versions of caller()"
url="https://metacpan.org/release/Devel-Caller/"
arch="all"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-padwalker"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/R/RC/RCLAMP/Devel-Caller-$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 \
		NO_PACKLIST=1 \
		NO_PERLLOCAL=1
	make
}

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

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
9c4bc1bfbd012c803ce7e0ec1c586558e6e4198ed19dac6608eb05939a74cfe2e6613942696451cfa1aad4f98f2acea6a2e43fa32b5d377787c00b560d7d8111  Devel-Caller-2.07.tar.gz
"
