forked from mojanjz/DICOMautomaton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
115 lines (103 loc) · 2.43 KB
/
PKGBUILD
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
# Maintainer: Hal Clark <gmail.com[at]hdeanclark>
pkgname=dicomautomaton
pkgver=20190713_202000
pkgver() {
date +%Y%m%d_%H%M%S
}
pkgrel=1
pkgdesc="Various tools for medical physics applications."
url="http://www.halclark.ca"
arch=('x86_64' 'i686' 'armv7h')
license=('unknown')
depends=(
'gcc-libs'
'gnu-free-fonts'
'zenity'
'sfml'
'sdl2'
'glew'
'jansson'
'libpqxx'
'postgresql'
'nlopt'
'gsl'
'boost-libs'
'zlib'
'cgal>=4.8'
'wt'
'explicator'
'ygor'
)
optdepends=(
'zenity'
'dialog'
'gnuplot'
'patchelf'
'bash-completion'
'ttf-computer-modern-fonts'
)
makedepends=(
'cmake'
'asio'
'ygorclustering'
)
# conflicts=()
# replaces=()
# backup=()
# install='foo.install'
# source=("http://www.server.tld/${pkgname}-${pkgver}.tar.gz"
# "foo.desktop")
# md5sums=(''
# '')
#options=(!strip staticlibs)
#PKGEXT='.pkg.tar' # Disable compression.
options=(strip staticlibs)
build() {
# ---------------- Configure -------------------
# Try use environment variable, but fallback to standard.
install_prefix=${INSTALL_PREFIX:-/usr}
# Default build with default compiler flags.
cmake \
-DCMAKE_INSTALL_PREFIX="${install_prefix}" \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DCMAKE_BUILD_TYPE=Release \
-DMEMORY_CONSTRAINED_BUILD=OFF \
-DWITH_ASAN=OFF \
-DWITH_TSAN=OFF \
-DWITH_MSAN=OFF \
-DWITH_EIGEN=ON \
-DWITH_CGAL=ON \
-DWITH_NLOPT=ON \
-DWITH_SFML=ON \
-DWITH_WT=ON \
-DWITH_GNU_GSL=ON \
-DWITH_POSTGRES=ON \
-DWITH_JANSSON=ON \
../
## Debug build with default compiler flags.
#cmake \
# -DMEMORY_CONSTRAINED_BUILD=OFF \
# -DCMAKE_INSTALL_PREFIX=/usr \
# -DCMAKE_BUILD_TYPE=Debug \
# ../
## Custom build which can make use of custom compiler flags.
## (Note that the CMake build type must NOT be specified, or these flags will be overridden.)
#cmake \
# -DMEMORY_CONSTRAINED_BUILD=OFF \
# -DCMAKE_INSTALL_PREFIX=/usr \
# -DCMAKE_CXX_FLAGS='-O2' \
# ../
# ------------------ Build ---------------------
# Scale compilation, but limit to 8 concurrent jobs to temper memory usage.
JOBS=$(nproc)
JOBS=$(( $JOBS < 8 ? $JOBS : 8 ))
make -j "$JOBS" VERBOSE=1
## Build with a single job to keep memory usage low.
#make VERBOSE=1
## Debug compiler flags without actually compiling ("dry-run").
#make -n
}
package() {
make DESTDIR="${pkgdir}" install
}
# vim:set ts=2 sw=2 et: