# Automatically generated by apkbuild-cpan, template 4
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=perl-match-simple-xs
pkgver=0.002
pkgrel=1
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=match-simple-XS
pkgdesc="XS backend for match::simple"
url="https://metacpan.org/release/match-simple-XS/"
arch="all"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
makedepends="perl-dev"
checkdepends="perl-test-fatal"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/T/TO/TOBYINK/match-simple-XS-$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="
e71e4153ddd16c6f83da91c1c3aa534806a86a73d69b1bc7806f8c09fed36f9ebd10ac71b91f21706c035d09da89cf71d9cc2ff339ba819196054b932807be5d  match-simple-XS-0.002.tar.gz
"
