# Automatically generated by apkbuild-cpan, template 3
# Contributor: Timothy Legge <timlegge@gmail.com>
# Maintainer: Timothy Legge <timlegge@gmail.com>
pkgname=perl-html-tidy5
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=HTML-Tidy5
pkgver=1.06
pkgrel=6
pkgdesc="HTML validation in a Perl object"
url="https://metacpan.org/release/HTML-Tidy5/"
arch="all"
license="Artistic-2.0"
depends="perl"
makedepends="perl-dev tidyhtml-dev"
checkdepends="perl-test-exception"
subpackages="$pkgname-doc"
source="
	https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/HTML-Tidy5-$pkgver.tar.gz
	update-tests-for-tidy-5.8.0.patch
	"
builddir="$srcdir/$_pkgreal-$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="
5ce7da76e9fb0fb8ddbab048d0886bf0bd31d382da8d29b94a06a0871ad14b80db48a49f4c1886beea774e4d0f6529c13b0d3da2c52e29505416393ff0e5ce0a  HTML-Tidy5-1.06.tar.gz
8f6f2ea7eef718b95d791b4a590cfb994daf3f53be6ba5eaacf841176765257f75727bff03b19eb79667fe7be33b378241de6858a16ebf1a3e6e3767d8f7259b  update-tests-for-tidy-5.8.0.patch
"
