summaryrefslogtreecommitdiff
path: root/demeter/PKGBUILD
blob: b35f17f6c5c936eeb3d4d51ffdbe8b62ecf984b7 (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
130
131
132
# Maintainer: Erich Eckner <arch at eckner dot net>
pkgname=demeter
pkgver=0.9.24
pkgrel=1
pkgdesc="Data Analysis Tools for X-ray Spectroscopy"
arch=('x86_64' 'i686')
url="https://bruceravel.github.io/demeter"
license=('BSD')
groups=()
depends=(
    'ifeffit'
    'perl-module-build'
    'perl-archive-zip'
    'perl-capture-tiny'
    'perl-chemistry-elements'
    'perl-config-ini'
    'perl-const-fast'
    'perl-datetime'
    'perl-encoding-fixlatin'
    'perl-file-copy-recursive'
    'perl-file-countlines'
    'perl-file-touch'
    'perl-file-which'
    'perl-graph'
    'perl-html-parser'
    'perl-heap'
    'perl-json'
    'perl-math-combinatorics'
    'perl-math-derivative'
    'perl-math-random'
    'perl-math-round'
    'perl-math-spline'
    'perl-moose'
    'perl-moosex-aliases'
    'perl-moosex-types'
    'perl-moosex-types-laxnum'
    'perl-pdl'
    'perl-pdl-stats'
    'perl-pod-pom'
    'perl-regexp-assemble'
    'perl-regexp-common'
    'perl-spreadsheet-writeexcel'
    'perl-statistics-descriptive'
    'perl-text-template'
    'perl-tree-simple'
    'perl-want'
    'perl-xmlrpc-lite'
    'perl-yaml-tiny'
    'perl-encoding-fixlatin-xs'
    'perl-file-monitor-lite'
    'perl-graphics-gnuplotif'
    'perl-term-sk'
    'perl-term-twiddle'
    'perl-wx'
    'perl-xmlrpc-lite'
)
makedepends=(
    'perl-capture-tiny'
    'perl-file-copy-recursive'
    'perl-file-slurper'
    'perl-image-size'
    'perl-ppi'
    'perl-ppi-html'
    'perl-pod-projectdocs'
    'perl-syntax-highlight-perl'
    'perl-template-toolkit'
)
checkdepends=()
[ -z "$DISPLAY" ] && checkdepends+=('xorg-server-xvfb')
optdepends=(
    'perl-encoding-fixlatin-xs'
    'perl-file-monitor-lite'
    'perl-graphics-gnuplotif'
    'perl-term-sk'
    'perl-term-twiddle'
    'perl-wx'
)
provides=()
conflicts=()
replaces=()
backup=()
options=()
source=(
    "${pkgname}-${pkgver}.tar.gz::https://github.com/bruceravel/${pkgname}/archive/${pkgver}.tar.gz"
)
sha256sums=('f85262921e9eb646c7989ee73da760edc5fa27d5b97d1a4b3e597cd750920d8a')

prepare() {

    cd ${pkgname}-${pkgver}
    rm t/t
    export PGPLOT_DIR='/usr/lib'

}

build() {
  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""                 \
      PERL_AUTOINSTALL=--skipdeps                            \
      PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'"     \
      PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
      MODULEBUILDRC=/dev/null

    cd ${pkgname}-${pkgver}
    if [ -z "$DISPLAY" ]; then
      warning "Empty \$DISPLAY - falling back to xvfb-run (xorg-server-xvfb)"
      xvfb-run -a -s "+extension GLX -screen 0 1280x1024x24" perl ./Build.PL
      xvfb-run -a -s "+extension GLX -screen 0 1280x1024x24" ./Build
    else
      perl ./Build.PL
      ./Build
    fi
  )
}

check() {

    cd ${pkgname}-${pkgver}
    if [ -z "$DISPLAY" ]; then
      warning "Empty \$DISPLAY - falling back to xvfb-run (xorg-server-xvfb)"
      xvfb-run -a -s "+extension GLX -screen 0 1280x1024x24" ./Build test
    else
      ./Build test
    fi

}

package() {

    cd ${pkgname}-${pkgver}
    ./Build install

}