summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2015-12-29 11:00:42 +0100
committerJustin Lecher <jlec@gentoo.org>2015-12-29 11:01:53 +0100
commit95fcaf6d3573b7391c2218282f0705ea80fc338f (patch)
tree5006101f9013074df3212c7700a2d344b7276341 /sys-cluster
parentsys-cluster/mpe2: Use einfo for information (diff)
downloadgentoo-95fcaf6d3573b7391c2218282f0705ea80fc338f.tar.gz
gentoo-95fcaf6d3573b7391c2218282f0705ea80fc338f.tar.bz2
gentoo-95fcaf6d3573b7391c2218282f0705ea80fc338f.zip
sys-cluster/mpe2: QA work
* missing die * ebuild code formating * sort IUSE * use default() Package-Manager: portage-2.2.26 Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'sys-cluster')
-rw-r--r--sys-cluster/mpe2/mpe2-1.0.6_p1-r2.ebuild67
1 files changed, 36 insertions, 31 deletions
diff --git a/sys-cluster/mpe2/mpe2-1.0.6_p1-r2.ebuild b/sys-cluster/mpe2/mpe2-1.0.6_p1-r2.ebuild
index 8c657851d24a..4a80f4a948b0 100644
--- a/sys-cluster/mpe2/mpe2-1.0.6_p1-r2.ebuild
+++ b/sys-cluster/mpe2/mpe2-1.0.6_p1-r2.ebuild
@@ -9,6 +9,7 @@ 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"
@@ -16,18 +17,24 @@ 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 )
+IUSE="debug minimal fortran threads"
+
+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 )
+ !minimal? ( >=virtual/jre-1.6 )
${COMMON_DEPEND}"
S="${WORKDIR}"/${MY_P}
@@ -48,6 +55,8 @@ pkg_setup() {
MPE_IMP=openmpi
elif has_version sys-cluster/mpich2; then
MPE_IMP=mpich2
+ elif has_version sys-cluster/mpich; then
+ MPE_IMP=mpich2
else
die "Unknown MPI implementation"
fi
@@ -65,40 +74,35 @@ pkg_setup() {
einfo "Building with support for: sys-cluster/${MPE_IMP}"
- if ! use minimal; then
- java-pkg-opt-2_pkg_setup
- fi
+ use minimal || java-pkg-opt-2_pkg_setup
}
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
+ sed -i 's,\($MPERUN\) $pgm,\1 ./$pgm,' sbin/mpetestexeclog.in || die
+ epatch \
+ "${FILESDIR}"/slog2sdk-trace_rlog-makefile-fixes.patch \
+ "${FILESDIR}"/slog2sdk-trace_sample-makefile-fixes.patch
- if ! use minimal; then
- java-pkg-opt-2_src_prepare
- fi
+ use minimal || java-pkg-opt-2_src_prepare
}
src_configure() {
local c="--with-mpicc=/usr/bin/mpicc"
if use fortran; then
- c="${c} --with-mpif77=/usr/bin/mpif77"
+ c+=" --with-mpif77=/usr/bin/mpif77"
else
- c="${c} --disable-f77"
+ c+=" --disable-f77"
fi
if use minimal; then
- c="${c} --enable-slog2=no --disable-rlog --disable-sample"
+ c+=" --enable-slog2=no --disable-rlog --disable-sample"
else
- c="${c} --with-java2=$(java-config --jdk-home) --enable-slog2=build"
+ c+=" --with-java2=$(java-config --jdk-home) --enable-slog2=build"
fi
- if [[ "${MPE_IMP}" == openmpi ]]; then
- c="${c} --disable-rlog --disable-sample"
- fi
+ [[ "${MPE_IMP}" == openmpi ]] && c+=" --disable-rlog --disable-sample"
econf ${c} \
--sysconfdir=/etc/${PN} \
@@ -115,12 +119,12 @@ src_configure() {
src_test() {
local rc
- cd "${S}"
+ cd "${S}" || die
if [[ "${MPE_IMP}" == mpich2 ]]; then
- echo "MPD_SECRETWORD=junk" > "${T}"/mpd.conf
- chmod 600 "${T}"/mpd.conf
+ echo "MPD_SECRETWORD=junk" > "${T}"/mpd.conf || die
+ chmod 600 "${T}"/mpd.conf || die
export MPD_CONF_FILE="${T}/mpd.conf"
- "${ROOT}"usr/bin/mpd -d --pidfile="${T}"/mpd.pid
+ "${ROOT}"usr/bin/mpd -d --pidfile="${T}"/mpd.pid || die
elif [[ "${MPE_IMP}" == openmpi* ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then
echo
einfo "Skipping tests for openmpi"
@@ -147,6 +151,7 @@ src_test() {
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
+ MAKEOPTS+=" -j1"
+ default
+ rm -f "${ED}"/usr/sbin/mpeuninstall || die
}