summaryrefslogtreecommitdiff
path: root/sci-libs/ceres-solver
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/ceres-solver')
-rw-r--r--sci-libs/ceres-solver/Manifest2
-rw-r--r--sci-libs/ceres-solver/ceres-solver-2.1.0.ebuild106
2 files changed, 108 insertions, 0 deletions
diff --git a/sci-libs/ceres-solver/Manifest b/sci-libs/ceres-solver/Manifest
index b5e48688c2e8..b4691cbc22b5 100644
--- a/sci-libs/ceres-solver/Manifest
+++ b/sci-libs/ceres-solver/Manifest
@@ -1,6 +1,8 @@
AUX ceres-solver-2.0.0-system-mathjax.patch 325 BLAKE2B a649088517ec1bef7d5a6144de57657daeff2b5a1a0b053c0bfa81d8af7143ad5d829571be947d8853bd6d1fe39adc63b4f14a4075004775151fa649747911c6 SHA512 e16646210fddb350f5cc43665afaa88d2ffe53c817dab778c0e2534c1a0001242865a547e8a308621a9068555e7e20a57e83b0447ff5d32688ed5fb3f5694d29
DIST ceres-solver-1.14.0.tar.gz 5450130 BLAKE2B cfcfe07cecb267528081dfc6deb5283bc5a04b79d4595e45365960895b84a6dca2a3024b046868f06709fc81e8514730cbc409ab01cb0cbee488b5bad5b9f7cc SHA512 a2af9918d2730709361ec971431a2b22e6ca3ca440081be87fa52729ec43702020b021837bfe5a42a58db1ab89ea6aada11f2d1888da66bef614ec1f27ab30c6
DIST ceres-solver-2.0.0.tar.gz 11225245 BLAKE2B 1761908747d460f6a84cb519b4bbb49fec7e1e36cc616b438c45ace57d10bd3bb4d0cb2795e07d5096e0b9453511c185ffdd3872e317aa8095daeb86933643b0 SHA512 843b19389f4d628b2b8b8538655cb330e092ffcc960c6896c6e3065b3a34e330c81e993b7abcd754e575742e2104087efde3526945c92f7df3f6b700984e49f9
+DIST ceres-solver-2.1.0.tar.gz 3802187 BLAKE2B d8ff780cf9b9de2541c15a2b95bde07a2d1c8e60bab3a8a4b13134b99da699da452467afe3310b9f70c3c2a6bd033ea3c4bd3c401153899e9c70867fae30c633 SHA512 db777c4a4b85a9972628c714413fe9ca1a92cc6c8b14d80401842a02c4d7e7df4e9d236775e231e8337e47f21e47cd82c1a0fbcfeffbd9b654e46a66262996f2
EBUILD ceres-solver-1.14.0.ebuild 2390 BLAKE2B 6aa1716982173734e1f95f2ba76b18ae27854811c35d95f8b2812fd6ff7ff1b74adb7c4f674e4834b5ee65e1a5a159d9cd656d28a9fbdda6192da84060150e8c SHA512 1e8da4d8abbfe6705841a453a9db6e5d672c40efff438afe32085b7ad43b7801970184d1869726ce9ec28b32e6c076f84a7fa622417b88bcd9f7072602bd235a
EBUILD ceres-solver-2.0.0.ebuild 2523 BLAKE2B 612e60be06848882934d58436bb24e1724da33d5ab37e8cd4a84368d7d98b5bff771118ca0074953630c48ea16614e29d712c2241d045129504b92578c45693f SHA512 78e483b58fb4c50415d493c73bfcf7f985f529be1a6af42fdff80b2f1d1d5a4d97d172486adb6200dcca5a6f2097bcf4d790e4e3b65c708689b22e9df96cf94d
+EBUILD ceres-solver-2.1.0.ebuild 2514 BLAKE2B 061072dda3c15e4805fb89894f3ba646e585c207985a2bfcc807a3bf9a981a75cc08a8b8c10e366fff8ac20f5e1b60d60b535179661c162b2c09c531c7878e79 SHA512 a2a2bd7026b2bace2841347d1aa211a2b4e56c6e9a21c85f208a9db34944d43bebeb2fa576a177f9fb26d069d4a16e19c2e0fd3f8e67a12e363cd0c58ce57286
MISC metadata.xml 1452 BLAKE2B d754f2990a415da369d9e41a0a1b6f7634b3bb51629d8169d74fd9122030b1ceebfc4a69cdc015ba7a4ef2565f6c36ec218fd5df4c5a45c25fe8802c5c17fc3c SHA512 ebe2f54e01d3a1230e2ed3ca59502571b0d596349126e9b69d06787f85465d66a989b7a430b22c62d5176bb197151e3c59c22b22fb55d87dd3daa53a6a420cbd
diff --git a/sci-libs/ceres-solver/ceres-solver-2.1.0.ebuild b/sci-libs/ceres-solver/ceres-solver-2.1.0.ebuild
new file mode 100644
index 000000000000..92fefb044a1a
--- /dev/null
+++ b/sci-libs/ceres-solver/ceres-solver-2.1.0.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+DOCS_BUILDER="sphinx"
+DOCS_DEPEND="dev-python/sphinx_rtd_theme"
+DOCS_DIR="docs/source"
+inherit cmake-multilib python-any-r1 docs toolchain-funcs
+
+DESCRIPTION="Nonlinear least-squares minimizer"
+HOMEPAGE="http://ceres-solver.org/"
+SRC_URI="http://ceres-solver.org/${P}.tar.gz"
+
+LICENSE="sparse? ( BSD ) !sparse? ( LGPL-2.1 ) cxsparse? ( BSD )"
+SLOT="0/1"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="cxsparse examples gflags lapack openmp +schur sparse test"
+
+REQUIRED_USE="test? ( gflags ) sparse? ( lapack ) abi_x86_32? ( !sparse !lapack )"
+RESTRICT="!test? ( test )"
+
+BDEPEND="${PYTHON_DEPS}
+ >=dev-cpp/eigen-3.3.4:3
+ lapack? ( virtual/pkgconfig )
+ doc? ( dev-libs/mathjax )
+"
+RDEPEND="
+ dev-cpp/glog[gflags?,${MULTILIB_USEDEP}]
+ cxsparse? ( sci-libs/cxsparse )
+ lapack? ( virtual/lapack )
+ sparse? (
+ sci-libs/amd
+ sci-libs/camd
+ sci-libs/ccolamd
+ sci-libs/cholmod[metis(+)]
+ sci-libs/colamd
+ sci-libs/spqr
+ )
+"
+DEPEND="${RDEPEND}"
+
+DOCS=( README.md VERSION )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.0.0-system-mathjax.patch"
+)
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary ]] && use openmp; then
+ if [[ $(tc-getCXX) == *g++* ]] && ! tc-has-openmp; then
+ ewarn "OpenMP is not available in your current selected gcc"
+ die "need openmp capable gcc"
+ fi
+ fi
+}
+
+pkg_setup() {
+ use doc && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ # search paths work for prefix
+ sed -e "s:/usr:${EPREFIX}/usr:g" \
+ -i cmake/*.cmake || die
+
+ # remove Werror
+ sed -e 's/-Werror=(all|extra)//g' \
+ -i CMakeLists.txt || die
+}
+
+src_configure() {
+ # CUSTOM_BLAS=OFF EIGENSPARSE=OFF MINIGLOG=OFF CXX11=OFF
+ local mycmakeargs=(
+ -DBUILD_BENCHMARKS=OFF
+ -DBUILD_EXAMPLES=$(usex examples)
+ -DBUILD_TESTING=$(usex test)
+ -DBUILD_DOCUMENTATION=$(usex doc)
+ -DGFLAGS=$(usex gflags)
+ -DLAPACK=$(usex lapack)
+ -DSCHUR_SPECIALIZATIONS=$(usex schur)
+ -DCXSPARSE=$(usex cxsparse)
+ -DSUITESPARSE=$(usex sparse)
+ -DEigen3_DIR=/usr/$(get_libdir)/cmake/eigen3
+ -DCERES_THREADING_MODEL=$(usex openmp OPENMP CXX_THREADS)
+ )
+
+ use doc && mycmakeargs+=(
+ -DCERES_DOCS_INSTALL_DIR="${EPREFIX}"/usr/share/doc/${PF}
+ )
+ use sparse || use cxsparse || mycmakeargs+=( -DEIGENSPARSE=ON )
+
+ cmake-multilib_src_configure
+}
+
+src_install() {
+ cmake-multilib_src_install
+
+ if use examples; then
+ docompress -x /usr/share/doc/${PF}/examples
+ dodoc -r examples data
+ fi
+}