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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Thu Nov 14 01:49:00 2013 UTC (6 years, 3 months ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Version bump. Separate cxsparse (simpler library) from sparse flag, add lapack flag, adapt changes upstream to be more cmake friendly

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

1 bicatali 1.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
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/1"
15     KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
16     IUSE="cxsparse doc examples gflags lapack openmp protobuf +schur sparse static-libs test"
17     REQUIRED_USE="test? ( gflags ) sparse? ( lapack )"
18    
19     RDEPEND="
20     dev-cpp/glog[gflags?]
21     cxsparse? ( sci-libs/cxsparse )
22     lapack? ( virtual/lapack )
23     protobuf? ( dev-libs/protobuf )
24     sparse? (
25     sci-libs/amd
26     sci-libs/camd
27     sci-libs/ccolamd
28     sci-libs/cholmod
29     sci-libs/colamd
30     sci-libs/spqr )"
31    
32     DEPEND="${RDEPEND}
33     dev-cpp/eigen:3
34     lapack? ( virtual/pkgconfig )
35     doc? ( dev-python/sphinx )"
36    
37     src_prepare() {
38     # prefix love
39     sed -i \
40     -e "s:/usr:${EPREFIX}/usr:g" \
41     cmake/*.cmake || die
42    
43     # remove Werror and
44     sed -i \
45     -e 's/-Werror//g' \
46     CMakeLists.txt || die
47    
48     # respect gentoo doc dir
49     sed -i \
50     -e "s:share/doc/ceres:share/doc/${PF}:" \
51     docs/source/CMakeLists.txt || die
52     }
53    
54     src_configure() {
55     local mycmakeargs=(
56     -DBUILD_SHARED_LIBS=ON
57     -DBUILD_EXAMPLES=OFF
58     $(cmake-utils_use_enable test TESTING)
59     $(cmake-utils_use doc BUILD_DOCUMENTATION)
60     $(cmake-utils_use gflags GFLAGS)
61     $(cmake-utils_use lapack LAPACK)
62     $(cmake-utils_use openmp OPENMP)
63     $(cmake-utils_use protobuf PROTOBUF)
64     $(cmake-utils_use schur SCHUR_SPECIALIZATIONS)
65     $(cmake-utils_use cxsparse CXSPARSE)
66     $(cmake-utils_use sparse SUITESPARSE)
67     )
68     cmake-utils_src_configure
69     }
70    
71     src_install() {
72     cmake-utils_src_install
73     dodoc README VERSION
74    
75     if use examples; then
76     insinto /usr/share/doc/${PF}
77     docompress -x /usr/share/doc/${PF}/examples
78     doins -r examples data
79     fi
80     }

  ViewVC Help
Powered by ViewVC 1.1.20