Package Details: perl-math-vec 1.01-2

Git Clone URL: https://aur.archlinux.org/perl-math-vec.git (read-only, click to copy)
Package Base: perl-math-vec
Description: Object-Oriented Vector Math Methods in Perl
Upstream URL: http://search.cpan.org/~ewilhelm/Math-Vec
Licenses: perl
Provides: math-vec, perl-math-vec
Submitter: jose1711
Maintainer: jose1711
Last Packager: jose1711
Votes: 0
Popularity: 0.000000
First Submitted: 2016-08-21 06:08 (UTC)
Last Updated: 2020-11-10 09:03 (UTC)

Latest Comments

Dylan14 commented on 2020-11-09 15:23 (UTC)

The PKGBUILD as provided will not work, as makepkg does not like colons in the provides field. Also, perl-module-build is needed as a make dependency.

Here is a corrected PKGBUILD:

# Maintainer: Jose Riha <jose1711 gmail com>
# Contributor Mathieu Clabaut <mathieu.clabaut@gmail.com>
# PKGBUILD generated by pacpan
pkgname=perl-math-vec
_realname=Math-Vec
pkgver=1.01
pkgrel=1
pkgdesc="Object-Oriented Vector Math Methods in Perl"
arch=(i686 x86_64)
license=('perl')
url="http://search.cpan.org/~ewilhelm/Math-Vec"
options=(!emptydirs)

depends=('perl')
makedepends=('perl-module-build')

provides=('math-vec=1.01' 'perl-math-vec=1.01')

source=(http://search.cpan.org/CPAN/authors/id/E/EW/EWILHELM/Math-Vec-1.01.tar.gz)
md5sums=('3d881e6f8074257d54125190719859eb')

build() {
  _expected_dir="${srcdir}/${_realname}-${pkgver}"
  if [ -d "$_expected_dir" ]; then
    cd "$_expected_dir"
  else
    _expected_dir="${srcdir}/$(bsdtar -t -f $(basename $source) | head -n1)"
    if [ -d "$_expected_dir" ]; then
      cd "$_expected_dir"
    else
      _makefile=$(find $srcdir -iname Makefile.PL)
      if [ ! -z "$_makefile" ]; then
        _expected_dir=$(dirname $_makefile)
        if [ -d "$_expected_dir" ]; then
          cd "$_expected_dir"
        else
          echo "?[1;31mERROR?[0m unable to detect source directory"
          echo "?[1;34m-->?[0m this is often due to CPAN's lack of standard naming conventions"
          echo "?[1;34m-->?[0m it may be possible to fix this by adjusting the build function in the PKGBUILD"
        fi
      fi
    fi
  fi
  # install module in vendor directories.
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  }

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

  # remove perllocal.pod and .packlist
  find ${pkgdir} -name perllocal.pod -delete
  find ${pkgdir} -name .packlist -delete
}