public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Justin Lecher" <jlec@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/mpe2/
Date: Tue, 29 Dec 2015 10:02:03 +0000 (UTC)	[thread overview]
Message-ID: <1451383313.95fcaf6d3573b7391c2218282f0705ea80fc338f.jlec@gentoo> (raw)

commit:     95fcaf6d3573b7391c2218282f0705ea80fc338f
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 29 10:00:42 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Dec 29 10:01:53 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95fcaf6d

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 <AT> gentoo.org>

 sys-cluster/mpe2/mpe2-1.0.6_p1-r2.ebuild | 67 +++++++++++++++++---------------
 1 file 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 8c657851..4a80f4a 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
 }


             reply	other threads:[~2015-12-29 10:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-29 10:02 Justin Lecher [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-06-11  0:29 [gentoo-commits] repo/gentoo:master commit in: sys-cluster/mpe2/ Sam James
2016-06-01 23:06 Justin Bronder
2016-01-06 15:07 Justin Lecher
2016-01-06 13:34 Agostino Sarubbo
2015-12-29 11:04 Agostino Sarubbo
2015-12-29 10:02 Justin Lecher
2015-10-19  6:56 Patrice Clement

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1451383313.95fcaf6d3573b7391c2218282f0705ea80fc338f.jlec@gentoo \
    --to=jlec@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox