diff --git a/math/ceres-solver/Makefile b/math/ceres-solver/Makefile index 7d60a7364628..a80a57b23d0b 100644 --- a/math/ceres-solver/Makefile +++ b/math/ceres-solver/Makefile @@ -1,116 +1,113 @@ PORTNAME= ceres-solver -DISTVERSION= 2.1.0 -PORTREVISION= 6 +DISTVERSION= 2.2.0rc1 CATEGORIES= math MAINTAINER= yuri@FreeBSD.org COMMENT= Nonlinear least squares minimizer 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*} USES= cmake:testing compiler:${OPENMP}c++11-lib eigen:3 localbase shebangfix USE_GITHUB= yes USE_LDCONFIG= yes SHEBANG_FILES= examples/slam/pose_graph_*/plot_results.py \ scripts/make_docs.py CMAKE_ON= BUILD_SHARED_LIBS CMAKE_OFF= BUILD_BENCHMARKS BUILD_TESTING LDFLAGS+= -Wl,--as-needed # -lccolamd -lcholmod -lrt from suitesparse PLIST_SUB= VERSION=${DISTVERSION:C/rc.*//} EXAMPLESDIR= ${PREFIX}/share/examples/${PORTNAME:S/-solver//} DOCSDIR= ${PREFIX}/share/doc/Ceres PORTDOCS= * PORTEXAMPLES= * OPTIONS_DEFINE= CUSTOM_BLAS EXAMPLES DOCS GFLAGS LAPACK OPENMP SCHUR OPTIONS_DEFAULT= CUSTOM_BLAS CXSPARSE GFLAGS OPENBLAS OPENMP SCHUR SUITESPARSE OPTIONS_RADIO= LAPACK THREADS OPTIONS_RADIO_LAPACK= ATLAS GOTOBLAS NETLIB OPENBLAS OPTIONS_GROUP= SPARSE OPTIONS_GROUP_SPARSE= CXSPARSE EIGENSPARSE SUITESPARSE CUSTOM_BLAS_DESC= Handcoded BLAS routines instead of Eigen CUSTOM_BLAS_CMAKE_BOOL= CUSTOM_BLAS DOCS_BUILD_DEPENDS= sphinx-build:textproc/py-sphinx \ ${PYTHON_PKGNAMEPREFIX}sphinx_rtd_theme>0:textproc/py-sphinx_rtd_theme@${PY_FLAVOR} DOCS_USES= python:build DOCS_CMAKE_BOOL= BUILD_DOCUMENTATION EXAMPLES_CMAKE_BOOL= BUILD_EXAMPLES EXAMPLES_IMPLIES= GFLAGS GFLAGS_DESC= Google Flags support GFLAGS_LIB_DEPENDS= libgflags.so:devel/gflags GFLAGS_CMAKE_BOOL= GFLAGS OPENMP_CMAKE_ON= -DCERES_THREADING_MODEL:STRING="OPENMP" .if !exists(/usr/include/omp.h) # XXX ports/199603: LLVM openmp in base doesn't support armv6, armv7 yet OPENMP_VARS= OPENMP=gcc- .endif SCHUR_DESC= Fixed-size schur specializations SCHUR_CMAKE_BOOL= SCHUR_SPECIALIZATIONS # XXX Unbundle googletest/googlemock LAPACK_DESC= Linear Algebra PACKage LAPACK_CMAKE_BOOL= LAPACK ATLAS_USES= blaslapack:atlas ATLAS_CMAKE_ON= -DBLA_VENDOR:STRING="ATLAS" \ -DBLAS_LIBRARIES:FILEPATH="${LOCALBASE}/lib/libcblas.so" \ -DLAPACK_LIBRARIES:FILEPATH="${LOCALBASE}/lib/libalapack.so" ATLAS_IMPLIES= LAPACK GOTOBLAS_DESC= Goto blas implementation GOTOBLAS_USES= blaslapack:gotoblas GOTOBLAS_CMAKE_ON= -DBLA_VENDOR:STRING="Goto" GOTOBLAS_IMPLIES= LAPACK NETLIB_USES= blaslapack:netlib NETLIB_CMAKE_ON= -DBLA_VENDOR:STRING="Generic" NETLIB_IMPLIES= LAPACK OPENBLAS_USES= blaslapack:openblas OPENBLAS_CMAKE_ON= -DBLA_VENDOR:STRING="OpenBLAS" OPENBLAS_IMPLIES= LAPACK SPARSE_DESC= Sparse linear algebra library CXSPARSE_DESC= CXSparse support CXSPARSE_LIB_DEPENDS= libcxsparse.so:math/suitesparse-cxsparse CXSPARSE_CMAKE_ON= -DCXSPARSE_INCLUDE_DIR:PATH="${LOCALBASE}/include/suitesparse" CXSPARSE_CMAKE_BOOL= CXSPARSE EIGENSPARSE_DESC= Simplicial Cholesky factorization in Eigen EIGENSPARSE_CMAKE_BOOL= EIGENSPARSE EIGENSPARSE_VARS= LICENSE+=LGPL21+ LICENSE_COMB=multi \ LICENSE_FILE_BSD3CLAUSE="${LICENSE_FILE}" SUITESPARSE_DESC= SuiteSparse support SUITESPARSE_LIB_DEPENDS=libspqr.so:math/suitesparse-spqr \ libcholmod.so:math/suitesparse-cholmod SUITESPARSE_CMAKE_BOOL= SUITESPARSE post-patch-DOCS-on: @${REINPLACE_CMD} -e 's,python,${PYTHON_CMD:T},' \ ${WRKSRC}/docs/source/CMakeLists.txt pre-install-TEST-on: do-test post-install-EXAMPLES-on: # Copy examples (stripped), their source and sample data but not tests programs (cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}) (cd ${WRKSRC} && ${COPYTREE_SHARE} data ${STAGEDIR}${EXAMPLESDIR}) (cd ${BUILD_WRKSRC} && ${COPYTREE_SHARE} bin ${STAGEDIR}${EXAMPLESDIR}) @${RM} -r ${STAGEDIR}${EXAMPLESDIR}/bin/*_test -@${STRIP_CMD} ${STAGEDIR}${EXAMPLESDIR}/bin/* # may fail for non-root .include diff --git a/math/ceres-solver/distinfo b/math/ceres-solver/distinfo index 8a897a499b1d..ed8ebabbcb0e 100644 --- a/math/ceres-solver/distinfo +++ b/math/ceres-solver/distinfo @@ -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 diff --git a/math/ceres-solver/files/patch-cmake_FindSuiteSparse.cmake b/math/ceres-solver/files/patch-cmake_FindSuiteSparse.cmake deleted file mode 100644 index a5a9781b6f6b..000000000000 --- a/math/ceres-solver/files/patch-cmake_FindSuiteSparse.cmake +++ /dev/null @@ -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) - diff --git a/math/ceres-solver/files/patch-internal_ceres_covariance__impl.cc b/math/ceres-solver/files/patch-internal_ceres_covariance__impl.cc deleted file mode 100644 index 88872405f429..000000000000 --- a/math/ceres-solver/files/patch-internal_ceres_covariance__impl.cc +++ /dev/null @@ -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(SPQR_ORDERING_BESTAMD, - SPQR_DEFAULT_TOL, -- cholmod_jacobian.ncol, -+ static_cast(cholmod_jacobian.ncol), - &cholmod_jacobian, - &R, - &permutation, diff --git a/math/ceres-solver/pkg-plist b/math/ceres-solver/pkg-plist index 5e0b0b0022ea..43d0db20054d 100644 --- a/math/ceres-solver/pkg-plist +++ b/math/ceres-solver/pkg-plist @@ -1,74 +1,73 @@ 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 include/ceres/covariance.h include/ceres/crs_matrix.h include/ceres/cubic_interpolation.h include/ceres/dynamic_autodiff_cost_function.h include/ceres/dynamic_cost_function.h include/ceres/dynamic_cost_function_to_functor.h include/ceres/dynamic_numeric_diff_cost_function.h include/ceres/evaluation_callback.h include/ceres/first_order_function.h include/ceres/gradient_checker.h include/ceres/gradient_problem.h include/ceres/gradient_problem_solver.h include/ceres/internal/array_selector.h 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 include/ceres/internal/integer_sequence_algorithm.h include/ceres/internal/jet_traits.h include/ceres/internal/line_parameterization.h include/ceres/internal/memory.h include/ceres/internal/numeric_diff.h include/ceres/internal/parameter_dims.h include/ceres/internal/port.h include/ceres/internal/reenable_warnings.h include/ceres/internal/sphere_manifold_functions.h include/ceres/internal/variadic_evaluate.h 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 include/ceres/normal_prior.h include/ceres/numeric_diff_cost_function.h include/ceres/numeric_diff_first_order_function.h include/ceres/numeric_diff_options.h include/ceres/ordered_groups.h include/ceres/problem.h include/ceres/product_manifold.h include/ceres/rotation.h include/ceres/sized_cost_function.h include/ceres/solver.h include/ceres/sphere_manifold.h include/ceres/tiny_solver.h include/ceres/tiny_solver_autodiff_function.h include/ceres/tiny_solver_cost_function_adapter.h include/ceres/types.h include/ceres/version.h 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%%