# Automatically generated by apkbuild-cpan, template 2
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
setvar pkgname = 'perl-safe-isa'
setvar _pkgreal = 'Safe-Isa'
setvar pkgver = '1.000006'
setvar pkgrel = '0'
setvar pkgdesc = ""Call isa, can, does and DOES safely on things that may not be objects""
setvar url = ""http://search.cpan.org/dist/Safe-Isa/""
setvar arch = ""noarch""
setvar license = ""GPL PerlArtistic""
setvar cpandepends = """"
setvar cpanmakedepends = """"
setvar cpancheckdepends = """"
setvar depends = "$cpandepends"
setvar makedepends = ""perl-dev $cpanmakedepends""
setvar checkdepends = "$cpancheckdepends"
setvar subpackages = ""$pkgname-doc""
setvar source = ""http://search.cpan.org/CPAN/authors/id/H/HA/HAARG/$_pkgreal-$pkgver.tar.gz""
setvar builddir = ""$srcdir/$_pkgreal-$pkgver""

proc prepare {
	default_prepare || return 1

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

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

proc package {
	cd $builddir
	make DESTDIR="$pkgdir" install || return 1
	find $pkgdir '(' -name perllocal.pod -o -name .packlist ')' -delete
}

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

setvar sha512sums = ""2b6665fcd085969cfac48ca9079d89622480bfff055e4fc2817ff54ef1e15d2a3280f8455473a6922ae4e924f10c065b304a7733e4b1ab9f57cdbea26c7b552e  Safe-Isa-1.000006.tar.gz""