summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 96871f1772cb61a320fb320e2cbc5016853425b9 (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
69
70
# Maintainer: Kyle Brooks <brookskd@gmail.com>
# Submaintainer : bartus <arch-user-repoᘓbartus.33mail.com>
# shellcheck disable=SC2034,SC2164

pkgname=openmvg-git
_gitname='openMVG'
_fragment="#branch=develop"
pkgver=2.0.r110.g4e78ed73
pkgrel=1
pkgdesc='open Multiple View Geometry library. Basis for 3D computer vision and Structure from Motion.'
arch=('i686' 'x86_64')
url='http://imagine.enpc.fr/~moulonp/openMVG/'
license=('MPL')
options=('!emptydirs')
depends=(qt5-{base,svg} 'cereal' 'glfw' 'lz4' 'libpng' 'libjpeg' 'libtiff' 'libxcursor' 'libxinerama' 'libxrandr' 'libxxf86vm' 'libxi' 'graphviz' 'libgl' 'ceres-solver' 'gflags' 'flann' 'coin-or-coinutils' 'coin-or-clp' 'coin-or-osi' 'coin-or-lemon')
makedepends=('git' 'cmake' 'doxygen' 'eigen')
source=("git+https://github.com/${_gitname}/${_gitname}.git${_fragment}"
       )
sha256sums=('SKIP'
            'SKIP'
            'SKIP'
            'SKIP')
b2sums=('SKIP'
        'SKIP'
        'SKIP'
        'SKIP')

pkgver() {
  git -C "${srcdir}/${_gitname}" describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  prepare_submodule
}

build() {
  cmake -S "${srcdir}/${_gitname}"/src -B build \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE=RELEASE \
        -DOpenMVG_BUILD_SHARED=ON \
        -DOpenMVG_BUILD_EXAMPLES=ON \
        -DOpenMVG_BUILD_OPENGL_EXAMPLES=ON \
        -DOpenMVG_USE_OPENMP=ON \
        -DCOINUTILS_INCLUDE_DIR_HINTS=/usr/include/coin \
        -DCLP_INCLUDE_DIR_HINTS=/usr/include/coin \
        -DOSI_INCLUDE_DIR_HINTS=/usr/include/coin \
        -DLEMON_INCLUDE_DIR_HINTS=/usr/include/lemon \
        -DCERES_DIR_HINTS=/usr/include/ceres
  make -C build
}

package() {
  make -C build DESTDIR="$pkgdir" install
}

# Generated with git_submodule_PKGBUILD_conf.sh ( https://gist.github.com/bartoszek/41a3bfb707f1b258de061f75b109042b )
# Call prepare_submodule in prepare() function

prepare_submodule() {
  git -C "$srcdir/openMVG" config submodule.src/dependencies/glfw.url "$srcdir/glfw"
  git -C "$srcdir/openMVG" config submodule.src/dependencies/osi_clp.url "$srcdir/osi_clp"
  git -C "$srcdir/openMVG" config submodule.src/dependencies/cereal.url "$srcdir/cereal"
  git -C "$srcdir/openMVG" -c protocol.file.allow=always submodule update --init
}
source+=(
  "glfw::git+https://github.com/elmindreda/glfw"
  "osi_clp::git+https://github.com/openMVG-thirdparty/osi_clp"
  "cereal::git+https://github.com/openMVG-thirdparty/cereal"
)
# vim:set ts=2 sw=2 et: