# Automatically generated by apkbuild-cpan, template 3
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-moose
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Moose
pkgver=2.2207
pkgrel=1
pkgdesc="A postmodern object system for Perl 5"
options="!check" # Tests introduce circular dependencies
url="https://metacpan.org/release/Moose/"
arch="all"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="
	perl perl-module-runtime perl-data-optlist perl-params-util perl-module-runtime-conflicts
	perl-package-deprecationmanager perl-dist-checkconflicts perl-try-tiny perl-class-load
	perl-devel-globaldestruction perl-package-stash perl-eval-closure perl-devel-overloadinfo
	perl-sub-exporter perl-package-stash-xs perl-class-load-xs perl-mro-compat
	perl-devel-stacktrace
	"
makedepends="perl-dev perl-dist-checkconflicts"
checkdepends="perl-cpan-meta-check perl-test-fatal perl-test-needs"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/E/ET/ETHER/Moose-$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="
bc0efe3b9c7fea8ef6bb2976d2ec677250f998b3d8513a7fca59a10291f8ff5f13dd5e1d49d036071d93b5caa19685b704ef3588aa9307cda40ec5ba15b6985a  Moose-2.2207.tar.gz
"
