summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f40c2170d4478057695707cb08af30dc2d587dea (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
# Maintainer : bartus <arch-user-repoᘓbartus.33mail.com>
# shellcheck disable=SC2034
# vim:set sw=2 ts=2 et:

_name=UncertaintyTE
pkgname=uncertainty-framework
pkgver=1.2.0
pkgrel=1
pkgdesc="Uncertainty estimation framework for a surface from motion dataset"
arch=('i686' 'x86_64')
url="http://alicevision.github.io/"
license=('MPL2')
groups=()
conflicts=()
provides=()
depends=(magma ceres-solver)
makedepends=(boost cmake git gflags cuda)
source=("${_name}::git+https://github.com/alicevision/${_name}.git"
        "ctest.patch")
sha256sums=('SKIP'
            'abf50924a78ec9628212c5b7086592d302155cf50dcc6f4c49a92d57b9a3b020')

_CMAKE_FLAGS=( -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release )
_CMAKE_FLAGS+=( -DMAGMA_ROOT=/opt/magma )
_CMAKE_FLAGS+=( -DUNC_ALICEVISION_SUPPORT=ON -DUNC_BUILD_TESTS=ON -DUNC_MKL_SUPPORT=ON )
# test if we can build matlab module
pacman -Qq matlab && _CMAKE_FLAGS+=( -DUNC_MATLAB_SUPPORT=ON -DUNC_BUILD_MEX=ON )

prepare() {
  cd ${srcdir}/${_name}
  git apply -v ${srcdir}/*.patch
}

pkgver() {
  grep -oP "VERSION \K.*(?=\))" <(pcregrep -Mo -e '(?s)^PROJECT.*?\)' ${srcdir}/${_name}/CMakeLists.txt)
}
  
build() {
  cd ${srcdir}
  mkdir -p build && cd build
  cmake ${_CMAKE_FLAGS[*]} ${srcdir}/${_name}
  make all
}


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

check() {
  cd ${srcdir}/build/src
  ctest
}