summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bronder <jsbronder@gentoo.org>2012-03-07 01:28:34 +0000
committerJustin Bronder <jsbronder@gentoo.org>2012-03-07 01:28:34 +0000
commit1a1779e35631f1000ac307cad1e566ecab77ce5e (patch)
treeb67c2355b678b982bd39c2bc16fedd28eca76e40 /sys-cluster
parentMore strict block to force uninstall of not compliant scp-gnome, add pycurl d... (diff)
downloadhistorical-1a1779e35631f1000ac307cad1e566ecab77ce5e.tar.gz
historical-1a1779e35631f1000ac307cad1e566ecab77ce5e.tar.bz2
historical-1a1779e35631f1000ac307cad1e566ecab77ce5e.zip
Version bump, fix #393361, EAPI 4, fortran update.
Package-Manager: portage-2.1.10.11/cvs/Linux x86_64
Diffstat (limited to 'sys-cluster')
-rw-r--r--sys-cluster/mpich2/ChangeLog8
-rw-r--r--sys-cluster/mpich2/Manifest12
-rw-r--r--sys-cluster/mpich2/files/mpich2-1.4.1-fix-pkg-config-files.patch119
-rw-r--r--sys-cluster/mpich2/files/mpich2-hvector.patch63
-rw-r--r--sys-cluster/mpich2/mpich2-1.4.1_p1.ebuild165
5 files changed, 362 insertions, 5 deletions
diff --git a/sys-cluster/mpich2/ChangeLog b/sys-cluster/mpich2/ChangeLog
index 5abee19f2caa..1ecf881240ab 100644
--- a/sys-cluster/mpich2/ChangeLog
+++ b/sys-cluster/mpich2/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-cluster/mpich2
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpich2/ChangeLog,v 1.74 2012/01/12 02:11:50 jsbronder Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpich2/ChangeLog,v 1.75 2012/03/07 01:28:34 jsbronder Exp $
+
+*mpich2-1.4.1_p1 (07 Mar 2012)
+
+ 07 Mar 2012; Justin Bronder <jsbronder@gentoo.org> +mpich2-1.4.1_p1.ebuild,
+ +files/mpich2-hvector.patch, +files/mpich2-1.4.1-fix-pkg-config-files.patch:
+ Version bump, fix #393361, EAPI 4, fortran update.
12 Jan 2012; Justin Bronder <jsbronder@gentoo.org> mpich2-1.4_rc2-r1.ebuild,
+files/mpich2-1.4_rc2-fix-pkg-config-files.patch:
diff --git a/sys-cluster/mpich2/Manifest b/sys-cluster/mpich2/Manifest
index adcb6824c8c0..5d6e167d375f 100644
--- a/sys-cluster/mpich2/Manifest
+++ b/sys-cluster/mpich2/Manifest
@@ -13,18 +13,22 @@ AUX mpich2-1.0.8-pkgconfig.patch 928 RMD160 5ce7a800423f250dba0dd69560abebf845e7
AUX mpich2-1.0.8-py26.patch 1341 RMD160 51d9b6ebb1fcce06cabb7ef201ffefcd97e39e3e SHA1 1a7db4a10ef6916f1ab98a38ce3c0de9f1c05725 SHA256 43dfaa60a2822728eae874dc423563aac1e658873702858b5bef237577270331
AUX mpich2-1.0.8-site-packages-py.patch 7534 RMD160 93b2cab20620da379615eaf3bfc7279384987722 SHA1 706313c20e1d4d6a4a060c8ac36befdb5ee3b926 SHA256 a857e7c0effa7cdd62c1bc1bd054b4746764246410062d373e7e0892bcd20df8
AUX mpich2-1.2.1-fix-missing-libs.patch 1825 RMD160 aec1251aa66f0d63c5848920c63339d5558a0f61 SHA1 d70695c63d891a32a98324ffd236f8751465fe98 SHA256 f645d00fc6adeef553517078dcc3313cbabfbf8069ad5a76e2570d183b2d824b
+AUX mpich2-1.4.1-fix-pkg-config-files.patch 5217 RMD160 5d80259379276e57fbf0f342ec1023aa8c339ba5 SHA1 7e97656f030c7f8b512b050592ccba775ac57806 SHA256 fa8c48e38725432f944c1a4d09238a31338c40dcdca1a0273f9ebc44e2392c44
AUX mpich2-1.4_rc2-fix-pkg-config-files.patch 5435 RMD160 fc0b546a7a4d3a9d9a7611a4f9400f0a6be57ce8 SHA1 66f8e6570133ffcb0501abf4e81729cea96cca95 SHA256 ee74f05f221abea43f13c652fc26bc70e8e537959c065e9a7366ccfadc8955b7
+AUX mpich2-hvector.patch 2011 RMD160 1abb8e8872fd7eb4e0c22ca5c499e8dce475a8c0 SHA1 ebf8a0cabb9e3debf0a0d55a736f23880b91a995 SHA256 c6e7b522f1dd6d7a4936e44fc63bebefbdb1d6d6138b07cddc35609057b6ca34
AUX mpich2.envd 45 RMD160 e29a0d617bbc15cc42d3088f8a79c1c715b353fa SHA1 765b885d0e1d65fe7ba845cf72e3e923613d6514 SHA256 d6f128f84e1d015922af42e1280586b84737740b2517cc0b35f498b571f252f9
DIST mpich2-1.2.1p1.tar.gz 18014859 RMD160 810cc486b65e4bcf977ac8d96ccbbcea87e0cbaa SHA1 26bd5620b45bc654aa3945755d11450be63d650c SHA256 a55d1682ee0b5ebbacc047f60620ed291e0a9b3ded3eaeb6a2c81a1598c4c964
+DIST mpich2-1.4.1p1.tar.gz 19502854 RMD160 1d355cc07b8675af77b1c255fd10696844447298 SHA1 8dcc8888fb27232eb8f76c11cc890f1c3c483804 SHA256 a20f798ceaad6b0161ddecac98623b65d6a4033072f39ced13b9043916e3d1ee
DIST mpich2-1.4rc2.tar.gz 19764158 RMD160 2d5cbac33cd728ba0fb6b74d2fcd7f166f1bfc1e SHA1 53afd67e0527e0c1459330d70d7077a1da52fe0f SHA256 820fc929bd349a9b4e6ce4a2fa5e3b88b3abf6941a147f6921e3ab44f4a6015a
EBUILD mpich2-1.2.1_p1-r1.ebuild 4896 RMD160 7bb408b5c713a224e47813c4e5076e9ce1734b7c SHA1 93b8e8fe86e9be52e27af0d15723980f67549601 SHA256 2f6eb4954a003074a4ef3aa278123c89e792cb6c96f37f50bb8be0d1f8954d66
+EBUILD mpich2-1.4.1_p1.ebuild 4617 RMD160 921d0bfde7085b776d7b4fe9a9c2812e934fb70c SHA1 8dcf823a65b1488d83861f1cfb5ecf8f08f63ea1 SHA256 10500f2b6ab2b72de083de34a3df81c51773cc4707085da00986dd851e5122f4
EBUILD mpich2-1.4_rc2-r1.ebuild 3902 RMD160 a3faa9438d15dc94e1d99587cde602c122d07028 SHA1 bb856aad68d8a2cb66b5b92b5702576202fdfbf3 SHA256 a08e80d1c5c576cb252036d9f581d0b082e85f1060ed75849b9661687c82ab24
-MISC ChangeLog 14393 RMD160 cbd63870bbf1e0ac8affcb2f8f003b2193d082f0 SHA1 3a7200c1f62436ff732d2c6e2eb192ba3d174ed5 SHA256 98d8e80ec1a6b8a002d64bf218b52f76f78a1629c54644ddbb537a32248578c7
+MISC ChangeLog 14636 RMD160 5d79374c1f534d864b55a3fe1559f83915f9d91e SHA1 6407c15c9ab426bdc067d0d1c55d62ef3cef7cdb SHA256 2ef1da77f382f1eea15ac2973208123dc0ff8d54c3d644f105f471ade80e9f71
MISC metadata.xml 420 RMD160 930e2ff21815f000e213b80bb98074dd7594bafb SHA1 7ef0b850e21959933db71dfa8c57ff9349e37762 SHA256 c6dfa7e480cb95bb9b6bcb3fdbb89836795f8872ff9b098de85ec6e9ec0a1c34
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iEYEARECAAYFAk8OQXIACgkQ4MrvBE1wQ8nd5gCfb5iq1UqgLw6trNTSlIXRgtOu
-j8QAoIjHIOAK3+o3fOXdVoFUby47uqIN
-=ePaS
+iEYEARECAAYFAk9WuccACgkQ4MrvBE1wQ8ms2QCcCOPgf0Vsi/OJBpIo5euhhw8V
+phEAnjGDK8IaGyBtPaC4nDhLA7qz6lWy
+=M5Zw
-----END PGP SIGNATURE-----
diff --git a/sys-cluster/mpich2/files/mpich2-1.4.1-fix-pkg-config-files.patch b/sys-cluster/mpich2/files/mpich2-1.4.1-fix-pkg-config-files.patch
new file mode 100644
index 000000000000..d9c311e31bb8
--- /dev/null
+++ b/sys-cluster/mpich2/files/mpich2-1.4.1-fix-pkg-config-files.patch
@@ -0,0 +1,119 @@
+From cba731049a24735beb660dc236f61070aa6e387a Mon Sep 17 00:00:00 2001
+From: Justin Bronder <jsbronder@gmail.com>
+Date: Thu, 5 Jan 2012 22:20:31 -0500
+Subject: [PATCH] fix pkg config files
+
+Conditionals are not supported.
+https://trac.mcs.anl.gov/projects/mpich2/ticket/1044
+---
+ configure.in | 6 ++++++
+ src/packaging/pkgconfig/mpich2-c.pc.in | 8 +-------
+ src/packaging/pkgconfig/mpich2-cxx.pc.in | 8 +-------
+ src/packaging/pkgconfig/mpich2-f77.pc.in | 8 +-------
+ src/packaging/pkgconfig/mpich2-f90.pc.in | 8 +-------
+ 5 files changed, 10 insertions(+), 28 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 294dc85..44b1010 100644
+--- a/configure.in
++++ b/configure.in
+@@ -5332,6 +5332,12 @@ AC_SUBST(MPICH_TIMER_KIND)
+ # Setup other replaceable values
+ AC_SUBST(MPILIBNAME)
+ AC_SUBST(PMPILIBNAME)
++PKGCONFIG_PMPILIB=""
++if test "$NEEDSPLIB" = yes -a test -n "${PMPILIBNAME}" ; then
++ PKGCONFIG_PMPILIB="-l${PMPILIBNAME}"
++fi
++AC_SUBST(PKGCONFIG_PMPILIB)
++
+ # Note that aint_size must be used instead of void_p where the desired check
+ # is on the size of MPI_Aint
+ aint_size=$ac_cv_sizeof_void_p
+diff --git a/src/packaging/pkgconfig/mpich2-c.pc.in b/src/packaging/pkgconfig/mpich2-c.pc.in
+index 394630b..e0ab3fa 100644
+--- a/src/packaging/pkgconfig/mpich2-c.pc.in
++++ b/src/packaging/pkgconfig/mpich2-c.pc.in
+@@ -4,15 +4,9 @@ exec_prefix=@exec_prefix@
+ libdir=@libdir@
+ includedir=@includedir@
+
+-if test "@NEEDSPLIB@" = "yes" ; then
+- plib=@PMPILIBNAME@
+-else
+- plib=
+-fi
+-
+ Name: mpich2
+ Description: MPICH2 is an implementation of the Message-Passing Interface (MPI). The goals of MPICH2 are to provide an MPI implementation for important platforms, including clusters, SMPs, and massively parallel processors. It also provides a vehicle for MPI implementation research and for developing new and better parallel programming environments.
+ Version: @MPICH2_VERSION@
+ Requires:
+-Libs: @WRAPPER_LDFLAGS@ -L${libdir} -l${plib} -l@MPILIBNAME@ @WRAPPER_LIBS@
++Libs: @WRAPPER_LDFLAGS@ -L${libdir} @PKGCONFIG_PMPILIB@ -l@MPILIBNAME@ @WRAPPER_LIBS@
+ Cflags: @WRAPPER_CPPFLAGS@ @WRAPPER_CFLAGS@ -I${includedir}
+diff --git a/src/packaging/pkgconfig/mpich2-cxx.pc.in b/src/packaging/pkgconfig/mpich2-cxx.pc.in
+index 936ade6..d82e184 100644
+--- a/src/packaging/pkgconfig/mpich2-cxx.pc.in
++++ b/src/packaging/pkgconfig/mpich2-cxx.pc.in
+@@ -4,15 +4,9 @@ exec_prefix=@exec_prefix@
+ libdir=@libdir@
+ includedir=@includedir@
+
+-if test "@NEEDSPLIB@" = "yes" ; then
+- plib=@PMPILIBNAME@
+-else
+- plib=
+-fi
+-
+ Name: mpich2
+ Description: MPICH2 is an implementation of the Message-Passing Interface (MPI). The goals of MPICH2 are to provide an MPI implementation for important platforms, including clusters, SMPs, and massively parallel processors. It also provides a vehicle for MPI implementation research and for developing new and better parallel programming environments.
+ Version: @MPICH2_VERSION@
+ Requires:
+-Libs: @WRAPPER_LDFLAGS@ -L${libdir} -l${plib} -l@MPILIBNAME@ @WRAPPER_LIBS@
++Libs: @WRAPPER_LDFLAGS@ -L${libdir} @PKGCONFIG_PMPILIB@ -l@MPILIBNAME@ @WRAPPER_LIBS@
+ Cxxflags: @WRAPPER_CPPFLAGS@ @WRAPPER_CXXFLAGS@ -I${includedir}
+diff --git a/src/packaging/pkgconfig/mpich2-f77.pc.in b/src/packaging/pkgconfig/mpich2-f77.pc.in
+index 291462e..193c2ab 100644
+--- a/src/packaging/pkgconfig/mpich2-f77.pc.in
++++ b/src/packaging/pkgconfig/mpich2-f77.pc.in
+@@ -4,15 +4,9 @@ exec_prefix=@exec_prefix@
+ libdir=@libdir@
+ includedir=@includedir@
+
+-if test "@NEEDSPLIB@" = "yes" ; then
+- plib=@PMPILIBNAME@
+-else
+- plib=
+-fi
+-
+ Name: mpich2
+ Description: MPICH2 is an implementation of the Message-Passing Interface (MPI). The goals of MPICH2 are to provide an MPI implementation for important platforms, including clusters, SMPs, and massively parallel processors. It also provides a vehicle for MPI implementation research and for developing new and better parallel programming environments.
+ Version: @MPICH2_VERSION@
+ Requires:
+-Libs: @WRAPPER_LDFLAGS@ -L${libdir} -l${plib} -l@MPILIBNAME@ @WRAPPER_LIBS@
++Libs: @WRAPPER_LDFLAGS@ -L${libdir} @PKGCONFIG_PMPILIB@ -l@MPILIBNAME@ @WRAPPER_LIBS@
+ Fflags: @WRAPPER_FFLAGS@ -I${includedir}
+diff --git a/src/packaging/pkgconfig/mpich2-f90.pc.in b/src/packaging/pkgconfig/mpich2-f90.pc.in
+index ca15e18..700976f 100644
+--- a/src/packaging/pkgconfig/mpich2-f90.pc.in
++++ b/src/packaging/pkgconfig/mpich2-f90.pc.in
+@@ -4,15 +4,9 @@ exec_prefix=@exec_prefix@
+ libdir=@libdir@
+ includedir=@includedir@
+
+-if test "@NEEDSPLIB@" = "yes" ; then
+- plib=@PMPILIBNAME@
+-else
+- plib=
+-fi
+-
+ Name: mpich2
+ Description: MPICH2 is an implementation of the Message-Passing Interface (MPI). The goals of MPICH2 are to provide an MPI implementation for important platforms, including clusters, SMPs, and massively parallel processors. It also provides a vehicle for MPI implementation research and for developing new and better parallel programming environments.
+ Version: @MPICH2_VERSION@
+ Requires:
+-Libs: @WRAPPER_LDFLAGS@ -L${libdir} -l${plib} -l@MPILIBNAME@ @WRAPPER_LIBS@
++Libs: @WRAPPER_LDFLAGS@ -L${libdir} @PKGCONFIG_PMPILIB@ -l@MPILIBNAME@ @WRAPPER_LIBS@
+ Fcflags: @WRAPPER_FCFLAGS@ -I${includedir}
+--
+1.7.3.4
+
diff --git a/sys-cluster/mpich2/files/mpich2-hvector.patch b/sys-cluster/mpich2/files/mpich2-hvector.patch
new file mode 100644
index 000000000000..9d67561e3680
--- /dev/null
+++ b/sys-cluster/mpich2/files/mpich2-hvector.patch
@@ -0,0 +1,63 @@
+--- src/binding/f90/buildiface 2011-12-06 09:57:04.000000000 +0100
++++ src/binding/f90/buildiface 2011-12-06 09:57:54.000000000 +0100
+@@ -117,9 +117,13 @@
+ 'Type_hindexed-3' => 'int[]',
+ 'Type_indexed-2' => 'int[]',
+ 'Type_indexed-3' => 'int[]',
++ 'Type_hvector-3' => 'int',
+ 'Type_struct-2' => 'int[]',
+ 'Type_struct-3' => 'int[]',
+ 'Type_struct-4' => 'MPI_Datatype[]',
++ 'Type_extent-2' => 'int',
++ 'Type_lb-2' => 'int',
++ 'Type_ub-2' => 'int',
+ 'Waitall-2' => 'MPI_Request[]',
+ 'Waitall-3' => 'MPI_Status[]',
+ 'Waitany-2' => 'MPI_Request[]',
+--- src/binding/f90/mpi_base.f90.in 2011-12-06 09:58:42.000000000 +0100
++++ src/binding/f90/mpi_base.f90.in 2011-12-06 10:00:30.000000000 +0100
+@@ -15,9 +15,7 @@
+ END SUBROUTINE MPI_COMM_FREE_KEYVAL
+
+ SUBROUTINE MPI_TYPE_EXTENT(v0,v1,ierror)
+- USE MPI_CONSTANTS,ONLY:MPI_ADDRESS_KIND
+- INTEGER v0
+- INTEGER(KIND=MPI_ADDRESS_KIND) v1
++ INTEGER v0, v1
+ INTEGER ierror
+ END SUBROUTINE MPI_TYPE_EXTENT
+
+@@ -114,9 +112,7 @@
+ END SUBROUTINE MPI_OP_COMMUTATIVE
+
+ SUBROUTINE MPI_TYPE_LB(v0,v1,ierror)
+- USE MPI_CONSTANTS,ONLY:MPI_ADDRESS_KIND
+- INTEGER v0
+- INTEGER(KIND=MPI_ADDRESS_KIND) v1
++ INTEGER v0, v1
+ INTEGER ierror
+ END SUBROUTINE MPI_TYPE_LB
+
+@@ -562,9 +558,7 @@
+ END SUBROUTINE MPI_TYPE_CREATE_RESIZED
+
+ SUBROUTINE MPI_TYPE_UB(v0,v1,ierror)
+- USE MPI_CONSTANTS,ONLY:MPI_ADDRESS_KIND
+- INTEGER v0
+- INTEGER(KIND=MPI_ADDRESS_KIND) v1
++ INTEGER v0, v1
+ INTEGER ierror
+ END SUBROUTINE MPI_TYPE_UB
+
+@@ -822,10 +816,7 @@
+ END SUBROUTINE MPI_GET_VERSION
+
+ SUBROUTINE MPI_TYPE_HVECTOR(v0,v1,v2,v3,v4,ierror)
+- USE MPI_CONSTANTS,ONLY:MPI_ADDRESS_KIND
+- INTEGER v0, v1
+- INTEGER(KIND=MPI_ADDRESS_KIND) v2
+- INTEGER v3, v4
++ INTEGER v0, v1, v2, v3, v4
+ INTEGER ierror
+ END SUBROUTINE MPI_TYPE_HVECTOR
+
diff --git a/sys-cluster/mpich2/mpich2-1.4.1_p1.ebuild b/sys-cluster/mpich2/mpich2-1.4.1_p1.ebuild
new file mode 100644
index 000000000000..0a2701ef9c18
--- /dev/null
+++ b/sys-cluster/mpich2/mpich2-1.4.1_p1.ebuild
@@ -0,0 +1,165 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpich2/mpich2-1.4.1_p1.ebuild,v 1.1 2012/03/07 01:28:34 jsbronder Exp $
+
+EAPI=4
+
+inherit autotools eutils fortran-2 toolchain-funcs
+
+MY_PV=${PV/_/}
+DESCRIPTION="A high performance and portable MPI implementation"
+HOMEPAGE="http://www.mcs.anl.gov/research/projects/mpich2/index.php"
+SRC_URI="http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/${MY_PV}/${PN}-${MY_PV}.tar.gz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
+IUSE="+cxx debug doc fortran mpi-threads romio threads"
+
+COMMON_DEPEND="dev-libs/libaio
+ sys-apps/hwloc
+ romio? ( net-fs/nfs-utils )"
+
+DEPEND="${COMMON_DEPEND}
+ dev-lang/perl
+ sys-devel/libtool"
+
+RDEPEND="${COMMON_DEPEND}
+ fortran? ( virtual/fortran )
+ !sys-cluster/openmpi
+ !sys-cluster/lam-mpi"
+
+S="${WORKDIR}"/${PN}-${MY_PV}
+
+pkg_setup() {
+ if use fortran; then
+ FORTRAN_STANDARD="77 90"
+ fortran-2_pkg_setup
+ fi
+
+ if use mpi-threads && ! use threads; then
+ ewarn "mpi-threads requires threads, assuming that's what you want"
+ fi
+}
+
+src_prepare() {
+ # Cannot use bin/mpiexec as hydra is built by autotools and is
+ # a shell wrapped executable.
+ sed -i \
+ -e "s,@MPIEXEC@,${S}/src/pm/hydra/mpiexec.hydra,g" \
+ $(find ./test/ -name 'Makefile.in') || die
+
+ # #293665
+ # We could use MPICH2LIB_XFLAGS here and unset the cooresponding ones
+ # in the environment, however that's messy and doesn't for for LDFLAGS.
+ sed -i \
+ -e 's,\(.*=\ *\)"@WRAPPER_[A-Z]*FLAGS@",\1"",' \
+ src/env/*.in || die
+
+ # See
+ # http://lists.mcs.anl.gov/pipermail/mpich-discuss/2011-August/010680.html
+ # http://lists.mcs.anl.gov/pipermail/mpich-discuss/2011-August/010678.html
+ # and countless other sources pointing out the insanity.
+ sed -i \
+ -e 's|prefix=${DESTDIR}|prefix=|g' \
+ -e 's|dir=${DESTDIR}|dir=|g' \
+ Makefile.in || die
+
+ sed -i \
+ -e "s|prefix='\${DESTDIR}|prefix='|" \
+ -e "s|dir='\${DESTDIR}|dir='|" \
+ src/env/Makefile.in || die
+
+ # 369263 and 1500 upstream.
+ epatch "${FILESDIR}"/mpich2-1.4.1-fix-pkg-config-files.patch
+
+ # 393361, backport of r8809 upstream.
+ epatch "${FILESDIR}"/mpich2-hvector.patch
+
+ AT_M4DIR="${S}"/confdb eautoreconf || die
+}
+
+src_configure() {
+ local c="--enable-shared --disable-rpath"
+ local romio_conf
+
+ # The configure statements can be somewhat confusing, as they
+ # don't all show up in the top level configure, however, they
+ # are picked up in the children directories.
+
+ use debug && c="${c} --enable-g=dbg --enable-debuginfo"
+
+ if use mpi-threads; then
+ # MPI-THREAD requries threading.
+ c="${c} --with-thread-package=pthreads"
+ c="${c} --enable-threads=runtime"
+ else
+ if use threads ; then
+ c="${c} --with-thread-package=pthreads"
+ else
+ c="${c} --with-thread-package=none"
+ fi
+ c="${c} --enable-threads=single"
+ fi
+
+ c="${c} --sysconfdir=${EPREFIX}/etc/${PN}"
+ econf ${c} ${romio_conf} \
+ --docdir=/usr/share/doc/${PF} \
+ --with-pm=hydra \
+ --disable-mpe \
+ --with-hwloc-prefix="${EPREFIX}/usr" \
+ --disable-fast \
+ --enable-smpcoll \
+ $(use_enable romio) \
+ $(use_enable cxx) \
+ $(use_enable fortran f77) \
+ $(use_enable fortran fc)
+}
+
+src_compile() {
+ # Oh, the irony.
+ # http://wiki.mcs.anl.gov/mpich2/index.php/Frequently_Asked_Questions#Q:_The_build_fails_when_I_use_parallel_make.
+ # https://trac.mcs.anl.gov/projects/mpich2/ticket/711
+ emake -j1
+}
+
+src_test() {
+ # See #362655 and comments in the testlist files.
+ # large_message: only on machines with > 8gb of ram
+ # bcastlength: This is an extension to MPI that's not necessary
+ # non_zero_root: performance test
+ # Also note that I/O tests may fail on non-local filesystems.
+ sed -i '/^[# ]*large_message/d' test/mpi/pt2pt/testlist || die
+ sed -i '/^[# ]*bcastlength/d' test/mpi/errors/coll/testlist || die
+ sed -i '/^[# ]*non_zero_root/d' test/mpi/perf/testlist || die
+
+ # Failing tests based on requiring MPI_THREAD_MULTIPLE.
+ # http://lists.mcs.anl.gov/pipermail/mpich-discuss/2012-January/011618.html
+ sed -i \
+ -e '/^[# ]*pt2pt/d' \
+ -e '/^[# ]*comm/d' \
+ -e '/^[# ]*spawn/d' \
+ test/mpi/threads/testlist || die
+
+ emake -j1 \
+ CC="${S}"/bin/mpicc \
+ CXX="${S}"/bin/mpicxx \
+ F77="${S}"/bin/mpif77 \
+ FC="${S}"/bin/mpif90 \
+ testing
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install
+
+ dodir /usr/share/doc/${PF}
+ dodoc COPYRIGHT README CHANGES RELEASE_NOTES || die
+ newdoc src/pm/hydra/README README.hydra|| die
+ if use romio; then
+ newdoc src/mpi/romio/README README.romio || die
+ fi
+
+ if ! use doc; then
+ rm -rf "${D}"/usr/share/doc/${PF}/www* || die
+ fi
+}