Date: Tuesday, November 22, 2022 @ 15:52:08
  Author: svenstaro
Revision: 1351801

archrelease: copy trunk to community-x86_64

Added:
  ceres-solver/repos/community-x86_64/
  ceres-solver/repos/community-x86_64/0001-fix-for-suitesparse-6.0.0.patch
    (from rev 1351800, ceres-solver/trunk/0001-fix-for-suitesparse-6.0.0.patch)
  ceres-solver/repos/community-x86_64/PKGBUILD
    (from rev 1351800, ceres-solver/trunk/PKGBUILD)

--------------------------------------+
 0001-fix-for-suitesparse-6.0.0.patch |   54 +++++++++++++++++++++++++++++++++
 PKGBUILD                             |   44 ++++++++++++++++++++++++++
 2 files changed, 98 insertions(+)

Copied: 
ceres-solver/repos/community-x86_64/0001-fix-for-suitesparse-6.0.0.patch (from 
rev 1351800, ceres-solver/trunk/0001-fix-for-suitesparse-6.0.0.patch)
===================================================================
--- community-x86_64/0001-fix-for-suitesparse-6.0.0.patch                       
        (rev 0)
+++ community-x86_64/0001-fix-for-suitesparse-6.0.0.patch       2022-11-22 
15:52:08 UTC (rev 1351801)
@@ -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)
+ 

Copied: ceres-solver/repos/community-x86_64/PKGBUILD (from rev 1351800, 
ceres-solver/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD                           (rev 0)
+++ community-x86_64/PKGBUILD   2022-11-22 15:52:08 UTC (rev 1351801)
@@ -0,0 +1,44 @@
+# Maintainer: Sven-Hendrik Haase <[email protected]>
+# Contributor: dtag <[email protected]>
+pkgname=ceres-solver
+pkgver=2.1.0
+pkgrel=3
+pkgdesc="Solver for nonlinear least squares problems"
+arch=('x86_64')
+url="http://ceres-solver.org/";
+license=('LGPL')
+depends=('google-glog' 'eigen' 'suitesparse')
+makedepends=('cmake' 'ninja')
+optdepends=('openmp')
+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')
+
+prepare() {
+  cd $pkgname-$pkgver
+  patch -p1 -i "$srcdir"/0001-fix-for-suitesparse-6.0.0.patch
+}
+
+build() {
+  cd $pkgname-$pkgver
+  cmake \
+      -Bbuild \
+      -GNinja \
+      -DCMAKE_BUILD_TYPE=None \
+      -DCMAKE_INSTALL_PREFIX=/usr \
+      -DEIGENSPARSE=ON \
+      -DBUILD_SHARED_LIBS=ON \
+      -DBUILD_TESTING=OFF \
+      -DBUILD_EXAMPLES=OFF \
+      -DBUILD_BENCHMARKS=OFF
+
+  ninja -C build
+}
+
+package() {
+  cd $pkgname-$pkgver
+  DESTDIR=$pkgdir ninja -C build install
+  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}

Reply via email to