summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO11
-rw-r--r--0001-fix-for-suitesparse-6.0.0.patch54
-rw-r--r--PKGBUILD24
3 files changed, 76 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 16448387a2cb..23cb328dfb78 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,20 @@
pkgbase = ceres-solver
pkgdesc = Solver for nonlinear least squares problems
- pkgver = 1.14.0
+ pkgver = 2.1.0
pkgrel = 2
url = http://ceres-solver.org/
arch = i686
arch = x86_64
license = LGPL
makedepends = cmake
- depends = google-glog>=0.3.4
+ depends = google-glog>=0.3.5
depends = eigen>=3.3.0
depends = suitesparse>=4.4.5
optdepends = openmp
options = staticlibs
- source = http://ceres-solver.org/ceres-solver-1.14.0.tar.gz
- sha256sums = 4744005fc3b902fed886ea418df70690caa8e2ff6b5a90f3dd88a3d291ef8e8e
+ source = http://ceres-solver.org/ceres-solver-2.1.0.tar.gz
+ source = 0001-fix-for-suitesparse-6.0.0.patch
+ sha256sums = f7d74eecde0aed75bfc51ec48c91d01fe16a6bf16bce1987a7073286701e2fc6
+ sha256sums = 0eb45170ec3e87839a688b78ce2d2cffe562a7aa3d10619043729252d3a56d79
pkgname = ceres-solver
-
diff --git a/0001-fix-for-suitesparse-6.0.0.patch b/0001-fix-for-suitesparse-6.0.0.patch
new file mode 100644
index 000000000000..76ce6ed1537e
--- /dev/null
+++ b/0001-fix-for-suitesparse-6.0.0.patch
@@ -0,0 +1,54 @@
+diff --git a/cmake/FindSuiteSparse.cmake b/cmake/FindSuiteSparse.cmake
+index 4e05930..0e3a10b 100644
+--- a/cmake/FindSuiteSparse.cmake
++++ b/cmake/FindSuiteSparse.cmake
+@@ -404,26 +404,36 @@
+ else (NOT EXISTS ${SuiteSparse_VERSION_FILE})
+ file(READ ${SuiteSparse_VERSION_FILE} Config_CONTENTS)
+
+- string(REGEX MATCH "#define SUITESPARSE_MAIN_VERSION [0-9]+"
+- SuiteSparse_VERSION_MAJOR "${Config_CONTENTS}")
+- string(REGEX REPLACE "#define SUITESPARSE_MAIN_VERSION ([0-9]+)" "\\1"
+- SuiteSparse_VERSION_MAJOR "${SuiteSparse_VERSION_MAJOR}")
++ string(REGEX MATCH "#define SUITESPARSE_MAIN_VERSION[ \t]+([0-9]+)"
++ SuiteSparse_VERSION_LINE "${Config_CONTENTS}")
++ set (SuiteSparse_VERSION_MAJOR ${CMAKE_MATCH_1})
+
+- string(REGEX MATCH "#define SUITESPARSE_SUB_VERSION [0-9]+"
+- SuiteSparse_VERSION_MINOR "${Config_CONTENTS}")
+- string(REGEX REPLACE "#define SUITESPARSE_SUB_VERSION ([0-9]+)" "\\1"
+- SuiteSparse_VERSION_MINOR "${SuiteSparse_VERSION_MINOR}")
++ string(REGEX MATCH "#define SUITESPARSE_SUB_VERSION[ \t]+([0-9]+)"
++ SuiteSparse_VERSION_LINE "${Config_CONTENTS}")
++ set (SuiteSparse_VERSION_MINOR ${CMAKE_MATCH_1})
+
+- string(REGEX MATCH "#define SUITESPARSE_SUBSUB_VERSION [0-9]+"
+- SuiteSparse_VERSION_PATCH "${Config_CONTENTS}")
+- string(REGEX REPLACE "#define SUITESPARSE_SUBSUB_VERSION ([0-9]+)" "\\1"
+- SuiteSparse_VERSION_PATCH "${SuiteSparse_VERSION_PATCH}")
++ string(REGEX MATCH "#define SUITESPARSE_SUBSUB_VERSION[ \t]+([0-9]+)"
++ SuiteSparse_VERSION_LINE "${Config_CONTENTS}")
++ set (SuiteSparse_VERSION_PATCH ${CMAKE_MATCH_1})
++
++ unset (SuiteSparse_VERSION_LINE)
+
+ # This is on a single line s/t CMake does not interpret it as a list of
+ # elements and insert ';' separators which would result in 4.;2.;1 nonsense.
+ set(SuiteSparse_VERSION
+ "${SuiteSparse_VERSION_MAJOR}.${SuiteSparse_VERSION_MINOR}.${SuiteSparse_VERSION_PATCH}")
+- set(SuiteSparse_VERSION_COMPONENTS 3)
++
++ if (SuiteSparse_VERSION MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
++ set(SuiteSparse_VERSION_COMPONENTS 3)
++ else (SuiteSparse_VERSION MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
++ message (WARNING "Could not parse SuiteSparse_config.h: SuiteSparse "
++ "version will not be available")
++
++ unset (SuiteSparse_VERSION)
++ unset (SuiteSparse_VERSION_MAJOR)
++ unset (SuiteSparse_VERSION_MINOR)
++ unset (SuiteSparse_VERSION_PATCH)
++ endif (SuiteSparse_VERSION MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
+ endif (NOT EXISTS ${SuiteSparse_VERSION_FILE})
+ endif (TARGET SuiteSparse::Config)
+
diff --git a/PKGBUILD b/PKGBUILD
index cde68dce7996..54548957159f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,32 +1,36 @@
# Contributor: dtag <dtag00@gmail.com>
pkgname=ceres-solver
-pkgver=1.14.0
+pkgver=2.1.0
pkgrel=2
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.0'
+depends=('google-glog>=0.3.5' 'eigen>=3.3.0'
'suitesparse>=4.4.5')
optdepends=('openmp')
-source=("http://ceres-solver.org/ceres-solver-1.14.0.tar.gz")
-sha256sums=("4744005fc3b902fed886ea418df70690caa8e2ff6b5a90f3dd88a3d291ef8e8e")
+source=("http://ceres-solver.org/ceres-solver-2.1.0.tar.gz" "0001-fix-for-suitesparse-6.0.0.patch")
+sha256sums=('f7d74eecde0aed75bfc51ec48c91d01fe16a6bf16bce1987a7073286701e2fc6' '0eb45170ec3e87839a688b78ce2d2cffe562a7aa3d10619043729252d3a56d79')
options=('staticlibs')
_cmakeopts=('-D CMAKE_BUILD_TYPE=Release'
'-D CMAKE_INSTALL_PREFIX=/usr'
'-D EIGENSPARSE=ON'
- '-D CXX11=ON'
- '-D BUILD_SHARED_LIBS=ON')
+ '-D BUILD_SHARED_LIBS=ON'
+ '-D BUILD_TESTING=OFF'
+ '-D BUILD_EXAMPLES=OFF'
+ '-D BUILD_BENCHMARKS=OFF')
build() {
cd $srcdir/$pkgname-$pkgver
-
+ for p in "$srcdir"/*.patch; do
+ patch -p1 < "$p"
+ done
mkdir -p ./build
cd ./build
- cmake ${_cmakeopts[@]} ../ -DLIB_SUFFIX=""
+ cmake ${_cmakeopts[@]} ../
make
}
@@ -35,4 +39,8 @@ package ()
cd $srcdir/$pkgname-$pkgver/build/
make DESTDIR=$pkgdir install
install -Dm644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ # Pin Eigen version preventing version mismatch cmake config after Eigen update.
+ index=$(declare -p depends | sed -n "s,.*\[\([^]]*\)\]=\"eigen.*\".*,\1,p")
+ depends[$index]=$(pacman -Sp --print-format "%n=%v" eigen|cut -d- -f1)
}