# Automatically generated by apkbuild-cpan, template 3
# Contributor: Timothy Legge <timlegge@gmail.com>
# Maintainer: Timothy Legge <timlegge@gmail.com>
pkgname=perl-extutils-cppguess
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=ExtUtils-CppGuess
pkgver=0.27
pkgrel=0
pkgdesc="guess C++ compiler and flags"
url="https://metacpan.org/release/ExtUtils-CppGuess/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-capture-tiny"
makedepends="perl-dev"
checkdepends="perl-module-build"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/E/ET/ETJ/ExtUtils-CppGuess-$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
	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="
289e38f3033b3072ff40dffdea8cb60bc9f91e426ff927de2e8499724cecb03f76c4740b2f868d6c55bf019c9e6eb1a5de20111591c7292e60765f65a249e60c  ExtUtils-CppGuess-0.27.tar.gz
"
