# Maintainer: Peter Budai <peterbudai at hotmail dot com>

_realname=Unicode-LineBreak
pkgname=perl-${_realname}
pkgver=2019.001
pkgrel=4
pkgdesc="UAX #14 Unicode Line Breaking Algorithm"
arch=('i686' 'x86_64')
url="https://metacpan.org/release/${_realname}"
groups=("perl-modules")
license=('GPL' 'PerlArtistic')
depends=("perl" "perl-MIME-Charset")
makedepends=("perl-devel")
checkdepends=("perl-Test-Pod")
conflicts=("perl-Unicode-GCString")
replaces=("perl-Unicode-GCString")
options=('!emptydirs')
source=(https://cpan.metacpan.org/authors/id/N/NE/NEZUMI/${_realname}-${pkgver}.tar.gz)
sha256sums=('486762e4cacddcc77b13989f979a029f84630b8175e7fef17989e157d4b6318a')

prepare() {
  cd "${srcdir}/${_realname}-${pkgver}"
}

build() {
  cd "${srcdir}/${_realname}-${pkgver}"

  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make test
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make install DESTDIR=${pkgdir}
}
