# Automatically generated by apkbuild-cpan, template 4
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=perl-parser-mgc
pkgver=0.23
pkgrel=0
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Parser-MGC
pkgdesc="Build simple recursive-descent parsers in Perl"
url="https://metacpan.org/release/Parser-MGC/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
makedepends="perl-module-build"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Parser-MGC-$pkgver.tar.gz
	use-try-from-core.patch
	"
builddir="$srcdir/$_pkgreal-$pkgver"

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

check() {
	./Build test
}

package() {
	./Build install --destdir="$pkgdir"
}

doc() {
	local file; find "$pkgdir" -name "*.pod" | while read -r file; do
		amove "${file#"$pkgdir"}"
	done
	default_doc
}

sha512sums="
e3fe9ed4ea489c1dcc6fe92e7e36a730b0836d82ae8269ae820dd65b4dc55f0a7267af48c81719a3d63932aa09f20432a20b788ed17c7f57987676da494fc187  Parser-MGC-0.23.tar.gz
61a4dedad66d188abc3c62376e8653d48aa7480cd7966fb7a72aa364ede2c354e1f08285d638a9070957cb3f6a675969679c7e22be5d773d926656156bfa0bb7  use-try-from-core.patch
"
