# Automatically generated by apkbuild-cpan, template 3
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=perl-menlo
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Menlo
pkgver=1.9019
pkgrel=0
pkgdesc="Backend for cpanm 2.0 CPAN client"
url="https://metacpan.org/release/Menlo/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="
	perl perl-parse-pmfile perl-string-shellquote
	perl-cpan-meta-check perl-extutils-helpers
	perl-module-cpanfile perl-cpan-distnameinfo
	perl-uri perl-file-pushd perl-file-which
	perl-extutils-installpaths perl-cpan-common-index
	perl-http-tinyish perl-capture-tiny perl-class-tiny
	perl-extutils-config perl-local-lib
	"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Menlo-$pkgver.tar.gz
	use-https-for-metacpan.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="
6b541a94f01c56154b104d3d4ed9607389c489996f355bf7138805d66abeaa7423cadf0cb33ec9046ee80e516a96296dd12b26e70d133ee83fa9eeb587acf5be  Menlo-1.9019.tar.gz
f37b95db829d6d89866188b80c949f72ecbac82c3bab3cad138b2508dfa13bc6aa7e453e69761d478c21ea7b067bc8fca8949785ecad20193b03b3e9fa3d555f  use-https-for-metacpan.patch
"
