sci-libs/hdf5: Allow cxx & mpi at the same time.
[gentoo.git] / sci-libs / coinor-cppad / coinor-cppad-20140519-r1.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 AUTOTOOLS_AUTORECONF=yes
8
9 inherit autotools-utils multilib
10
11 MYP=cppad-${PV}
12
13 DESCRIPTION="COIN-OR C++ Algorithmic Differentiation"
14 HOMEPAGE="https://projects.coin-or.org/CppAD/"
15 SRC_URI="http://www.coin-or.org/download/source/CppAD/${MYP}.gpl.tgz"
16
17 LICENSE="GPL-3"
18 SLOT="0"
19 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
20 IUSE="doc examples"
21
22 RDEPEND="
23         dev-libs/boost[threads]
24         sci-libs/adolc:0=
25         sci-libs/ipopt:0="
26 DEPEND="${RDEPEND}
27         virtual/pkgconfig
28         doc? ( app-doc/doxygen[dot] )"
29
30 S="${WORKDIR}/${MYP}"
31
32 PATCHES=(
33         "${FILESDIR}"/${P}-dash.patch
34         "${FILESDIR}"/${P}-boost.patch
35         )
36
37 src_configure() {
38         local myeconfargs=( $(use doc Documentation) )
39         autotools-utils_src_configure CXX_FLAGS="${CXXFLAGS}"
40 }
41
42 src_compile() {
43         autotools-utils_src_compile
44         if use doc; then
45                 ./build.sh doxygen || die
46         fi
47 }
48
49 src_test() {
50         autotools-utils_src_test check test
51 }
52
53 src_install() {
54         use doc && HTML_DOC=( "${BUILD_DIR}"/doxydocs/html/. )
55         autotools-utils_src_install
56         if use examples; then
57                 insinto /usr/share/doc/${PF}/examples
58                 doins -r example/*
59         fi
60 }