# Automatically generated by apkbuild-cpan, template 4
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=perl-ffi-c
pkgver=0.15
pkgrel=0
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=FFI-C
pkgdesc="C data types for FFI"
url="https://metacpan.org/release/FFI-C/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="
	perl perl-class-inspector perl-ffi-platypus
	perl-ffi-platypus-type-enum perl-ref-util
	perl-sub-identify perl-sub-install
	"
checkdepends="perl-capture-tiny perl-path-tiny perl-test2-suite"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/FFI-C-$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 \
		NO_PACKLIST=1 \
		NO_PERLLOCAL=1
	make
}

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

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
4f693a44eb9d4098f877ed9354c59e382a50d91a5a46f16441d4a96a751a87bb08ebdc99a700f5b97d03d7cfc58a50cfa946ee63252fe7b51e681e990ccb40c3  FFI-C-0.15.tar.gz
"
