# Automatically generated by apkbuild-cpan, template 4
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-regexp-common
pkgver=2024080801
pkgrel=0
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Regexp-Common
pkgdesc="Provide commonly requested regular expressions"
url="https://metacpan.org/release/Regexp-Common/"
arch="noarch"
license="MIT OR Artistic-2.0"
depends="perl"
checkdepends="perl-test-regexp"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/A/AB/ABIGAIL/Regexp-Common-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"
options="!check" # take forever

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="
dc1b9cc23e5e1ea8fc26e892098a3fe8fe9d25736cce5728364192eb26c8aba2a445c563037e037315d638b48e272e909654b9e27196a0d880e4ce6573937a56  Regexp-Common-2024080801.tar.gz
"
