# Maintainer: Ray Donnelly <mingw.android@gmail.com>

_realname=Sys-CPU
pkgname=perl-${_realname}
pkgver=0.61
pkgrel=9
pkgdesc="Provide commonly requested regular expressions"
arch=('i686' 'x86_64')
url="https://metacpan.org/author/MZSANFORD${_realname}-${pkgver}"
groups=('perl-modules')
depends=('perl')
makedepends=('perl-devel')
license=('GPL' 'PerlArtistic')
source=("https://cpan.metacpan.org/authors/id/M/MZ/MZSANFORD/${_realname}-${pkgver}.tar.gz"
        "0001-Cygwin-is-as-per-Windows.patch")
sha256sums=('250a86b79c231001c4ae71d2f66428092a4fbb2070971acafd471aa49739c9e4'
            '3dc075609561da40044c6547274cb463c92d458e59839972a291ea0830193bc8')

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

  patch -p1 -i "${srcdir}"/0001-Cygwin-is-as-per-Windows.patch
}

build() {
  cd "$srcdir/${_realname}-${pkgver}"
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

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