# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=perl-ppix-regexp
pkgver=0.088
pkgrel=1
pkgdesc="Represent a regular expression of some sort"
url="https://metacpan.org/pod/PPIx::Regexp"
arch="noarch"
license="GPL-1.0-only OR Artistic-1.0-Perl"
depends="perl-ppi"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/W/WY/WYANT/PPIx-Regexp-$pkgver.tar.gz"
builddir="$srcdir/PPIx-Regexp-$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="
a787c34c936f4b26f50a7dabd5212b2d7d4ba34e16753e740768bd354072cb6e45ebfe880658d2c9e3799ee6e99c7f2b208f128d76421750f38bd63abe2bba3c  PPIx-Regexp-0.088.tar.gz
"
