--- openmpi-1.8.7.ebuild 2015-08-01 08:39:34.128000000 +0000 +++ openmpi-1.8.7-r1.ebuild 2015-08-01 08:43:38.155000000 +0000 @@ -6,7 +6,10 @@ FORTRAN_NEEDED=fortran -inherit cuda eutils flag-o-matic fortran-2 toolchain-funcs versionator +inherit cuda eutils flag-o-matic fortran-2 toolchain-funcs versionator multilib java-pkg-opt-2 + +JAVA_PKG_WANT_SOURCE=1.8 +JAVA_PKG_WANT_TARGET=1.8 MY_P=${P/-mpi} S=${WORKDIR}/${MY_P} @@ -35,7 +38,7 @@ LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux" -IUSE="cma cuda +cxx elibc_FreeBSD fortran heterogeneous ipv6 mpi-threads numa romio threads vt +IUSE="cma cuda +cxx elibc_FreeBSD fortran heterogeneous ipv6 mpi-threads numa romio threads vt +java ${IUSE_OPENMPI_FABRICS} ${IUSE_OPENMPI_RM} ${IUSE_OPENMPI_OFED_FEATURES}" REQUIRED_USE="openmpi_rm_slurm? ( !openmpi_rm_pbs ) @@ -71,12 +74,22 @@ openmpi_rm_pbs? ( sys-cluster/torque ) openmpi_rm_slurm? ( sys-cluster/slurm ) openmpi_ofed_features_rdmacm? ( sys-infiniband/librdmacm ) + java? ( + >=virtual/jre-1.6 + ) " -DEPEND="${RDEPEND}" +DEPEND="${RDEPEND} + java? ( + >=virtual/jdk-1.6 + )" pkg_setup() { fortran-2_pkg_setup + if use java; then + java-pkg-opt-2_pkg_setup + fi + if use mpi-threads; then echo ewarn "WARNING: use of MPI_THREAD_MULTIPLE is still disabled by" @@ -137,7 +150,9 @@ $(use_enable openmpi_ofed_features_dynamic-sl openib-dynamic-sl) \ $(use_enable openmpi_ofed_features_failover btl-openib-failover) \ $(use_with openmpi_rm_pbs tm) \ - $(use_with openmpi_rm_slurm slurm) + $(use_with openmpi_rm_slurm slurm) \ + $(use_enable java) \ + $(use_enable java mpi-java) } src_install () { @@ -152,6 +167,14 @@ # Remove la files, no static libs are installed and we have pkg-config find "${ED}"/usr/$(get_libdir)/ -type f -name '*.la' -delete + if use java; then + local mpi_jar="${ED}"/usr/$(get_libdir)/mpi.jar + java-pkg_dojar ${mpi_jar} + # We don't want to install the jar file twice + # so let's clean after ourselves + rm ${mpi_jar} + fi + dodoc README AUTHORS NEWS VERSION || die }