summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0f8a747bf76c149fb32936219cbd588e708e628f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# Maintainer: Elias Elwyn <a@jthv.ai>
# Contributor: Michał Wojdyła < micwoj9292 at gmail dot com >
# Contributor: Ordoban <dirk.langer@vvovgonik.de>
# Contributor: Anton Leontiev <bunder /at/ t-25.ru>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: carltonf <xiong[c05]@gmail.com>
# Contributor: Colin Pitrat <colin.pitrat@gmail.com>

pkgname=perl-pdl
_dist=PDL
pkgver=2.095
pkgrel=1
pkgdesc='The Perl Data Language'
license=('GPL-1.0-or-later OR Artistic-1.0-Perl')

url="https://metacpan.org/release/$_dist"
source=("$pkgname-$pkgver.tar.gz::https://cpan.metacpan.org/authors/id/E/ET/ETJ/$_dist-$pkgver.tar.gz"
        perldl.conf)
sha256sums=('b5bea7b1e1c4a05715531129243ab3577c0360a74ad1de656097eb71a8008c2f'
            'SKIP')

arch=(i686 x86_64)
depends=(
  perl glibc
  perl-file-which
  perl-pod-parser
  #--- PDL::IO::Dumper
  sharutils # replaces Convert::UU
  #--- PDL::IO::FastRaw, PDL::IO::FlexRaw
  perl-file-map

  # NOTE: the following dependencies are optional, you may comment any
  # section - BEFORE RUNNING MAKEPKG - that you'd like to do without.
  # They must be included here as they affect which modules are built.
  # The related modules will not be very useful without these dependencies.
  #
  # See https://metacpan.org/release/ETJ/PDL-2.094/source/DEPENDENCIES
  # for more information

  #-- Uncategorised
  perl-term-readkey

  #--- Inline::Pdlpp
  perl-inline
  perl-inline-c

  #--- pdl2, perldl
  # perl-devel-repl # pdl2 shell alternative backend
  perl-term-readline-gnu # XS performance for perldl
  perl-sys-sigaction

  #--- PDL::GIS::Proj, PDL::Transform::Proj
  # WARN: if this is commented, also comment PROJ_* in perldl.conf
  perl-alien-proj

  #--- PDL::Graphics::TriD
  perl-opengl
  perl-opengl-glut

  #--- PDL::Graphics::PGPLOT
  pgplot
  perl-pgplot

  #--- PDL::GSL
  gsl

  #--- PDL::IO::FITS
  perl-astro-fits-header

  #--- PDL::IO::GD
  gd

  #--- PDL::IO::HDF
  # WARN: if this is commented, also comment HDF_* in perldl.conf
  perl-alien-hdf4

  #--- PDL::IO::Pic
  netpbm
  ffmpeg

  #--- PDL::Slatec (used by other modules)
  #--- PDL::Minuit
  perl-extutils-f77
)
makedepends=(
  perl-devel-checklib
  perl-extutils-depends

  # NOTE: the following dependencies are optional, you may comment any
  # section - BEFORE RUNNING MAKEPKG - that you'd like to do without

  #--- PDL::Slatec (used by other modules)
  #--- PDL::Minuit
  gcc-fortran
)
checkdepends=(
  perl-test-deep
  perl-test-exception
  perl-test-warn
)
optdepends=(
  #--- PDL::Graphics::IIS
  'ds9: PDL::Graphics::IIS' # and ds9-bin
)
options=('!emptydirs')

build() {
  cd "$srcdir/$_dist-$pkgver"
  unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  /usr/bin/perl Makefile.PL PDLCONF="$srcdir/perldl.conf"
  make
}

check() {
  cd "$srcdir/$_dist-$pkgver"
  unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
  export PERL_MM_USE_DEFAULT=1
  make test
}

package() {
  # Fixes first builds: "No such file or directory at blib/lib/PDL/Doc.pm line 741"
  mkdir --parents "$pkgdir/usr/lib/perl5/$(perl -e '$^V =~ /v(\d+\.\d+)\.\d+/; print $1')/vendor_perl/$_dist"

  cd "$srcdir/$_dist-$pkgver"
  unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
  make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
}