From ab35a992bc0847175cd9becd7f409a082727907f Mon Sep 17 00:00:00 2001 From: Sébastien Fabbro Date: Mon, 21 Dec 2015 19:56:31 +0000 Subject: sci-libs/ceres-solver: version bump --- sci-libs/ceres-solver/Manifest | 1 + sci-libs/ceres-solver/ceres-solver-1.11.0.ebuild | 92 ++++++++++++++++++++++++ sci-libs/ceres-solver/metadata.xml | 32 +++++++++ 3 files changed, 125 insertions(+) create mode 100644 sci-libs/ceres-solver/Manifest create mode 100644 sci-libs/ceres-solver/ceres-solver-1.11.0.ebuild create mode 100644 sci-libs/ceres-solver/metadata.xml diff --git a/sci-libs/ceres-solver/Manifest b/sci-libs/ceres-solver/Manifest new file mode 100644 index 0000000..20fdcf1 --- /dev/null +++ b/sci-libs/ceres-solver/Manifest @@ -0,0 +1 @@ +DIST ceres-solver-1.11.0.tar.gz 3944965 SHA256 4d666cc33296b4c5cd77bad18ffc487b3223d4bbb7d1dfb342ed9a87dc9af844 SHA512 4941538e6ec31e2ee56a24446748dc5d6dd02ba9c151e4320a2db943fd1a377455b0ee23d56780e1f05322b30e25057145c540fde901d7fd2244ec630a73527c WHIRLPOOL 82e8c9f8fcf66f20dea28c5ddcfc4ac030a20d86c498eda487899b090fb67e7e44e3e1a76d3b689a409860c83713005e4f889814707d25cf298892ae9ea78890 diff --git a/sci-libs/ceres-solver/ceres-solver-1.11.0.ebuild b/sci-libs/ceres-solver/ceres-solver-1.11.0.ebuild new file mode 100644 index 0000000..9621886 --- /dev/null +++ b/sci-libs/ceres-solver/ceres-solver-1.11.0.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_{4,5} ) + +inherit cmake-multilib eutils python-any-r1 toolchain-funcs + +DESCRIPTION="Nonlinear least-squares minimizer" +HOMEPAGE="http://ceres-solver.org/" +SRC_URI="${HOMEPAGE}/${P}.tar.gz" + +LICENSE="sparse? ( BSD ) !sparse? ( LGPL-2.1 ) cxsparse? ( BSD )" +SLOT="0/1" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" + +IUSE="cxsparse c++11 doc examples gflags lapack openmp +schur sparse test" +REQUIRED_USE="test? ( gflags ) sparse? ( lapack ) doc? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + dev-cpp/glog[gflags?] + cxsparse? ( sci-libs/cxsparse:0= ) + lapack? ( virtual/lapack ) + sparse? ( + sci-libs/amd:0= + sci-libs/camd:0= + sci-libs/ccolamd:0= + sci-libs/cholmod:0= + sci-libs/colamd:0= + sci-libs/spqr:0= )" + +DEPEND="${RDEPEND} + dev-cpp/eigen:3 + doc? ( dev-python/sphinx dev-python/sphinx_rtd_theme ) + lapack? ( virtual/pkgconfig )" + +pkg_setup() { + 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 + use doc && python-any-r1_pkg_setup +} + +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 + + # respect gentoo doc install directory + sed -e "s:share/doc/ceres:share/doc/${PF}:" \ + -i docs/source/CMakeLists.txt || die + cmake-utils_src_prepare +} + +src_configure() { + # CUSTOM_BLAS=OFF EIGENSPARSE=OFF MINIGLOG=OFF CXX11=OFF + local mycmakeargs=( + -DBUILD_SHARED_LIBS=ON + -DBUILD_EXAMPLES=OFF + $(cmake-utils_use_enable test TESTING) + $(cmake-utils_use c++11 CXX11) + $(cmake-utils_use doc BUILD_DOCUMENTATION) + $(cmake-utils_use gflags GFLAGS) + $(cmake-utils_use lapack LAPACK) + $(cmake-utils_use openmp OPENMP) + $(cmake-utils_use schur SCHUR_SPECIALIZATIONS) + $(cmake-utils_use cxsparse CXSPARSE) + $(cmake-utils_use sparse SUITESPARSE) + ) + use sparse || use cxsparse || mycmakeargs+=( -DEIGENSPARSE=ON ) + cmake-multilib_src_configure +} + +src_install() { + cmake-multilib_src_install + dodoc README.md VERSION + + if use examples; then + insinto /usr/share/doc/${PF} + docompress -x /usr/share/doc/${PF}/examples + doins -r examples data + fi +} diff --git a/sci-libs/ceres-solver/metadata.xml b/sci-libs/ceres-solver/metadata.xml new file mode 100644 index 0000000..882a4e4 --- /dev/null +++ b/sci-libs/ceres-solver/metadata.xml @@ -0,0 +1,32 @@ + + + +sci + + Ceres Solver is a portable C++ library that allows for + modeling and solving large complicated nonlinear least squares + problems. It features: + * automatic differentiation + * robust loss functions + * local parameterizations + * threaded Jacobian evaluators and linear solvers + * Levenberg-Marquardt and Dogleg (Powell, Subspace) solvers + * Dense QR and Cholesky factorization (using Eigen) for small problems + * Sparse Cholesky factorization (using SuiteSparse) for large sparse + problems + * Specialized solvers for bundle adjustment problems in computer vision + * Iterative linear solvers for general sparse and bundle + adjustment problems + + + Use C++11 compiler features instead of internal ones + Enable simple support for sparse matrix algebra from + sci-libs/cxsparse with no LAPACK dependencies + Enable fixed-size schur specializations (disable if + binary size is an issue) + Enable support for sparse matrix algebra with various + packages from SuiteSparse instead of Eigen Sparse + Use dev-cpp/gflags for flag parsing + Use dev-libs/protobuf to encode structured data + + -- cgit v1.2.3-65-gdbad