# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: Adélie Perl Team <adelie-perl@lists.adelielinux.org>
pkgname=perl-gdgraph
_pkgname=GDGraph
pkgver=1.54
pkgrel=0
pkgdesc="Produce charts from Perl using GD"
url="https://metacpan.org/release/GDGraph"
arch="noarch"
license="Artistic-1.0-Perl OR GPL-2.0-only"
depends="perl-gd perl-gdtextutil"
checkdepends="perl-capture-tiny perl-test-exception"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/R/RU/RUZ/GDGraph-$pkgver.tar.gz"
builddir="$srcdir/GDGraph-$pkgver"

build() {
	cd "$builddir"
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	cd "$builddir"
	make test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="0dd0da5fa0e879cf2addcbfdd02ee8e9e6af715b88b451dc29fe5028f30d7ba7fa0e126d07e7bb4f9a63e40b3be95a9cc0f6c061ea8644ba0ee7fdd2a7964fce  GDGraph-1.54.tar.gz"