# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=perl-ppi
pkgver=1.279
pkgrel=0
pkgdesc="Parse, Analyze and Manipulate Perl (without perl)"
url="https://metacpan.org/pod/PPI"
arch="noarch"
license="Artistic-1.0-Perl"
depends="perl perl-clone perl-params-util perl-task-weaken"
checkdepends="perl-class-inspector perl-test-nowarnings perl-test-object perl-test-subcalls"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/M/MI/MITHALDU/PPI-$pkgver.tar.gz"
builddir="$srcdir/PPI-$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="
96b3144f2c4b0d45f9761dca470caa2150e975085a352fecf26c250b1e210c11183e57499a4a7c9d8994501ffdc25349ffe1f8ab60c44cf4f0ea324f822f7b4b  PPI-1.279.tar.gz
"
