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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Jun 9 02:29:13 2014 UTC (5 years, 7 months ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
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-2014 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.8.0.ebuild,v 1.1 2013/11/14 01:49:00 bicatali Exp $
4
5 EAPI=5
6
7 PYTHON_COMPAT=( python2_7 )
8
9 inherit cmake-utils eutils multilib python-any-r1 toolchain-funcs
10
11 DESCRIPTION="Nonlinear least-squares minimizer"
12 HOMEPAGE="http://ceres-solver.org/"
13 SRC_URI="${HOMEPAGE}/${P}.tar.gz"
14
15 LICENSE="BSD"
16 SLOT="0/1"
17 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
18
19 IUSE="cxsparse doc examples gflags lapack openmp protobuf +schur sparse static-libs test"
20 REQUIRED_USE="test? ( gflags ) sparse? ( lapack ) doc? ( ${PYTHON_REQUIRED_USE} )"
21
22 RDEPEND="
23 dev-cpp/glog[gflags?]
24 cxsparse? ( sci-libs/cxsparse:0= )
25 lapack? ( virtual/lapack )
26 protobuf? ( dev-libs/protobuf )
27 sparse? (
28 sci-libs/amd:0=
29 sci-libs/camd:0=
30 sci-libs/ccolamd:0=
31 sci-libs/cholmod:0=
32 sci-libs/colamd:0=
33 sci-libs/spqr:0= )"
34
35 DEPEND="${RDEPEND}
36 dev-cpp/eigen:3
37 doc? ( dev-python/sphinx dev-python/sphinx_rtd_theme )
38 lapack? ( virtual/pkgconfig )"
39
40 PATCHES=( "${FILESDIR}"/${P}-underlink.patch )
41
42 pkg_setup() {
43 # XXX: this looks like it should be used with BUILD_TYPE!=binary
44 if use openmp; then
45 if [[ $(tc-getCXX) == *g++* ]] && ! tc-has-openmp; then
46 ewarn "OpenMP is not available in your current selected gcc"
47 die "need openmp capable gcc"
48 fi
49 fi
50 use doc && python-any-r1_pkg_setup
51 }
52
53 src_prepare() {
54 # search paths work for prefix
55 sed -i \
56 -e "s:/usr:${EPREFIX}/usr:g" \
57 cmake/*.cmake || die
58
59 # remove Werror
60 sed -i \
61 -e 's/-Werror//g' \
62 CMakeLists.txt || die
63
64 # respect gentoo doc install directory
65 sed -i \
66 -e "s:share/doc/ceres:share/doc/${PF}:" \
67 docs/source/CMakeLists.txt || die
68 cmake-utils_src_prepare
69 }
70
71 src_configure() {
72 local mycmakeargs=(
73 -DBUILD_SHARED_LIBS=ON
74 -DBUILD_EXAMPLES=OFF
75 $(cmake-utils_use_enable test TESTING)
76 $(cmake-utils_use doc BUILD_DOCUMENTATION)
77 $(cmake-utils_use gflags GFLAGS)
78 $(cmake-utils_use lapack LAPACK)
79 $(cmake-utils_use openmp OPENMP)
80 $(cmake-utils_use protobuf PROTOBUF)
81 $(cmake-utils_use schur SCHUR_SPECIALIZATIONS)
82 $(cmake-utils_use cxsparse CXSPARSE)
83 $(cmake-utils_use sparse SUITESPARSE)
84 )
85 cmake-utils_src_configure
86 }
87
88 src_install() {
89 cmake-utils_src_install
90 dodoc README VERSION
91
92 if use examples; then
93 insinto /usr/share/doc/${PF}
94 docompress -x /usr/share/doc/${PF}/examples
95 doins -r examples data
96 fi
97 }

  ViewVC Help
Powered by ViewVC 1.1.20