# Maintainer: Andrea Dalle Vacche adallevacche@bloomberg.net

_realname=Math-Int64
pkgname=perl-${_realname}
pkgver=0.57
pkgrel=2
pkgdesc="Math::Int64 - Manipulate 64 bits integers in Perl"
arch=('i686' 'x86_64')
license=('GPL' 'PerlArtistic')
url="https://metacpan.org/dist/Math-Int64"
msys2_references=(
  'purl: pkg:cpan/SALVA/Math-Int64'
)
depends=('perl')
makedepends=('perl-devel' 'make' 'gcc')
groups=('perl-modules')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/S/SA/SALVA/${_realname}-${pkgver}.tar.gz")
sha256sums=('12c60111c1cfceb257ac2ccc5b2e1721879efa09a1b0a73e8836afca107a7d75')

prepare() {
  cd ${_realname}-${pkgver}
}

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

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

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