# Automatically generated by apkbuild-cpan, template 4
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=perl-pdf-api2
pkgver=2.047
pkgrel=0
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=PDF-API2
pkgdesc="Facilitates the creation and modification of PDF files"
url="https://metacpan.org/release/PDF-API2/"
arch="noarch"
license="LGPL-2.1-or-later"
depends="perl perl-font-ttf"
checkdepends="perl-test-exception perl-test-memory-cycle"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/S/SS/SSIMMS/PDF-API2-$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="
8e3fed9adbd96c15a052ccf78ec516bcf5735b0da95f7259cbbfa8c5486af56daa36bd9fe759821fa2d908cb63e46d993f38a1b2402ecc6c2f93a32d6ead8a9a  PDF-API2-2.047.tar.gz
"
