blob: d42832c44bb6464b02f83d6398a98290c35664da (
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
|
# Maintainer of this PKBGUILD file: Martino Pilia <martino.pilia@gmail.com>
_name=pyca
pkgname=python2-pyca-git
pkgver=0.01.r434.gf31ab43
pkgrel=9
pkgdesc="Python for Computational Anatomy"
arch=('x86_64')
url="http://bitbucket.org/scicompanat/pyca"
license=('BSD')
depends=('python2-numpy')
makedepends=('cmake' 'git' 'python2' 'swig>=3.0.10' 'fftw' 'boost')
optdepends=('insight-toolkit: ITK file support'
'cuda: for GPU computing'
'python2-matplotlib: for full functionality in PyCA.Display and reading/writing png images'
'python2-scipy: some additional image/linear algebra functionality')
source=('git+https://bitbucket.org/scicompanat/pyca.git')
md5sums=('SKIP')
pkgver() {
cd "$srcdir/$_name"
git describe --long --tags | \
sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "$srcdir/$_name"
mkdir build || :
cd build
# temporary bugfix, a PR has already been submitted upstream
sed -i 's/<< std::cout <</<</g' "$srcdir/$_name/Code/Cxx/src/alg/MultiscaleManager.cxx"
cmake \
-DCMAKE_INSTALL_PREFIX:PATH="/usr" \
-DCMAKE_BUILD_TYPE=Release \
-DPYTHON_EXECUTABLE=/usr/bin/python2 \
-DPYTHON_INCLUDE_DIR=/usr/include/python2.7 \
-DBUILD_SHARED_LIBS=ON \
-DUSE_ITK=ON \
-DUSE_CUDA=OFF \
-DPYTHON_LIBRARY=/usr/lib/libpython2.7.so \
-DPYTHON_INSTALL_DIR=/usr/lib/python2.7/site-packages \
-DCUDA_NVCC_FLAGS_RELEASE=--pre-include\ $srcdir/$_name/preinc.h \
..
# Do not include Python 3 stuff
for f in `grep -nr . | grep 'python3\.6' | cut -f1 -d':'`
do
sed -i 's/[^ ;]\+python3\.[^ ;]\+//g' $f
done
}
build() {
cd "$srcdir/$_name/build"
make
}
package() {
cd "$srcdir/$_name/build"
make install DESTDIR="$pkgdir"
install -D -m644 $srcdir/$_name/Copyright.txt \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|