summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ecdd963b527b16b2d94d538e6f39c079830157da (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
pkgver=2.086
pkgrel=1
pkgdesc='The Perl Data Language'
_dist=PDL
arch=(i686 x86_64)
url="https://metacpan.org/release/$_dist"
license=(GPL PerlArtistic)
depends=(
  perl
  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
  # The related modules likely will not be very useful without these
  # dependencies
  #
  # See https://metacpan.org/release/ETJ/PDL-2.085/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
  proj
  perl-alien-proj

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

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

  #--- PDL::Graphics::IIS (pick only one package)
  xgterm-bin
  # ds9
  # ds9-bin

  #--- 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
  hdf4
  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-exception
  perl-test-warn
)
options=('!emptydirs' purge)
source=("https://cpan.metacpan.org/authors/id/E/ET/ETJ/$_dist-$pkgver.tar.gz"
        perldl.conf)
sha256sums=(e3875b02c57943c30752343301b26c2835635c4b4a5c2d2c26f5a75c3a06986e
            SKIP)

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/5.38/vendor_perl/$_dist"

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