diff options
-rw-r--r-- | sci-libs/ipopt/ChangeLog | 4 | ||||
-rw-r--r-- | sci-libs/ipopt/files/ipopt-3.11.2-mpi-header.patch | 14 | ||||
-rw-r--r-- | sci-libs/ipopt/ipopt-3.11.2.ebuild | 24 |
3 files changed, 30 insertions, 12 deletions
diff --git a/sci-libs/ipopt/ChangeLog b/sci-libs/ipopt/ChangeLog index e6f6ffae4..b2eba09f1 100644 --- a/sci-libs/ipopt/ChangeLog +++ b/sci-libs/ipopt/ChangeLog @@ -2,6 +2,10 @@ # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 03 Jul 2013; Sébastien Fabbro <bicatali@gentoo.org> + +files/ipopt-3.11.2-mpi-header.patch, ipopt-3.11.2.ebuild: + sci-libs/ipopt: patch for mpi builds, and better dependence on mumps and mpi + *ipopt-3.11.2 (03 Jul 2013) 03 Jul 2013; Sébastien Fabbro <bicatali@gentoo.org> +ipopt-3.11.2.ebuild, diff --git a/sci-libs/ipopt/files/ipopt-3.11.2-mpi-header.patch b/sci-libs/ipopt/files/ipopt-3.11.2-mpi-header.patch new file mode 100644 index 000000000..647eedf97 --- /dev/null +++ b/sci-libs/ipopt/files/ipopt-3.11.2-mpi-header.patch @@ -0,0 +1,14 @@ +--- src/Algorithm/LinearSolvers/IpMumpsSolverInterface.cpp.orig 2013-07-03 13:29:25.140918850 -0700 ++++ src/Algorithm/LinearSolvers/IpMumpsSolverInterface.cpp 2013-07-03 13:28:22.481558184 -0700 +@@ -17,9 +17,9 @@ + // The following line is a fix for otherwise twice-defined global variable + // (This would have to be taken out for a parallel MUMPS version!) + # define MPI_COMM_WORLD IPOPT_MPI_COMM_WORLD +-# include "mpi.h" +-} + ++} ++# include "mpi.h" + #include "IpMumpsSolverInterface.hpp" + + #include "dmumps_c.h" diff --git a/sci-libs/ipopt/ipopt-3.11.2.ebuild b/sci-libs/ipopt/ipopt-3.11.2.ebuild index 29c7f3322..ab85f1218 100644 --- a/sci-libs/ipopt/ipopt-3.11.2.ebuild +++ b/sci-libs/ipopt/ipopt-3.11.2.ebuild @@ -6,7 +6,7 @@ EAPI=5 AUTOTOOLS_IN_SOURCE_BUILD=yes FORTRAN_NEEDED="mumps" -inherit autotools-utils multilib toolchain-funcs fortran-2 +inherit eutils autotools-utils multilib toolchain-funcs fortran-2 MYPN=Ipopt MYP=${MYPN}-${PV} @@ -18,34 +18,34 @@ SRC_URI="http://www.coin-or.org/download/source/${MYPN}/${MYP}.tgz" LICENSE="EPL-1.0 hsl? ( HSL )" SLOT="0" KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" -IUSE="doc examples hsl lapack mumps static-libs test" +IUSE="doc examples hsl lapack mpi mumps static-libs test" RDEPEND=" virtual/blas hsl? ( sci-libs/coinhsl ) lapack? ( virtual/lapack ) - mumps? ( sci-libs/mumps )" + mumps? ( sci-libs/mumps[mpi=] )" DEPEND="${RDEPEND} virtual/pkgconfig doc? ( app-doc/doxygen[dot] ) - test? ( sci-libs/coinor-sample sci-libs/coinhsl )" + test? ( sci-libs/coinor-sample sci-libs/mumps )" S="${WORKDIR}/${MYPN}-${PV}/${MYPN}" src_prepare() { + epatch "${FILESDIR}"/${P}-mpi-header.patch + # as-needed fix # hack to avoid eautoreconf (coinor has its own weird autotools) sed -i \ -e 's:\(libipopt_la_LIBADD.*=.*\)$:\1 @IPOPTLIB_LIBS@:g' \ src/Interfaces/Makefile.in || die - if use mumps; then - if has_version sci-libs/mumps[-mpi]; then - ln -s "${EPREFIX}"/usr/include/mpiseq/mpi.h \ - src/Algorithm/LinearSolvers/ - elif has_version sci-libs/mumps[mpi]; then - export CXX=mpicxx FC=mpif77 F77=mpif77 CC=mpicc - fi + if use mumps && ! use mpi; then + ln -s "${EPREFIX}"/usr/include/mpiseq/mpi.h \ + src/Algorithm/LinearSolvers/ + elif use mpi; then + export CXX=mpicxx FC=mpif77 F77=mpif77 CC=mpicc fi } @@ -83,7 +83,7 @@ src_compile() { } src_test() { - pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null || die + pushd "${BUILD_DIR}" > /dev/null || die emake test popd > /dev/null || die } |