aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bronder <jsbronder@gentoo.org>2010-07-03 00:05:26 -0400
committerJustin Bronder <jsbronder@gentoo.org>2010-07-03 00:05:26 -0400
commit2de70c62f836f90ad1e5a6b1d5b78ebb615bb81f (patch)
tree63122def83c3ddc898079cd910514555198fbff9
parent[app-portage/g-octave] Version bump with cleanup (diff)
downloadsci-2de70c62f836f90ad1e5a6b1d5b78ebb615bb81f.tar.gz
sci-2de70c62f836f90ad1e5a6b1d5b78ebb615bb81f.tar.bz2
sci-2de70c62f836f90ad1e5a6b1d5b78ebb615bb81f.zip
Update python handling (#316937). Cleanup deps. Automatically turn on threads if mpi-threads are requested.
(Portage version: 2.2_rc67/git/Linux x86_64) (Signed Manifest commit)
-rw-r--r--sys-cluster/mpich2/ChangeLog7
-rw-r--r--sys-cluster/mpich2/Manifest11
-rw-r--r--sys-cluster/mpich2/mpich2-1.2.1_p1-r1.ebuild221
3 files changed, 234 insertions, 5 deletions
diff --git a/sys-cluster/mpich2/ChangeLog b/sys-cluster/mpich2/ChangeLog
index 34683837a..f477e654b 100644
--- a/sys-cluster/mpich2/ChangeLog
+++ b/sys-cluster/mpich2/ChangeLog
@@ -2,6 +2,13 @@
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+*mpich2-1.2.1_p1-r1 (03 Jul 2010)
+
+ 03 Jul 2010; Justin Bronder <jsbronder@gentoo.org>
+ +mpich2-1.2.1_p1-r1.ebuild:
+ Update python handling (#316937). Cleanup deps. Automatically turn on
+ threads if mpi-threads are requested.
+
14 Mar 2010; Justin Bronder <jsbronder@gentoo.org> mpich2-1.2.1_p1.ebuild:
Add hydra pm. #309353
diff --git a/sys-cluster/mpich2/Manifest b/sys-cluster/mpich2/Manifest
index a3032f25d..08075983c 100644
--- a/sys-cluster/mpich2/Manifest
+++ b/sys-cluster/mpich2/Manifest
@@ -15,13 +15,14 @@ DIST mpich2-1.2.1.tar.gz 18284454 RMD160 6ffbfbd11d9a51a79228713705df7be6d7f67be
DIST mpich2-1.2.1p1.tar.gz 18014859 RMD160 810cc486b65e4bcf977ac8d96ccbbcea87e0cbaa SHA1 26bd5620b45bc654aa3945755d11450be63d650c SHA256 a55d1682ee0b5ebbacc047f60620ed291e0a9b3ded3eaeb6a2c81a1598c4c964
EBUILD mpich2-1.1.1_p1.ebuild 5133 RMD160 7dd128592d5dffb39d90469c08011c71fe9a73e1 SHA1 e74375bd76a631cc030c41dc4035928693b29b8c SHA256 70cf6beb15ca07b4b42383568ae9c87849f5cd640016d7039309593797967d7a
EBUILD mpich2-1.2.1.ebuild 5074 RMD160 bc9a907c09eaf7b07e818af27a4e06daf6bc315f SHA1 1c31421495bb07a6cfb1d027bc17fecc7b872dd1 SHA256 1c279e280bc01c49c8b383158837398cb5c4a24df279f572e7feda486c2925e3
+EBUILD mpich2-1.2.1_p1-r1.ebuild 5334 RMD160 4f16417c64610dacdad7289a67ad1d99954ba2b9 SHA1 04355d5b42c98362ead50196bfbaabb35269486d SHA256 066d95c729693529ca39120d9168194601a9b000bdd105893860a20cda9731d8
EBUILD mpich2-1.2.1_p1.ebuild 5298 RMD160 b8e863f33646f64cd716db6668f86875d77c34b0 SHA1 80aed9500ff444e416a74c104164e9789b059ea5 SHA256 db8aa90ddf2f1ba208b4486b221eaa0fda93208c0ff4f6f511f7113f99190ab2
-MISC ChangeLog 2444 RMD160 ff24564a9f9da6fc7537d87f3e52e5ff49cd5fb5 SHA1 c507815f4d33c64430dd6349d75209cd38c7053f SHA256 b94593d3bf748a3b47e0502e610130f43a1f6c5d861d224d18d841905b6ed6ab
+MISC ChangeLog 2675 RMD160 eed65c2a1b8bebd08f18d7b552813800f89316db SHA1 9c2898eefbebe415454975921a12a00c2a6b24fd SHA256 9245df75d3c3216daf09da24f769e610c7f4e86a1592e217fa1d12db8c38fec7
MISC metadata.xml 607 RMD160 135a7788ce8c8b0434be793aea5a41e081b09630 SHA1 9b9f3342ad6d29a77321c663fa56f9944b30ce29 SHA256 149f73e9eec49b3125b6ac791958206043f3ec278e608279e6f28cccd3a1cc75
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.11 (GNU/Linux)
+Version: GnuPG v2.0.14 (GNU/Linux)
-iEUEARECAAYFAkudHcMACgkQ4MrvBE1wQ8lFzwCfaHS8GoxyU0x9L33mL9sKUy2R
-LakAmIyowr7AIOR8wlgnBxF7ozaVTTI=
-=sQJA
+iEYEARECAAYFAkwutwYACgkQ4MrvBE1wQ8nPRwCdHbZFrAbp/9hJz7LP1vHc0Yba
+kF8AnRN8r5p5AOU66kwGIdxzZ9yN6soY
+=D1Im
-----END PGP SIGNATURE-----
diff --git a/sys-cluster/mpich2/mpich2-1.2.1_p1-r1.ebuild b/sys-cluster/mpich2/mpich2-1.2.1_p1-r1.ebuild
new file mode 100644
index 000000000..55ef52211
--- /dev/null
+++ b/sys-cluster/mpich2/mpich2-1.2.1_p1-r1.ebuild
@@ -0,0 +1,221 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=2
+PYTHON_DEPEND="2"
+
+inherit eutils fortran python mpi
+
+MY_PV=${PV/_/}
+DESCRIPTION="MPICH2 - A 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 ~ppc ~ppc64 ~x86"
+IUSE="+cxx debug doc fortran pvfs2 threads romio mpi-threads"
+
+MPI_UNCLASSED_BLOCKERS="media-sound/mpd"
+
+COMMON_DEPEND="dev-libs/libaio
+ romio? ( net-fs/nfs-utils )
+ pvfs2? ( >=sys-cluster/pvfs2-2.7.0 )
+ $(mpi_imp_deplist)"
+
+DEPEND="${COMMON_DEPEND}
+ dev-lang/perl
+ sys-devel/libtool"
+
+RDEPEND="${COMMON_DEPEND}"
+
+S="${WORKDIR}"/${PN}-${MY_PV}
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+
+ MPI_ESELECT_FILE="eselect.mpi.mpich2"
+
+ if use fortran ; then
+ FORTRAN="g77 gfortran ifort ifc"
+ fortran_pkg_setup
+ fi
+
+ if use mpi-threads && ! use threads; then
+ ewarn "mpi-threads requires threads, assuming that's what you want"
+ fi
+
+ if mpi_classed; then
+ MPD_CONF_FILE_DIR=/etc/$(mpi_class)
+ else
+ MPD_CONF_FILE_DIR=/etc/${PN}
+ fi
+
+}
+
+src_prepare() {
+ # Upstream trunk, r5843
+ epatch "${FILESDIR}"/0001-MPD_CONF_FILE-should-be-readable.patch
+ # Upstream trunk, r5844
+ epatch "${FILESDIR}"/0002-mpd_conf_file-search-order.patch
+ # Upstream trunk, r5845
+ epatch "${FILESDIR}"/0003-Fix-pkgconfig-for-mpich2-ch3-v1.2.1.patch
+
+ # We need f90 to include the directory with mods, and to
+ # fix hardcoded paths for src_test()
+ # Submitted upstream.
+ sed -i \
+ -e "s,F90FLAGS\( *\)=,F90FLAGS\1?=," \
+ -e "s,\$(bindir)/,${S}/bin/,g" \
+ -e "s,@MPIEXEC@,${S}/bin/mpiexec,g" \
+ $(find ./test/ -name 'Makefile.in') || die
+
+ if ! use romio; then
+ # These tests in errhan/ rely on MPI::File ...which is in romio
+ echo "" > test/mpi/errors/cxx/errhan/testlist
+ fi
+
+ # 293665: Should check in on MPICH2_MPIX_FLAGS in later releases
+ # (>1.3) as this is seeing some development in trunk as of r6350.
+ sed -i \
+ -e 's|\(WRAPPER_[A-Z90]*FLAGS\)="@.*@"|\1=""|' \
+ src/env/mpi*.in || die
+}
+
+src_configure() {
+ local c="--enable-sharedlibs=gcc"
+ 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=all --enable-debuginfo"
+
+ if use mpi-threads; then
+ # MPI-THREAD requries threading.
+ c="${c} --with-thread-package=pthreads"
+ c="${c} --enable-threads=default"
+ 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
+
+ # enable f90 support for appropriate compilers
+ case "${FORTRANC}" in
+ gfortran|if*)
+ c="${c} --enable-f77 --enable-f90";;
+ g77)
+ c="${c} --enable-f77 --disable-f90";;
+ esac
+
+ if use pvfs2; then
+ # nfs and ufs are default.
+ romio_conf="--with-file-system=pvfs2+nfs+ufs --with-pvfs2=/usr"
+ fi
+
+ ! mpi_classed && c="${c} --sysconfdir=/etc/${PN}"
+ econf $(mpi_econf_args) ${c} ${romio_conf} \
+ --docdir=$(mpi_root)/usr/share/doc/${PF} \
+ --with-pm=mpd:hydra:gforker \
+ --disable-mpe \
+ $(use_enable romio) \
+ $(use_enable cxx) \
+ || die
+}
+
+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/297
+ emake -j1 || die
+}
+
+src_test() {
+ local rc
+
+ cp "${FILESDIR}"/mpd.conf "${T}"/mpd.conf || die
+ chmod 600 "${T}"/mpd.conf
+ export MPD_CONF_FILE="${T}/mpd.conf"
+ "${S}"/bin/mpd --daemon --pid="${T}"/mpd.pid
+
+ make \
+ CC="${S}"/bin/mpicc \
+ CXX="${S}"/bin/mpicxx \
+ FC="${S}"/bin/mpif77 \
+ F90="${S}"/bin/mpif90 \
+ F90FLAGS="${F90FLAGS} -I${S}/src/binding/f90/" \
+ testing
+ rc=$?
+
+ "${S}"/bin/mpdallexit || kill $(<"${T}"/mpd.pid)
+ return ${rc}
+}
+
+src_install() {
+ local d=$(echo ${D}/$(mpi_root)/ | sed 's,///*,/,g')
+ local f
+
+ emake DESTDIR="${D}" install || die
+
+ dodir ${MPD_CONF_FILE_DIR}
+ insinto ${MPD_CONF_FILE_DIR}
+ doins "${FILESDIR}"/mpd.conf || die
+
+ mpi_dodir /usr/share/doc/${PF}
+ mpi_dodoc COPYRIGHT README CHANGES RELEASE_NOTES || die
+ mpi_newdoc src/pm/mpd/README README.mpd || die
+ if use romio; then
+ mpi_newdoc src/mpi/romio/README README.romio || die
+ fi
+
+ if ! use doc; then
+ rm -rf "${d}"usr/share/doc/www*
+ else
+ mpi_dodir /usr/share/doc/${PF}/www
+ mv "${d}"usr/share/doc/www*/* "${d}"usr/share/doc/${PF}/www/
+ fi
+
+ mpi_imp_add_eselect
+
+ # See #316937
+ MPD_PYTHON_MODULES=""
+ for f in "${d}"usr/bin/*.py; do
+ MPD_PYTHON_MODULES="${MPD_PYTHON_MODULES} ${f##${d}usr/bin}"
+ elog "${f##${d}}"
+ done
+}
+
+pkg_postinst() {
+ local f
+ local d=$(mpi_root)
+
+ # Here so we can play with ebuild commands as a normal user
+ chown root:root "${ROOT}"${MPD_CONF_FILE_DIR}/mpd.conf
+ chmod 600 "${ROOT}"${MPD_CONF_FILE_DIR}/mpd.conf
+
+ for f in ${MPD_PYTHON_MODULES}; do
+ python_mod_optimize ${d}/usr/bin/${f}
+ done
+
+ elog ""
+ elog "MPE2 has been removed from this ebuild and now stands alone"
+ elog "as sys-cluster/mpe2."
+ elog ""
+
+}
+
+pkg_postrm() {
+ local f
+ local d=$(mpi_root)
+
+ for f in ${MPD_PYTHON_MODULES}; do
+ python_mod_cleanup ${d}/usr/bin/${f}
+ done
+}