blob: 9c50130f1bed2d776aed3be96455b0260fb3463a (
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
|
# Contributor: dtag <dtag00@gmail.com>
pkgname=ceres-solver-git
pkgver=r1467.db1f5b57
pkgrel=1
pkgdesc="Solver for nonlinear least squares problems"
arch=('i686' 'x86_64')
url="http://ceres-solver.org/"
license=('LGPL')
makedepends=('cmake')
depends=('google-glog>=0.3.4' 'eigen>=3.3.4'
'suitesparse>=4.4.5')
optdepends=('openmp')
source=("${pkgname}::git+https://github.com/ceres-solver/ceres-solver.git")
sha256sums=('SKIP')
provides=("ceres-solver=${pkgver}")
conflicts=('ceres-solver')
options=('staticlibs')
_cmakeopts=('-D CMAKE_BUILD_TYPE=Release'
'-D CMAKE_INSTALL_PREFIX=/usr'
'-D EIGENSPARSE=ON'
'-D BUILD_SHARED_LIBS=ON'
'-D BUILD_TESTING=OFF'
'-D BUILD_EXAMPLES=OFF')
pkgver() {
cd "$srcdir/$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
cd "$srcdir/$pkgname"
mkdir -p ./build
cd ./build
cmake ${_cmakeopts[@]} ../ -DLIB_SUFFIX=""
make
}
package ()
{
cd "$srcdir/$pkgname/build/"
make DESTDIR="$pkgdir" install
install -Dm644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|