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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue Feb 4 08:33:36 2014 UTC (6 years, 5 months ago) by jlec
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +8 -1 lines
Fix the common coinor pkg-config installation problem

(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)

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

  ViewVC Help
Powered by ViewVC 1.1.20