summaryrefslogtreecommitdiff
path: root/sci-libs/ceres-solver
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-08-07 00:16:33 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-08-07 00:16:33 +0100
commitd162ba1860a88062f4cd61f8b52fc303ba0b2991 (patch)
tree24cd2cf57f3932a24b96e4a0f6666489447e43ba /sci-libs/ceres-solver
parent590b9b7b03bf4651e099949e318755af7cfa81b8 (diff)
gentoo resync : 07.08.2021
Diffstat (limited to 'sci-libs/ceres-solver')
-rw-r--r--sci-libs/ceres-solver/Manifest3
-rw-r--r--sci-libs/ceres-solver/ceres-solver-2.0.0.ebuild104
-rw-r--r--sci-libs/ceres-solver/files/ceres-solver-2.0.0-system-mathjax.patch10
3 files changed, 117 insertions, 0 deletions
diff --git a/sci-libs/ceres-solver/Manifest b/sci-libs/ceres-solver/Manifest
index 7cb03fb408ca..6e1c1cf46fea 100644
--- a/sci-libs/ceres-solver/Manifest
+++ b/sci-libs/ceres-solver/Manifest
@@ -1,3 +1,6 @@
+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
EBUILD ceres-solver-1.14.0.ebuild 2390 BLAKE2B 6aa1716982173734e1f95f2ba76b18ae27854811c35d95f8b2812fd6ff7ff1b74adb7c4f674e4834b5ee65e1a5a159d9cd656d28a9fbdda6192da84060150e8c SHA512 1e8da4d8abbfe6705841a453a9db6e5d672c40efff438afe32085b7ad43b7801970184d1869726ce9ec28b32e6c076f84a7fa622417b88bcd9f7072602bd235a
+EBUILD ceres-solver-2.0.0.ebuild 2524 BLAKE2B a3fdcf279d57e9d69a0ac3f3d6639f1e0ac84c1116628da74dd80bb77271ade03ef3be70cc88efa2e0b8c4d1faf1dd77bc3a061f0ef05c62f9f4d3219d92d3f4 SHA512 e430efbf26696b97e619045463da032b376811d999fd394d9e3c51301e7db7d29217452df27e716ab9de1cda2c033301b505571ab362dc8aaa541d8f955cb1be
MISC metadata.xml 1451 BLAKE2B c23657557890c4b62551c79eb7a3b07ef0921f5766b9d771d85e1cf156b03a9d783f6d307504ce5cfc810e096bd990f2aef58f7da6cf912df3fbafa7b63f257e SHA512 e9867b3e997e1c28e900f1148287ed052d5e29440c7f8d99b61432c8870d8f6d7368d387f9cc72bb948a412b77ad8e4cc2f418c41ad60f21c8027e23f36d71aa
diff --git a/sci-libs/ceres-solver/ceres-solver-2.0.0.ebuild b/sci-libs/ceres-solver/ceres-solver-2.0.0.ebuild
new file mode 100644
index 000000000000..771ac309e41c
--- /dev/null
+++ b/sci-libs/ceres-solver/ceres-solver-2.0.0.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_ECLASS=cmake
+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}/${P}-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
+}
diff --git a/sci-libs/ceres-solver/files/ceres-solver-2.0.0-system-mathjax.patch b/sci-libs/ceres-solver/files/ceres-solver-2.0.0-system-mathjax.patch
new file mode 100644
index 000000000000..61e0f000f267
--- /dev/null
+++ b/sci-libs/ceres-solver/files/ceres-solver-2.0.0-system-mathjax.patch
@@ -0,0 +1,10 @@
+diff -urN a/docs/source/conf.py b/docs/source/conf.py
+--- a/docs/source/conf.py 2020-10-25 22:25:47.000000000 -0500
++++ b/docs/source/conf.py 2021-07-29 09:44:35.488893188 -0500
+@@ -252,3 +252,6 @@
+ 'scale' : 90
+ }
+ }
++
++# Use system MathJax
++mathjax_path = "/usr/share/mathjax/MathJax.js?config=TeX-MML-AM_CHTML"