math/ceres-solver: upgrade to 2.2.0rc1 and unbreak

Remove the patches. All tests pass.

PR:		274200
Approved by:	yuri (maintainer)
This commit is contained in:
Thierry Thomas 2023-10-01 20:08:29 +02:00
parent c47c706fb4
commit b736288ff0
5 changed files with 7 additions and 77 deletions

View file

@ -1,6 +1,5 @@
PORTNAME= ceres-solver
DISTVERSION= 2.1.0
PORTREVISION= 6
DISTVERSION= 2.2.0rc1
CATEGORIES= math
MAINTAINER= yuri@FreeBSD.org
@ -10,8 +9,6 @@ WWW= http://ceres-solver.org/
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
BROKEN= configure error: Target "ceres" links to: CXSparse::CXSparse but the target was not found
BUILD_DEPENDS= glog>=0.5.0:devel/glog
LIB_DEPENDS= libglog.so:devel/glog
RUN_DEPENDS:= ${BUILD_DEPENDS:Meigen*}

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1657609627
SHA256 (ceres-solver-ceres-solver-2.1.0_GH0.tar.gz) = ccbd716a93f65d4cb017e3090ae78809e02f5426dce16d0ee2b4f8a4ba2411a8
SIZE (ceres-solver-ceres-solver-2.1.0_GH0.tar.gz) = 3775210
TIMESTAMP = 1696182357
SHA256 (ceres-solver-ceres-solver-2.2.0rc1_GH0.tar.gz) = 723077a8451c2592299dd8a627b770ffec02c179881badd05026df9f822b7f15
SIZE (ceres-solver-ceres-solver-2.2.0rc1_GH0.tar.gz) = 3818421

View file

@ -1,52 +0,0 @@
--- cmake/FindSuiteSparse.cmake.orig 2022-03-28 14:02:35 UTC
+++ cmake/FindSuiteSparse.cmake
@@ -394,26 +394,36 @@ if (TARGET SuiteSparse::Config)
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)

View file

@ -1,14 +0,0 @@
- backport of the commit Enable compatibility with SuiteSparse 7.2.0
- see https://github.com/ceres-solver/ceres-solver/commit/9cca671273c2f205ca7350422f48b7b119c5dd78
--- internal/ceres/covariance_impl.cc.orig 2023-09-20 07:40:12 UTC
+++ internal/ceres/covariance_impl.cc
@@ -630,7 +630,7 @@ bool CovarianceImpl::ComputeCovarianceValuesUsingSuite
// separately.
const SuiteSparse_long rank = SuiteSparseQR<double>(SPQR_ORDERING_BESTAMD,
SPQR_DEFAULT_TOL,
- cholmod_jacobian.ncol,
+ static_cast<int64_t>(cholmod_jacobian.ncol),
&cholmod_jacobian,
&R,
&permutation,

View file

@ -1,10 +1,10 @@
include/ceres/autodiff_cost_function.h
include/ceres/autodiff_first_order_function.h
include/ceres/autodiff_local_parameterization.h
include/ceres/autodiff_manifold.h
include/ceres/c_api.h
include/ceres/ceres.h
include/ceres/conditioned_cost_function.h
include/ceres/constants.h
include/ceres/context.h
include/ceres/cost_function.h
include/ceres/cost_function_to_functor.h
@ -25,6 +25,7 @@ include/ceres/internal/autodiff.h
include/ceres/internal/config.h
include/ceres/internal/disable_warnings.h
include/ceres/internal/eigen.h
include/ceres/internal/euler_angles.h
include/ceres/internal/export.h
include/ceres/internal/fixed_array.h
include/ceres/internal/householder_vector.h
@ -42,7 +43,6 @@ include/ceres/iteration_callback.h
include/ceres/jet.h
include/ceres/jet_fwd.h
include/ceres/line_manifold.h
include/ceres/local_parameterization.h
include/ceres/loss_function.h
include/ceres/manifold.h
include/ceres/manifold_test_utils.h
@ -66,9 +66,8 @@ lib/cmake/Ceres/CeresConfig.cmake
lib/cmake/Ceres/CeresConfigVersion.cmake
lib/cmake/Ceres/CeresTargets-%%CMAKE_BUILD_TYPE%%.cmake
lib/cmake/Ceres/CeresTargets.cmake
lib/cmake/Ceres/FindCXSparse.cmake
lib/cmake/Ceres/FindMETIS.cmake
lib/cmake/Ceres/FindSuiteSparse.cmake
lib/libceres.so
lib/libceres.so.3
lib/libceres.so.4
lib/libceres.so.%%VERSION%%