summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 00bb58dcb2a73d9f45700c4842d5ec82ca0d4f99 (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
# Maintainer: Bastian Löher <b.loeher@gsi.de>
pkgname=opengate-git
pkgver=v9.3.59.ge73015dd
pkgrel=1
pkgdesc="Open GATE - numerical simulations in medical imaging and radiotherapy"
arch=('x86_64')
url="https://github.com/OpenGATE/Gate"
license=('LGPL3')
groups=()
makedepends=('cmake' 'gcc')
depends=('root' 'geant4' 'cern-vdt')
provides=('opengate')
conflicts=('opengate')
replaces=()
backup=()
options=('!emptydirs' 'staticlibs' 'libtool' '!strip')
install=
changelog=
source=(git+https://github.com/OpenGATE/Gate.git#commit=e73015dd67beae9921e931687e0bf9f4e192746b)
noextract=()
md5sums=('SKIP')

# Do not compress the package for installation
# PKGEXT='.pkg.tar'
# Compress using lightweight gzip
PKGEXT='.pkg.tar.gz'

pkgver() {
    cd Gate
    git describe --tags --long | sed 's|Release-||;s|[_-]|.|g'
}

prepare() {
	# Execute cmake
	echo "You need to build geant4 with option"
	echo " -DGEANT4_BUILD_MULTITHREADED=OFF"
	echo "to properly use Gate. It does not yet"
	echo "work with Geant4 in multithreaded mode."
	cd ${srcdir}

	[ -d build ] || mkdir build
	cd build
	cmake \
		-DGATE_USE_ECAT7=OFF \
		-DGATE_USE_GPU=OFF \
		-DGATE_USE_ITK=OFF \
		-DGATE_USE_LMF=OFF \
		-DGATE_USE_OPTICAL=ON \
		-DGATE_USE_RTK=OFF \
		-DGATE_USE_STDC11=ON \
		-DGATE_USE_DAVIS=OFF \
		-DGEANT4_USE_SYSTEM_CLHEP=OFF \
		../Gate
:
}

build() {
	cd ${srcdir}/build
	make -j$(nproc)
}

package() {
	cd ${srcdir}/build
	make DESTDIR="${pkgdir}/" install

	echo "Optional dependencies: lmf_v3.0 and ecat7"
	echo "Done"
}