# Automatically generated by apkbuild-cpan, template 1
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-graphviz
_pkgreal=GraphViz
pkgver=2.26
pkgrel=1
pkgdesc="Interface to AT&T's GraphViz. Deprecated. See GraphViz2"
url="https://metacpan.org/release/GraphViz/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="
	perl perl-libwww perl-file-which perl-xml-twig perl-xml-xpath perl-ipc-run
	perl-parse-recdescent perl-module-build perl-test2-suite
	"
makedepends="graphviz font-dejavu perl-test-pod"
subpackages="$pkgname-doc"
source="$_pkgreal-$pkgver.tar.gz::https://github.com/graphviz-perl/GraphViz/archive/refs/tags/$pkgver.tar.gz"

builddir="$srcdir/$_pkgreal-$pkgver"

prepare() {
	default_prepare
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

build() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make
}

check() {
	make test
}

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

sha512sums="
558c0c6b33dcdc97be66c196e218433eda1b4b2572ec575fc86647a88eff66eeb8216b8e10996c42c21c2969bba73d249a712d4611f6a619d3e42ad294d9d793  GraphViz-2.26.tar.gz
"
