/[gentoo-x86]/sci-libs/ipopt/ipopt-3.11.8.ebuild
Gentoo

Contents of /sci-libs/ipopt/ipopt-3.11.8.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed May 21 16:47:10 2014 UTC (4 years, 3 months ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Version bump

(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/ipopt/ipopt-3.11.7.ebuild,v 1.2 2014/02/04 08:33:36 jlec Exp $
4
5 EAPI=5
6
7 AUTOTOOLS_IN_SOURCE_BUILD=yes
8 FORTRAN_NEEDED="mumps"
9
10 inherit eutils autotools-utils multilib toolchain-funcs fortran-2
11
12 MYPN=Ipopt
13 MYP=${MYPN}-${PV}
14
15 DESCRIPTION="Interior-Point Optimizer for large-scale nonlinear optimization"
16 HOMEPAGE="https://projects.coin-or.org/Ipopt/"
17 SRC_URI="http://www.coin-or.org/download/source/${MYPN}/${MYP}.tgz"
18
19 LICENSE="EPL-1.0 hsl? ( HSL )"
20 SLOT="0/1"
21 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
22 IUSE="doc examples hsl lapack mpi mumps static-libs test"
23
24 RDEPEND="
25 virtual/blas
26 hsl? ( sci-libs/coinhsl:0= )
27 lapack? ( virtual/lapack )
28 mumps? ( sci-libs/mumps:0=[mpi=] )"
29 DEPEND="${RDEPEND}
30 virtual/pkgconfig
31 doc? ( app-doc/doxygen[dot] )
32 test? ( sci-libs/coinor-sample sci-libs/mumps )"
33
34 S="${WORKDIR}/${MYPN}-${PV}/${MYPN}"
35
36 src_prepare() {
37 if use mumps && ! use mpi; then
38 ln -s "${EPREFIX}"/usr/include/mpiseq/mpi.h \
39 src/Algorithm/LinearSolvers/
40 elif use mpi; then
41 export CXX=mpicxx FC=mpif77 F77=mpif77 CC=mpicc
42 fi
43 sed -i \
44 -e "s:lib/pkgconfig:$(get_libdir)/pkgconfig:g" \
45 configure || die
46 autotools-utils_src_prepare
47 }
48
49 src_configure() {
50 # needed for the --with-coin-instdir
51 dodir /usr
52 local myeconfargs=(
53 --enable-dependency-linking
54 --with-blas-lib="$($(tc-getPKG_CONFIG) --libs blas)"
55 --with-coin-instdir="${ED}"/usr
56 $(use_with doc dot)
57 )
58
59 if use lapack; then
60 myeconfargs+=( --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)" )
61 else
62 myeconfargs+=( --without-lapack )
63 fi
64 if use mumps; then
65 myeconfargs+=(
66 --with-mumps-incdir="${EPREFIX}"/usr/include
67 --with-mumps-lib="-lmumps_common -ldmumps -lzmumps -lsmumps -lcmumps" )
68 else
69 myeconfargs+=( --without-mumps )
70 fi
71 if use hsl; then
72 myeconfargs+=(
73 --with-hsl-incdir="${EPREFIX}"/usr/include
74 --with-hsl-lib="$($(tc-getPKG_CONFIG) --libs coinhsl)" )
75 else
76 myeconfargs+=( --without-hsl )
77 fi
78 autotools-utils_src_configure
79 }
80
81 src_compile() {
82 autotools-utils_src_compile all $(use doc && echo doxydoc)
83 }
84
85 src_test() {
86 autotools-utils_src_test test
87 }
88
89 src_install() {
90 use doc && HTML_DOC=("${AUTOTOOLS_BUILD_DIR}/doxydocs/html/")
91 autotools-utils_src_install
92 # already installed
93 rm "${ED}"/usr/share/coin/doc/${MYPN}/{README,AUTHORS,LICENSE} || die
94 if use examples; then
95 insinto /usr/share/doc/${PF}
96 doins -r examples
97 fi
98 }

  ViewVC Help
Powered by ViewVC 1.1.20