blob: 542734f2add10c3f75cdb500ccb682416645571c (
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
|
# Maintainer: Oliver Mader <b52@reaktor42.de>
pkgname='opengm-git'
pkgver=r2125.31e01c6
pkgrel=2
pkgdesc="A C++ Library for Discrete Graphical Models"
arch=('i686' 'x86_64')
url="https://github.com/opengm/opengm"
license=('MIT')
depends=()
makedepends=('git' 'cmake' 'boost' 'python-numpy')
optdepends=('python-numpy: Python support' 'python-h5py: Python support'
'boost-libs: Python support')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/bluescarni/opengm.git#branch=python3')
md5sums=('SKIP')
pkgver() {
cd "$srcdir/${pkgname%-git}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "$srcdir/${pkgname%-git}"
sed -i 's/find_package(Boost COMPONENTS python REQUIRED)/find_package(Boost COMPONENTS python3 REQUIRED)/' src/interfaces/python/opengm/CMakeLists.txt
sed -i 's/Boost_PYTHON_LIBRARIES/Boost_PYTHON3_LIBRARIES/g' src/interfaces/python/opengm/*/CMakeLists.txt
}
build() {
cd "$srcdir/${pkgname%-git}"
mkdir -p build/ && cd build/
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_TUTORIALS=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_TESTING=OFF \
-DBUILD_PYTHON_WRAPPER=ON \
-DWITH_BOOST=ON \
-DWITH_HDF5=ON \
-DWITH_OPENMP=ON \
..
make
}
package() {
cd "$srcdir/${pkgname%-git}/build"
make DESTDIR="$pkgdir/" install
rm -rf "$pkgdir/"{hdf5,inference,opengmcore}
}
|