summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2012-11-19 22:45:18 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2012-11-19 22:45:18 +0000
commitb9ca1ddb8c19abd2717ca1fb8b2744e082679d1e (patch)
treed37d2cc691d85e17b8b3aff74ddeb2a1f1ed9db1 /sci-libs
parentmarked x86 per bug 441954 (diff)
downloadgentoo-2-b9ca1ddb8c19abd2717ca1fb8b2744e082679d1e.tar.gz
gentoo-2-b9ca1ddb8c19abd2717ca1fb8b2744e082679d1e.tar.bz2
gentoo-2-b9ca1ddb8c19abd2717ca1fb8b2744e082679d1e.zip
Initial import
(Portage version: 2.2.01.21313-prefix/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/ceres-solver/ChangeLog10
-rw-r--r--sci-libs/ceres-solver/Manifest5
-rw-r--r--sci-libs/ceres-solver/ceres-solver-1.4.0.ebuild91
-rw-r--r--sci-libs/ceres-solver/files/ceres-solver-1.4.0-respect-libdir.patch41
-rw-r--r--sci-libs/ceres-solver/files/ceres-solver-1.4.0-test-no-suitesparse.patch15
-rw-r--r--sci-libs/ceres-solver/metadata.xml30
6 files changed, 192 insertions, 0 deletions
diff --git a/sci-libs/ceres-solver/ChangeLog b/sci-libs/ceres-solver/ChangeLog
new file mode 100644
index 000000000000..65d120abee69
--- /dev/null
+++ b/sci-libs/ceres-solver/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for sci-libs/ceres-solver
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/ceres-solver/ChangeLog,v 1.1 2012/11/19 22:45:17 bicatali Exp $
+
+*ceres-solver-1.4.0 (19 Nov 2012)
+
+ 19 Nov 2012; Sébastien Fabbro <bicatali@gentoo.org>
+ +ceres-solver-1.4.0.ebuild, +files/ceres-solver-1.4.0-respect-libdir.patch,
+ +files/ceres-solver-1.4.0-test-no-suitesparse.patch, +metadata.xml:
+ Initial import
diff --git a/sci-libs/ceres-solver/Manifest b/sci-libs/ceres-solver/Manifest
new file mode 100644
index 000000000000..9d0d66a30a6d
--- /dev/null
+++ b/sci-libs/ceres-solver/Manifest
@@ -0,0 +1,5 @@
+AUX ceres-solver-1.4.0-respect-libdir.patch 1428 SHA256 08af3dfe6578c61874a01062f98c20e705b5783c7ee869966a0d1480bf1e77a0 SHA512 a124cc7d2bc5d0ff3592e7d8bf9396df000723e9a5d57afc88ada2ecd9e6a0c9ad26f6d67e3fff2b8e89df71585771c808b0e1dd3739826804e49c0da5579403 WHIRLPOOL c9f76c754ef3133f4f244480c54fff6ccf6e70c99100ecbdcae30ef0ebaee481e7cef87d7ebee2b5295b275daebd72223f073466f6361838f2c04dc7f09a0c15
+AUX ceres-solver-1.4.0-test-no-suitesparse.patch 729 SHA256 6d85e8546a4972c226c51fb760bc1b049ff71fe4275afb3f1f8b98c2a6bcca68 SHA512 dbd39b3e23c56817ec64ae65f3de953b0951c409a89e1df07622243c7729421bbf601c407090280955333e04d70147f6a5d9b150edbc6c4ceb6ca6517720cf2a WHIRLPOOL 3f58635e4a9ea07bd900cf7d1a1e132d180d12afb7254929ff0f43dea557016db453e6abd4ee3b9610bed26e9f172c948dd89a098c17cf394db2e37d51fb1889
+DIST ceres-solver-1.4.0.tar.gz 3659154 SHA256 0a88bbfa20a98c780e4a3371b4f4059d77f7daa0515ef6bb31c25f335bf2a2be SHA512 6489d4840072729652ef95badd7eecf48755dc2d7fce54b7926eab5e3411d6dde20142576683ff45bf649950b445bbb1bead1bad2f10ed63ae319f0f3069cd66 WHIRLPOOL 6f76c0329fda0a31620627b2c6ab777739bea7f11068841f545e2cfc2511e8950a0399a7c4c3cda5152e15676a0a760ce9e7219fd5ed5408a317b9ecb6e96e0f
+EBUILD ceres-solver-1.4.0.ebuild 2219 SHA256 21ed7060df1279255096567a1787ff5f7c27bc9c1bba7b5dad98486765101e17 SHA512 c731e089e547611072d69a587f5657c00fdbb59bfa0ddc5017ea9a5e43a91108feffce0e63f298e8c3bfe42cac16dd58d6b24207f563b87554f1522d679562a4 WHIRLPOOL 6c3b967989fa6255377b73e3682112a972887af0decc2db8b4fc624d87540b83df3e54e3a83f24b2ef19e8bfad22e27bad2e5dcfe2ac3c9ed9c94e798379dfc5
+MISC metadata.xml 1374 SHA256 e311502a89b9c605e1b2f24bba35a539a44f15dec85a26271ca7b849ba7fa6c8 SHA512 5cb1d747aed4af961a993cb9894cf653db3f023041e41f37b05d165061132362beed4cd7351221426ffc28f9a8b4e194c85ad11af87e18c40a199785b51e96dd WHIRLPOOL b654ad5fa3e09932d7d2692b3fdc89402bb3fbfa91fa13d29ec3bd5492c66745715072d0b40c621d705394977e158322c989bacfb1980219da4eb1977541799a
diff --git a/sci-libs/ceres-solver/ceres-solver-1.4.0.ebuild b/sci-libs/ceres-solver/ceres-solver-1.4.0.ebuild
new file mode 100644
index 000000000000..3b12f787a549
--- /dev/null
+++ b/sci-libs/ceres-solver/ceres-solver-1.4.0.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/ceres-solver/ceres-solver-1.4.0.ebuild,v 1.1 2012/11/19 22:45:17 bicatali Exp $
+
+EAPI=4
+
+inherit cmake-utils eutils multilib
+
+DESCRIPTION="Nonlinear least-squares minimizer"
+HOMEPAGE="https://code.google.com/p/ceres-solver/"
+SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples gflags metis openmp protobuf +schur +sparse static-libs test"
+REQUIRED_USE="test? ( gflags )"
+
+RDEPEND="
+ dev-cpp/eigen:3
+ dev-cpp/glog[gflags?]
+ protobuf? ( dev-libs/protobuf )
+ sparse? (
+ sci-libs/amd
+ sci-libs/camd
+ sci-libs/ccolamd
+ sci-libs/cholmod[metis?]
+ sci-libs/colamd
+ sci-libs/cxsparse
+ virtual/blas
+ virtual/lapack )"
+DEPEND="${RDEPEND}
+ sparse? ( virtual/pkgconfig )
+ doc? (
+ dev-python/pygments
+ virtual/latex-base
+ dev-texlive/texlive-science )"
+
+src_prepare() {
+ # prefix love
+ # disable blas/lapack forced library names
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ -e '/FIND_LIBRARY(BLAS_LIB NAMES blas)/d' \
+ -e '/FIND_LIBRARY(LAPACK_LIB NAMES lapack)/d' \
+ -e 's/EXISTS ${BLAS_LIB}/BLAS_LIB/g' \
+ -e 's/EXISTS ${LAPACK_LIB}/LAPACK_LIB/g' \
+ CMakeLists.txt || die
+
+ sed -i \
+ -e "s:share/ceres/docs:share/doc/${PF}:" \
+ docs/CMakeLists.txt || die
+
+ epatch \
+ "${FILESDIR}"/${P}-test-no-suitesparse.patch \
+ "${FILESDIR}"/${P}-respect-libdir.patch
+}
+
+src_configure() {
+ local blibs llibs
+ if use sparse; then
+ blibs=$(pkg-config --libs blas)
+ llibs=$(pkg-config --libs lapack)
+ fi
+ local mycmakeargs=(
+ -DBLAS_LIB="${blibs}"
+ -DLAPACK_LIB="${llibs}"
+ $(cmake-utils_use_enable test TESTING)
+ $(cmake-utils_use doc BUILD_DOCUMENTATION)
+ $(cmake-utils_use gflags GFLAGS)
+ $(cmake-utils_use openmp OPENMP)
+ $(cmake-utils_use protobuf PROTOBUF)
+ $(cmake-utils_use schur SCHUR_SPECIALIZATIONS)
+ $(cmake-utils_use sparse CXSPARSE)
+ $(cmake-utils_use sparse SUITESPARSE)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc README VERSION
+
+ use static-libs || rm "${ED}"/usr/$(get_libdir)/libceres.a
+ dosym libceres_shared.so /usr/$(get_libdir)/libceres.so
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
diff --git a/sci-libs/ceres-solver/files/ceres-solver-1.4.0-respect-libdir.patch b/sci-libs/ceres-solver/files/ceres-solver-1.4.0-respect-libdir.patch
new file mode 100644
index 000000000000..940b20e5598d
--- /dev/null
+++ b/sci-libs/ceres-solver/files/ceres-solver-1.4.0-respect-libdir.patch
@@ -0,0 +1,41 @@
+patch from ceres-solver issue ticket
+http://code.google.com/p/ceres-solver/issues/detail?id=75
+
+
+Index: ceres-solver-1.4.0/internal/ceres/CMakeLists.txt
+===================================================================
+--- ceres-solver-1.4.0.orig/internal/ceres/CMakeLists.txt
++++ ceres-solver-1.4.0/internal/ceres/CMakeLists.txt
+@@ -118,8 +118,8 @@ IF (${BUILD_ANDROID})
+
+ INSTALL(TARGETS miniglog
+ RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib)
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
++ ARCHIVE DESTINATION lib${LIB_SUFFIX})
+ ENDIF (${BUILD_ANDROID})
+
+ SET(CERES_LIBRARY_DEPENDENCIES ${GLOG_LIB})
+@@ -175,8 +175,8 @@ TARGET_LINK_LIBRARIES(ceres ${CERES_LIBR
+
+ INSTALL(TARGETS ceres
+ RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib)
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
++ ARCHIVE DESTINATION lib${LIB_SUFFIX})
+
+ # Don't build a DLL on MSVC. Supporting Ceres as a DLL on Windows involves
+ # nontrivial changes that we haven't made yet.
+@@ -189,8 +189,8 @@ IF (NOT MSVC AND NOT ${BUILD_ANDROID})
+
+ INSTALL(TARGETS ceres_shared
+ RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib)
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
++ ARCHIVE DESTINATION lib${LIB_SUFFIX})
+
+ ENDIF (NOT MSVC AND NOT ${BUILD_ANDROID})
+
diff --git a/sci-libs/ceres-solver/files/ceres-solver-1.4.0-test-no-suitesparse.patch b/sci-libs/ceres-solver/files/ceres-solver-1.4.0-test-no-suitesparse.patch
new file mode 100644
index 000000000000..7c5712c0af50
--- /dev/null
+++ b/sci-libs/ceres-solver/files/ceres-solver-1.4.0-test-no-suitesparse.patch
@@ -0,0 +1,15 @@
+define the linear ordering when SuiteSparse is not used
+(otherwise chokes on a unit test)
+bicatali@gentoo.org
+
+--- ceres-solver-1.4.0.orig/internal/ceres/solver_impl_test.cc 2012-11-19 13:34:36.194795640 -0800
++++ ceres-solver-1.4.0/internal/ceres/solver_impl_test.cc 2012-11-19 13:59:42.395429059 -0800
+@@ -498,6 +498,8 @@
+ #if defined(CERES_NO_SUITESPARSE) && defined(CERES_NO_CXSPARSE)
+ TEST(SolverImpl, CreateLinearSolverNoSuiteSparse) {
+ Solver::Options options;
++ // CreateLinearSolver assumes a non-empty ordering.
++ options.linear_solver_ordering = new ParameterBlockOrdering;
+ options.linear_solver_type = SPARSE_NORMAL_CHOLESKY;
+ string error;
+ EXPECT_FALSE(SolverImpl::CreateLinearSolver(&options, &error));
diff --git a/sci-libs/ceres-solver/metadata.xml b/sci-libs/ceres-solver/metadata.xml
new file mode 100644
index 000000000000..903ae3d74c88
--- /dev/null
+++ b/sci-libs/ceres-solver/metadata.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<longdescription lang="en">
+ 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
+</longdescription>
+<use>
+ <flag name="schur">Enable fixed-size schur specializations (disable if
+ binary size is an issue)</flag>
+ <flag name="metis">Use METIS via <pkg>sci-libs/cholmod</pkg> for matrix partitioning</flag>
+ <flag name="sparse">Enable support for sparse matrix algebra with various
+ packages from SuiteSparse</flag>
+ <flag name="gflags">Use <pkg>dev-cpp/gflags</pkg> for flag parsing</flag>
+ <flag name="protobuf">Use <pkg>dev-libs/protobuf</pkg> to encode structured data</flag>
+</use>
+</pkgmetadata>