/[gentoo-x86]/sci-libs/ceres-solver/ceres-solver-1.7.0.ebuild
Gentoo

Contents of /sci-libs/ceres-solver/ceres-solver-1.7.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Jun 9 02:29:13 2014 UTC (5 years, 7 months ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump. Updated home page, doc building, added patch for underlinking cholmod

(Portage version: HEAD/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-libs/ceres-solver/ceres-solver-1.7.0.ebuild,v 1.1 2013/10/23 18:36:55 bicatali Exp $
4
5 EAPI=5
6
7 inherit cmake-utils eutils multilib toolchain-funcs
8
9 DESCRIPTION="Nonlinear least-squares minimizer"
10 HOMEPAGE="https://code.google.com/p/ceres-solver/"
11 SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.gz"
12
13 LICENSE="BSD"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
16 IUSE="doc examples gflags metis openmp protobuf +schur +sparse static-libs test"
17 REQUIRED_USE="test? ( gflags )"
18
19 RDEPEND="
20 dev-cpp/eigen:3
21 dev-cpp/glog[gflags?]
22 protobuf? ( dev-libs/protobuf )
23 sparse? (
24 sci-libs/amd
25 sci-libs/camd
26 sci-libs/ccolamd
27 sci-libs/cholmod[metis?]
28 sci-libs/colamd
29 sci-libs/cxsparse
30 sci-libs/spqr
31 virtual/blas
32 virtual/lapack )"
33 DEPEND="${RDEPEND}
34 sparse? ( virtual/pkgconfig )
35 doc? ( dev-python/sphinx )"
36
37 src_prepare() {
38 # prefix love
39 # disable blas/lapack forced library names
40 sed -i \
41 -e "s:/usr:${EPREFIX}/usr:g" \
42 -e '/FIND_LIBRARY(BLAS_LIB NAMES blas)/d' \
43 -e '/FIND_LIBRARY(LAPACK_LIB NAMES lapack)/d' \
44 -e 's/EXISTS ${BLAS_LIB}/BLAS_LIB/g' \
45 -e 's/EXISTS ${LAPACK_LIB}/LAPACK_LIB/g' \
46 -e 's/-Werror//g' \
47 CMakeLists.txt || die
48
49 # respect gentoo doc dir
50 sed -i \
51 -e "s:share/doc/ceres:share/doc/${PF}:" \
52 docs/source/CMakeLists.txt || die
53 }
54
55 src_configure() {
56 local blibs llibs
57 if use sparse; then
58 blibs=$($(tc-getPKG_CONFIG) --libs blas)
59 llibs=$($(tc-getPKG_CONFIG) --libs lapack)
60 fi
61 local mycmakeargs=(
62 -DBLAS_LIB="${blibs}"
63 -DLAPACK_LIB="${llibs}"
64 $(cmake-utils_use_enable test TESTING)
65 $(cmake-utils_use doc BUILD_DOCUMENTATION)
66 $(cmake-utils_use gflags GFLAGS)
67 $(cmake-utils_use openmp OPENMP)
68 $(cmake-utils_use protobuf PROTOBUF)
69 $(cmake-utils_use schur SCHUR_SPECIALIZATIONS)
70 $(cmake-utils_use sparse CXSPARSE)
71 $(cmake-utils_use sparse SUITESPARSE)
72 )
73 cmake-utils_src_configure
74 }
75
76 src_install() {
77 cmake-utils_src_install
78 dodoc README VERSION
79
80 use static-libs || rm "${ED}"/usr/$(get_libdir)/libceres.a
81 dosym libceres_shared.so /usr/$(get_libdir)/libceres.so
82
83 if use examples; then
84 insinto /usr/share/doc/${PF}
85 doins -r examples
86 fi
87 }

  ViewVC Help
Powered by ViewVC 1.1.20