# Automatically generated by apkbuild-cpan, template 1
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-unicode-linebreak
_pkgreal=Unicode-LineBreak
pkgver=2017.004
pkgrel=1
pkgdesc="UAX #14 Unicode Line Breaking Algorithm"
url="http://search.cpan.org/dist/Unicode-LineBreak/"
arch="all"
license="GPL PerlArtistic"
cpandepends="perl-mime-charset"
cpanmakedepends="   "
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/N/NE/NEZUMI/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

check() {
	cd "$builddir"
	make test
}

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

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

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="f372174a761f87663761dc8b0f9bf387ffe289ba267fc0fb58353ac06dfa9418d4b0ac6e4e0d7833d842feacae4f8e90e521cd677ab22db1bf32e75f10f2e727  Unicode-LineBreak-2017.004.tar.gz"