summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-cluster/mpe2
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-cluster/mpe2')
-rw-r--r--sys-cluster/mpe2/Manifest1
-rw-r--r--sys-cluster/mpe2/files/slog2sdk-trace_rlog-makefile-fixes.patch68
-rw-r--r--sys-cluster/mpe2/files/slog2sdk-trace_sample-makefile-fixes.patch68
-rw-r--r--sys-cluster/mpe2/metadata.xml9
-rw-r--r--sys-cluster/mpe2/mpe2-1.0.6_p1-r1.ebuild144
-rw-r--r--sys-cluster/mpe2/mpe2-1.0.6_p1-r2.ebuild152
-rw-r--r--sys-cluster/mpe2/mpe2-1.0.6_p1.ebuild142
7 files changed, 584 insertions, 0 deletions
diff --git a/sys-cluster/mpe2/Manifest b/sys-cluster/mpe2/Manifest
new file mode 100644
index 000000000000..b6db74ecd500
--- /dev/null
+++ b/sys-cluster/mpe2/Manifest
@@ -0,0 +1 @@
+DIST mpe2-1.0.6p1.tar.gz 9313216 SHA256 23cfef2b8a0a27408b5bdadeb216ba3adb3b02bf40d0fa6fc0a110cefd8c5863
diff --git a/sys-cluster/mpe2/files/slog2sdk-trace_rlog-makefile-fixes.patch b/sys-cluster/mpe2/files/slog2sdk-trace_rlog-makefile-fixes.patch
new file mode 100644
index 000000000000..4f2119ec69f0
--- /dev/null
+++ b/sys-cluster/mpe2/files/slog2sdk-trace_rlog-makefile-fixes.patch
@@ -0,0 +1,68 @@
+From 5bc91497bd4b3d2e4e962ffb2d5b9b471c4183c2 Mon Sep 17 00:00:00 2001
+From: Justin Bronder <jsbronder@gmail.com>
+Date: Mon, 13 Sep 2010 14:18:51 -0400
+Subject: [PATCH 1/2] slog2sdk/trace_rlog makefile fixes
+
+- Respect user-defined LDFLAGS when linking PGM_PRINT and PGM_CHECK.
+- Do not install libraries during the compile phase.
+---
+ src/slog2sdk/trace_rlog/src/Makefile.in | 19 ++++++++-----------
+ 1 files changed, 8 insertions(+), 11 deletions(-)
+
+diff --git a/src/slog2sdk/trace_rlog/src/Makefile.in b/src/slog2sdk/trace_rlog/src/Makefile.in
+index 9b289b8..2d772e0 100644
+--- a/src/slog2sdk/trace_rlog/src/Makefile.in
++++ b/src/slog2sdk/trace_rlog/src/Makefile.in
+@@ -48,7 +48,8 @@ RM = @RM@
+
+ JNI_INC = @JNI_INC@
+ CFLAGS = -I.. $(JNI_INC) -I$(TRACE_INCDIR) @COPTS@
+-LDFLAGS = -module -no-undefined -avoid-version @LDFLAGS@
++LDFLAGS = @LDFLAGS@
++LIBLDFLAGS = -module -no-undefined -avoid-version @LDFLAGS@
+
+ # memory leak checker
+ MEMLIBS = @DEBUG_LIBS@
+@@ -66,33 +67,29 @@ ALL: $(libbuild_dir)/$(LIB_TRACE) $(binbuild_dir)/$(PGM_PRINT) $(binbuild_dir)/$
+
+ $(libbuild_dir)/$(LIB_TRACE): $(LOBJ)
+ if [ "$(EXPORT_SYMBOLS)" = "yes" ] ; then \
+- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \
++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \
+ -export-symbols $(srcdir)/JavaTraceInput.sym \
+ -rpath $(libbuild_dir) ; \
+ else \
+- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \
++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \
+ -rpath $(libbuild_dir) ; \
+ fi
+- $(LIBTOOL) --mode=install $(INSTALL) $(LIB_TRACE) $(libbuild_dir)
+- $(LIBTOOL) --finish $(libbuild_dir)
+
+ INSTALL_LIBSO: $(LOBJ)
+ if [ "$(EXPORT_SYMBOLS)" = "yes" ] ; then \
+- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \
++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \
+ -export-symbols $(srcdir)/JavaTraceInput.sym \
+ -rpath $(LIBDIR) ; \
+ else \
+- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \
++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \
+ -rpath $(LIBDIR) ; \
+ fi
+- $(LIBTOOL) --mode=install $(INSTALL) $(LIB_TRACE) $(DESTDIR)$(LIBDIR)
+- $(LIBTOOL) --finish $(LIBDIR)
+
+ $(binbuild_dir)/$(PGM_PRINT): $(OBJ4T)
+- $(CC) @COPTS@ -o $@ $(OBJ4T) $(MEMLIBS)
++ $(CC) @COPTS@ $(LDFLAGS) -o $@ $(OBJ4T) $(MEMLIBS)
+
+ $(binbuild_dir)/$(PGM_CHECK): $(OBJ4E)
+- $(CC) @COPTS@ -o $@ $(OBJ4E) $(MEMLIBS)
++ $(CC) @COPTS@ $(LDFLAGS) -o $@ $(OBJ4E) $(MEMLIBS)
+
+ clean:
+ @-$(RM) *.@OBJEXT@ *.lo *.la
+--
+1.7.1
+
diff --git a/sys-cluster/mpe2/files/slog2sdk-trace_sample-makefile-fixes.patch b/sys-cluster/mpe2/files/slog2sdk-trace_sample-makefile-fixes.patch
new file mode 100644
index 000000000000..717911ffb710
--- /dev/null
+++ b/sys-cluster/mpe2/files/slog2sdk-trace_sample-makefile-fixes.patch
@@ -0,0 +1,68 @@
+From b23d8d40cf62d03cad7ce777565069368e040a96 Mon Sep 17 00:00:00 2001
+From: Justin Bronder <jsbronder@gmail.com>
+Date: Mon, 13 Sep 2010 14:22:10 -0400
+Subject: [PATCH 2/2] slog2sdk/trace_sample makefile fixes
+
+- Respect user-defined LDFLAGS when linking PGM_PRINT and PGM_CHECK.
+- Do not install libraries during the compile phase.
+---
+ src/slog2sdk/trace_sample/src/Makefile.in | 19 ++++++++-----------
+ 1 files changed, 8 insertions(+), 11 deletions(-)
+
+diff --git a/src/slog2sdk/trace_sample/src/Makefile.in b/src/slog2sdk/trace_sample/src/Makefile.in
+index f716fff..8d3641a 100644
+--- a/src/slog2sdk/trace_sample/src/Makefile.in
++++ b/src/slog2sdk/trace_sample/src/Makefile.in
+@@ -48,7 +48,8 @@ RM = @RM@
+
+ JNI_INC = @JNI_INC@
+ CFLAGS = -I.. $(JNI_INC) -I$(TRACE_INCDIR) @COPTS@
+-LDFLAGS = -module -no-undefined -avoid-version @LDFLAGS@
++LDFLAGS = @LDFLAGS@
++LIBLDFLAGS = -module -no-undefined -avoid-version @LDFLAGS@
+
+ # memory leak checker
+ MEMLIBS = @DEBUG_LIBS@
+@@ -66,33 +67,29 @@ ALL: $(libbuild_dir)/$(LIB_TRACE) $(binbuild_dir)/$(PGM_PRINT) $(binbuild_dir)/$
+
+ $(libbuild_dir)/$(LIB_TRACE): $(LOBJ)
+ if [ "$(EXPORT_SYMBOLS)" = "yes" ] ; then \
+- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \
++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \
+ -export-symbols $(srcdir)/JavaTraceInput.sym \
+ -rpath $(libbuild_dir) ; \
+ else \
+- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \
++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \
+ -rpath $(libbuild_dir) ; \
+ fi
+- $(LIBTOOL) --mode=install $(INSTALL) $(LIB_TRACE) $(libbuild_dir)
+- $(LIBTOOL) --finish $(libbuild_dir)
+
+ INSTALL_LIBSO: $(LOBJ)
+ if [ "$(EXPORT_SYMBOLS)" = "yes" ] ; then \
+- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \
++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \
+ -export-symbols $(srcdir)/JavaTraceInput.sym \
+ -rpath $(LIBDIR) ; \
+ else \
+- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \
++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \
+ -rpath $(LIBDIR) ; \
+ fi
+- $(LIBTOOL) --mode=install $(INSTALL) $(LIB_TRACE) $(DESTDIR)$(LIBDIR)
+- $(LIBTOOL) --finish $(LIBDIR)
+
+ $(binbuild_dir)/$(PGM_PRINT): $(OBJ4T)
+- $(CC) @COPTS@ -o $@ $(OBJ4T) $(MEMLIBS)
++ $(CC) @COPTS@ $(LDFLAGS) -o $@ $(OBJ4T) $(MEMLIBS)
+
+ $(binbuild_dir)/$(PGM_CHECK): $(OBJ4E)
+- $(CC) @COPTS@ -o $@ $(OBJ4E) $(MEMLIBS)
++ $(CC) @COPTS@ $(LDFLAGS) -o $@ $(OBJ4E) $(MEMLIBS)
+
+ clean:
+ @-$(RM) *.@OBJEXT@ *.lo *.la
+--
+1.7.1
+
diff --git a/sys-cluster/mpe2/metadata.xml b/sys-cluster/mpe2/metadata.xml
new file mode 100644
index 000000000000..15c9c45ab1a5
--- /dev/null
+++ b/sys-cluster/mpe2/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cluster</herd>
+ <maintainer>
+ <email>jsbronder@gentoo.org</email>
+ <name>Justin Bronder</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-cluster/mpe2/mpe2-1.0.6_p1-r1.ebuild b/sys-cluster/mpe2/mpe2-1.0.6_p1-r1.ebuild
new file mode 100644
index 000000000000..9ae1133b00c4
--- /dev/null
+++ b/sys-cluster/mpe2/mpe2-1.0.6_p1-r1.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+FORTRAN_NEEDED=fortran
+
+inherit eutils fortran-2 java-utils-2 toolchain-funcs
+
+MY_P=${P/_/}
+DESCRIPTION="MPI development tools"
+HOMEPAGE="http://www-unix.mcs.anl.gov/perfvis/download/index.htm"
+SRC_URI="ftp://ftp.mcs.anl.gov/pub/mpi/${PN%2}/${MY_P}.tar.gz"
+
+LICENSE="mpich2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="minimal fortran threads debug"
+
+COMMON_DEPEND="!minimal? ( x11-libs/libXtst
+ x11-libs/libXi )
+ || ( sys-cluster/openmpi[fortran?,threads?]
+ sys-cluster/mpich2[fortran?,threads?] )"
+
+DEPEND="!minimal? ( >=virtual/jdk-1.4 )
+ ${COMMON_DEPEND}"
+
+RDEPEND="
+!minimal? ( >=virtual/jre-1.4 )
+ ${COMMON_DEPEND}"
+
+S="${WORKDIR}"/${MY_P}
+MPE_IMP=""
+
+# README:
+# This ebuild is created to handle building with both mpich2 and openmpi.
+# However, without empi (in the science overlay), and some further
+# conversion to use mpi.eclass, we can only handle one implementation
+# at a time. I still believe it's better to have the ebuild setup
+# correctly in preperation.
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ local i
+
+ if has_version sys-cluster/openmpi; then
+ MPE_IMP=openmpi
+ elif has_version sys-cluster/mpich2; then
+ MPE_IMP=mpich2
+ else
+ die "Unknown MPI implementation"
+ fi
+
+ export JFLAGS="${JFLAGS} $(java-pkg_javac-args)"
+
+ if [[ "${MPE_IMP}" == openmpi ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then
+ echo
+ elog "Currently src_test fails on collchk with openmpi, hence"
+ elog "testing is disabled by default. If you would like to"
+ elog "force testing, please add MPE_FORCE_OPENMPI_TEST=1"
+ elog "to your environment."
+ echo
+ fi
+
+ einfo "Building with support for: sys-cluster/${MPE_IMP}"
+}
+
+src_prepare() {
+ # Don't assume path contains ./
+ sed -i 's,\($MPERUN\) $pgm,\1 ./$pgm,' sbin/mpetestexeclog.in
+ epatch "${FILESDIR}"/slog2sdk-trace_rlog-makefile-fixes.patch
+ epatch "${FILESDIR}"/slog2sdk-trace_sample-makefile-fixes.patch
+}
+
+src_configure() {
+ local c="--with-mpicc=/usr/bin/mpicc"
+
+ if use fortran; then
+ c="${c} --with-mpif77=/usr/bin/mpif77"
+ else
+ c="${c} --disable-f77"
+ fi
+
+ if use minimal; then
+ c="${c} --enable-slog2=no --disable-rlog --disable-sample"
+ else
+ c="${c} --with-java2=$(java-config --jdk-home) --enable-slog2=build"
+ fi
+
+ if [[ "${MPE_IMP}" == openmpi ]]; then
+ c="${c} --disable-rlog --disable-sample"
+ fi
+
+ econf ${c} \
+ --sysconfdir=/etc/${PN} \
+ --datadir=/usr/share/${PN} \
+ --with-htmldir=/usr/share/${PN} \
+ --with-docdir=/usr/share/${PN} \
+ --enable-collchk \
+ --enable-wrappers \
+ $(use_enable !minimal graphics) \
+ $(use_enable threads threadlogging) \
+ $(use_enable debug g)
+}
+
+src_test() {
+ local rc
+
+ cd "${S}"
+ if [[ "${MPE_IMP}" == mpich2 ]]; then
+ echo "MPD_SECRETWORD=junk" > "${T}"/mpd.conf
+ chmod 600 "${T}"/mpd.conf
+ export MPD_CONF_FILE="${T}/mpd.conf"
+ "${ROOT}"usr/bin/mpd -d --pidfile="${T}"/mpd.pid
+ elif [[ "${MPE_IMP}" == openmpi* ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then
+ elog
+ elog "Skipping tests for openmpi"
+ elog
+ return 0
+ fi
+
+ # No parallel make:
+ # http://trac.mcs.anl.gov/projects/mpich2/ticket/1095#comment:1
+ emake -j1 \
+ CC="${S}"/bin/mpecc \
+ FC="${S}"/bin/mpefc \
+ MPERUN="${ROOT}/usr/bin/mpiexec -n 4" \
+ CLOG2TOSLOG2="${S}/src/slog2sdk/bin/clog2TOslog2" \
+ check;
+ rc=${?}
+ if [[ "${MPE_IMP}" == mpich2 ]]; then
+ "${ROOT}"usr/bin/mpdallexit || kill $(<"${T}"/mpd.pid)
+ fi
+
+ return ${rc}
+}
+
+src_install() {
+ # No parallel make:
+ # http://trac.mcs.anl.gov/projects/mpich2/ticket/1095#comment:1
+ emake -j1 DESTDIR="${D}" install || die
+ rm -f "${D}"/usr/sbin/mpeuninstall || die
+}
diff --git a/sys-cluster/mpe2/mpe2-1.0.6_p1-r2.ebuild b/sys-cluster/mpe2/mpe2-1.0.6_p1-r2.ebuild
new file mode 100644
index 000000000000..6cda3da58c41
--- /dev/null
+++ b/sys-cluster/mpe2/mpe2-1.0.6_p1-r2.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+FORTRAN_NEEDED=fortran
+
+inherit eutils fortran-2 java-pkg-opt-2 toolchain-funcs
+
+MY_P=${P/_/}
+DESCRIPTION="MPI development tools"
+HOMEPAGE="http://www-unix.mcs.anl.gov/perfvis/download/index.htm"
+SRC_URI="ftp://ftp.mcs.anl.gov/pub/mpi/${PN%2}/${MY_P}.tar.gz"
+
+LICENSE="mpich2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="minimal fortran threads debug"
+
+COMMON_DEPEND="!minimal? ( x11-libs/libXtst
+ x11-libs/libXi )
+ || ( sys-cluster/openmpi[fortran?,threads?]
+ sys-cluster/mpich2[fortran?,threads?] )"
+
+DEPEND="!minimal? ( >=virtual/jdk-1.6 )
+ ${COMMON_DEPEND}"
+
+RDEPEND="
+!minimal? ( >=virtual/jre-1.6 )
+ ${COMMON_DEPEND}"
+
+S="${WORKDIR}"/${MY_P}
+MPE_IMP=""
+
+# README:
+# This ebuild is created to handle building with both mpich2 and openmpi.
+# However, without empi (in the science overlay), and some further
+# conversion to use mpi.eclass, we can only handle one implementation
+# at a time. I still believe it's better to have the ebuild setup
+# correctly in preperation.
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ local i
+
+ if has_version sys-cluster/openmpi; then
+ MPE_IMP=openmpi
+ elif has_version sys-cluster/mpich2; then
+ MPE_IMP=mpich2
+ else
+ die "Unknown MPI implementation"
+ fi
+
+ export JFLAGS="${JFLAGS} $(java-pkg_javac-args)"
+
+ if [[ "${MPE_IMP}" == openmpi ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then
+ echo
+ elog "Currently src_test fails on collchk with openmpi, hence"
+ elog "testing is disabled by default. If you would like to"
+ elog "force testing, please add MPE_FORCE_OPENMPI_TEST=1"
+ elog "to your environment."
+ echo
+ fi
+
+ einfo "Building with support for: sys-cluster/${MPE_IMP}"
+
+ if ! minimal; then
+ java-pkg-opt-2_pkg_setup
+ fi
+}
+
+src_prepare() {
+ # Don't assume path contains ./
+ sed -i 's,\($MPERUN\) $pgm,\1 ./$pgm,' sbin/mpetestexeclog.in
+ epatch "${FILESDIR}"/slog2sdk-trace_rlog-makefile-fixes.patch
+ epatch "${FILESDIR}"/slog2sdk-trace_sample-makefile-fixes.patch
+
+ if ! minimal; then
+ java-pkg-opt-2_src_prepare
+ fi
+}
+
+src_configure() {
+ local c="--with-mpicc=/usr/bin/mpicc"
+
+ if use fortran; then
+ c="${c} --with-mpif77=/usr/bin/mpif77"
+ else
+ c="${c} --disable-f77"
+ fi
+
+ if use minimal; then
+ c="${c} --enable-slog2=no --disable-rlog --disable-sample"
+ else
+ c="${c} --with-java2=$(java-config --jdk-home) --enable-slog2=build"
+ fi
+
+ if [[ "${MPE_IMP}" == openmpi ]]; then
+ c="${c} --disable-rlog --disable-sample"
+ fi
+
+ econf ${c} \
+ --sysconfdir=/etc/${PN} \
+ --datadir=/usr/share/${PN} \
+ --with-htmldir=/usr/share/${PN} \
+ --with-docdir=/usr/share/${PN} \
+ --enable-collchk \
+ --enable-wrappers \
+ $(use_enable !minimal graphics) \
+ $(use_enable threads threadlogging) \
+ $(use_enable debug g)
+}
+
+src_test() {
+ local rc
+
+ cd "${S}"
+ if [[ "${MPE_IMP}" == mpich2 ]]; then
+ echo "MPD_SECRETWORD=junk" > "${T}"/mpd.conf
+ chmod 600 "${T}"/mpd.conf
+ export MPD_CONF_FILE="${T}/mpd.conf"
+ "${ROOT}"usr/bin/mpd -d --pidfile="${T}"/mpd.pid
+ elif [[ "${MPE_IMP}" == openmpi* ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then
+ elog
+ elog "Skipping tests for openmpi"
+ elog
+ return 0
+ fi
+
+ # No parallel make:
+ # http://trac.mcs.anl.gov/projects/mpich2/ticket/1095#comment:1
+ emake -j1 \
+ CC="${S}"/bin/mpecc \
+ FC="${S}"/bin/mpefc \
+ MPERUN="${ROOT}/usr/bin/mpiexec -n 4" \
+ CLOG2TOSLOG2="${S}/src/slog2sdk/bin/clog2TOslog2" \
+ check;
+ rc=${?}
+ if [[ "${MPE_IMP}" == mpich2 ]]; then
+ "${ROOT}"usr/bin/mpdallexit || kill $(<"${T}"/mpd.pid)
+ fi
+
+ return ${rc}
+}
+
+src_install() {
+ # No parallel make:
+ # http://trac.mcs.anl.gov/projects/mpich2/ticket/1095#comment:1
+ emake -j1 DESTDIR="${D}" install || die
+ rm -f "${D}"/usr/sbin/mpeuninstall || die
+}
diff --git a/sys-cluster/mpe2/mpe2-1.0.6_p1.ebuild b/sys-cluster/mpe2/mpe2-1.0.6_p1.ebuild
new file mode 100644
index 000000000000..76d6bf0033c8
--- /dev/null
+++ b/sys-cluster/mpe2/mpe2-1.0.6_p1.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+FORTRAN_NEEDED=fortran
+
+inherit eutils fortran-2 java-utils-2 toolchain-funcs
+
+MY_P=${P/_/}
+DESCRIPTION="MPI development tools"
+HOMEPAGE="http://www-unix.mcs.anl.gov/perfvis/download/index.htm"
+SRC_URI="ftp://ftp.mcs.anl.gov/pub/mpi/${PN%2}/${MY_P}.tar.gz"
+
+LICENSE="mpich2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="minimal fortran threads debug"
+
+COMMON_DEPEND="!minimal? ( x11-libs/libXtst
+ x11-libs/libXi )
+ || ( sys-cluster/openmpi[fortran?,threads?]
+ sys-cluster/mpich2[fortran?,threads?] )"
+
+DEPEND="!minimal? ( >=virtual/jdk-1.4 )
+ ${COMMON_DEPEND}"
+
+RDEPEND="
+!minimal? ( >=virtual/jre-1.4 )
+ ${COMMON_DEPEND}"
+
+S="${WORKDIR}"/${MY_P}
+MPE_IMP=""
+
+# README:
+# This ebuild is created to handle building with both mpich2 and openmpi.
+# However, without empi (in the science overlay), and some further
+# conversion to use mpi.eclass, we can only handle one implementation
+# at a time. I still believe it's better to have the ebuild setup
+# correctly in preperation.
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ local i
+
+ if has_version sys-cluster/openmpi; then
+ MPE_IMP=openmpi
+ elif has_version sys-cluster/mpich2; then
+ MPE_IMP=mpich2
+ else
+ die "Unknown MPI implementation"
+ fi
+
+ export JFLAGS="${JFLAGS} $(java-pkg_javac-args)"
+
+ if [[ "${MPE_IMP}" == openmpi ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then
+ echo ""
+ elog "Currently src_test fails on collchk with openmpi, hence"
+ elog "testing is disabled by default. If you would like to"
+ elog "force testing, please add MPE_FORCE_OPENMPI_TEST=1"
+ elog "to your environment."
+ echo ""
+ fi
+
+ einfo "Building with support for: sys-cluster/${MPE_IMP}"
+}
+
+src_prepare() {
+ # Don't assume path contains ./
+ sed -i 's,\($MPERUN\) $pgm,\1 ./$pgm,' sbin/mpetestexeclog.in
+}
+
+src_configure() {
+ local c="--with-mpicc=/usr/bin/mpicc"
+
+ if use fortran; then
+ c="${c} --with-mpif77=/usr/bin/mpif77"
+ else
+ c="${c} --disable-f77"
+ fi
+
+ if use minimal; then
+ c="${c} --enable-slog2=no --disable-rlog --disable-sample"
+ else
+ c="${c} --with-java2=$(java-config --jdk-home) --enable-slog2=build"
+ fi
+
+ if [[ "${MPE_IMP}" == openmpi ]]; then
+ c="${c} --disable-rlog --disable-sample"
+ fi
+
+ econf ${c} \
+ --sysconfdir=/etc/${PN} \
+ --datadir=/usr/share/${PN} \
+ --with-htmldir=/usr/share/${PN} \
+ --with-docdir=/usr/share/${PN} \
+ --enable-collchk \
+ --enable-wrappers \
+ $(use_enable !minimal graphics) \
+ $(use_enable threads threadlogging) \
+ $(use_enable debug g)
+}
+
+src_test() {
+ local rc
+
+ cd "${S}"
+ if [[ "${MPE_IMP}" == mpich2 ]]; then
+ echo "MPD_SECRETWORD=junk" > "${T}"/mpd.conf
+ chmod 600 "${T}"/mpd.conf
+ export MPD_CONF_FILE="${T}/mpd.conf"
+ "${ROOT}"usr/bin/mpd -d --pidfile="${T}"/mpd.pid
+ elif [[ "${MPE_IMP}" == openmpi* ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then
+ echo
+ elog "Skipping tests for openmpi"
+ echo
+ return 0
+ fi
+
+ # No parallel make:
+ # http://trac.mcs.anl.gov/projects/mpich2/ticket/1095#comment:1
+ emake -j1 \
+ CC="${S}"/bin/mpecc \
+ FC="${S}"/bin/mpefc \
+ MPERUN="${ROOT}/usr/bin/mpiexec -n 4" \
+ CLOG2TOSLOG2="${S}/src/slog2sdk/bin/clog2TOslog2" \
+ check;
+ rc=${?}
+ if [[ "${MPE_IMP}" == mpich2 ]]; then
+ "${ROOT}"usr/bin/mpdallexit || kill $(<"${T}"/mpd.pid)
+ fi
+
+ return ${rc}
+}
+
+src_install() {
+ # No parallel make:
+ # http://trac.mcs.anl.gov/projects/mpich2/ticket/1095#comment:1
+ emake -j1 DESTDIR="${D}" install || die
+ rm -f "${D}"/usr/sbin/mpeuninstall || die
+}