aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <seb@cayenne.ist.utl.pt>2009-10-08 17:47:07 +0100
committerSebastien Fabbro <seb@cayenne.ist.utl.pt>2009-10-08 17:47:07 +0100
commit373960d9c99c2779a907beb38677f53aa0d61a8a (patch)
tree505aead9a893e3df816ad2c9ef4a93e3e70de756 /sys-cluster/mpich2
parentopendx changes now in main tree (diff)
parentBump sys-cluster/mpich2-1.2 (diff)
downloadsci-373960d9c99c2779a907beb38677f53aa0d61a8a.tar.gz
sci-373960d9c99c2779a907beb38677f53aa0d61a8a.tar.bz2
sci-373960d9c99c2779a907beb38677f53aa0d61a8a.zip
Merge branch 'master' of git+ssh://git.overlays.gentoo.org/proj/sci
Diffstat (limited to 'sys-cluster/mpich2')
-rw-r--r--sys-cluster/mpich2/Manifest2
-rw-r--r--sys-cluster/mpich2/mpich2-1.2.ebuild198
2 files changed, 200 insertions, 0 deletions
diff --git a/sys-cluster/mpich2/Manifest b/sys-cluster/mpich2/Manifest
index 75a90a2ba..1582d7ef2 100644
--- a/sys-cluster/mpich2/Manifest
+++ b/sys-cluster/mpich2/Manifest
@@ -8,7 +8,9 @@ AUX mpich2-1.0.8-mpdconf-env.patch 5355 RMD160 26ffada537073676553fdc4a9ee6a02f1
AUX mpich2-1.0.8-pkgconfig.patch 928 RMD160 5ce7a800423f250dba0dd69560abebf845e7e556 SHA1 afba6883d1204a4b7c082af7e976186153263d64 SHA256 7f8dcafcb0d138130a684284d9bca86e4834f74a5132f0fef4556391abf43f8e
DIST mpich2-1.0.8.tar.gz 17237476 RMD160 646cf50fbdc60a49809f4d0a6bcaf2835844db1f SHA1 41d6f6ce1034ecec5c14fb03592730ae2dd071e5 SHA256 7551ce20f3ef366567c566d08782323360b5dbd2d15d816e41c10b5f96eaf369
DIST mpich2-1.1.1p1.tar.gz 18343542 RMD160 efa469c42306f3c4ce1d38d09da7c793c55ae03d SHA1 053fadf971f93fd023fae1e762f801f1d08d76e3 SHA256 10badc5afe55998f7be90f569447ce1b56c42ed0248c3a925090ad1e6a5d800f
+DIST mpich2-1.2.tar.gz 17245392 RMD160 fdf9f578817750be52e0d46c9dbc47fd8cbd925f SHA1 48502bf0acd6f877503b7f7756d51b63989e4fdd SHA256 b9d6d830864a940eead0e48965e5258f07190446eb511c14f5d567b2acfcdf44
EBUILD mpich2-1.0.8-r1.ebuild 5240 RMD160 f1d871778940074334539cd4f9ef11749fba6eb8 SHA1 36e38cde4a648a31e3e413b6521508a948a18209 SHA256 c9d014301a1c6f6498fab873055bb9f038f2d3890b997aa9d2a4815b20152dca
EBUILD mpich2-1.1.1_p1.ebuild 5114 RMD160 6b8ac2836241a7a7d446305d059a251ec9d55683 SHA1 07f58de02c5a6ddafa9abf22f8977c8229a1d07e SHA256 7e7218c778df0d67646d98489003dabb4bf62d6cb62e9ffd9eae8248b7d32d7a
+EBUILD mpich2-1.2.ebuild 5114 RMD160 6b8ac2836241a7a7d446305d059a251ec9d55683 SHA1 07f58de02c5a6ddafa9abf22f8977c8229a1d07e SHA256 7e7218c778df0d67646d98489003dabb4bf62d6cb62e9ffd9eae8248b7d32d7a
MISC ChangeLog 1551 RMD160 282e5347dafc004d7faa0dc62dd78e7adf8e8a98 SHA1 79d79e69594fc934b6a6377f43221cea2fc7ce35 SHA256 b578b4b142c1dbdbb031c84e7738828c1202488b92eb88caa6d272b4d0fce536
MISC metadata.xml 468 RMD160 98d955b7fd33a5b54c618424df4bc1237bb91a21 SHA1 eb055936e1a4ecafa846c1b7be6bc8c96d503ba1 SHA256 9516aa2c4536c5bc0555b42af1019a82e0f027ba8e52c0c46bcb5ee3fff8a765
diff --git a/sys-cluster/mpich2/mpich2-1.2.ebuild b/sys-cluster/mpich2/mpich2-1.2.ebuild
new file mode 100644
index 000000000..fc33a78bd
--- /dev/null
+++ b/sys-cluster/mpich2/mpich2-1.2.ebuild
@@ -0,0 +1,198 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=1
+inherit eutils fortran mpi
+
+MY_PV=${PV/_/}
+DESCRIPTION="MPICH2 - A portable MPI implementation"
+HOMEPAGE="http://www-unix.mcs.anl.gov/mpi/mpich2"
+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-lang/perl
+ >=dev-lang/python-2.3
+ romio? ( net-fs/nfs-utils )
+ pvfs2? ( >=sys-cluster/pvfs2-2.7.0 )
+ dev-libs/libaio
+ $(mpi_imp_deplist)"
+
+DEPEND="${COMMON_DEPEND}
+ sys-devel/libtool"
+
+RDEPEND="${COMMON_DEPEND}
+ net-misc/openssh"
+
+S="${WORKDIR}"/${PN}-${MY_PV}
+
+pkg_setup() {
+ MPI_ESELECT_FILE="eselect.mpi.mpich2"
+
+ if [ -n "${MPICH_CONFIGURE_OPTS}" ]; then
+ elog "User-specified configure options are ${MPICH_CONFIGURE_OPTS}."
+ else
+ elog "User-specified configure options are not set."
+ elog "If needed, see the docs and set MPICH_CONFIGURE_OPTS."
+ fi
+
+ if use fortran ; then
+ FORTRAN="g77 gfortran ifort ifc"
+ fortran_pkg_setup
+ fi
+
+ if use mpi-threads && ! use threads; then
+ die "USE=mpi-threads requires USE=threads"
+ fi
+
+ if mpi_classed; then
+ MPD_CONF_FILE_DIR=/etc/$(mpi_class)
+ else
+ MPD_CONF_FILE_DIR=/etc/${PN}
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # A lot of these patches touch Makefile.in and configure files.
+ # While it would be nice to regenerate everything, mpich2 uses
+ # simplemake instead of automake, so we're doing this for now
+ # and hoping for a receptive upstream.
+
+ # #220877
+ sed -i 's/-fpic/-fPIC/g' \
+ $(grep -lr -e '-fpic' "${S}"/) || die "failed to change -fpic to -fPIC"
+
+ # TODO: None of this has been sent upstream yet.
+ epatch "${FILESDIR}"/0001-MPD_CONF_FILE-should-be-readable.patch
+ epatch "${FILESDIR}"/0002-mpd_conf_file-search-order.patch
+ epatch "${FILESDIR}"/0003-Fix-pkgconfig-for-mpich2-ch3.patch
+
+ # We need f90 to include the directory with mods, and to
+ # fix hardcoded paths for src_test()
+ 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
+}
+
+src_compile() {
+ local c="${MPICH_CONFIGURE_OPTS} --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 threads ; then
+ c="${c} --with-thread-package=pthreads"
+ else
+ c="${c} --with-thread-package=none"
+ 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 mpi-threads; then
+ c="${c} --enable-threads=default"
+ else
+ c="${c} --enable-threads=single"
+ fi
+
+ if use pvfs2; then
+ # nfs and ufs are defaults in 1.0.8 at least.
+ 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:gforker \
+ --disable-mpe \
+ $(use_enable romio) \
+ $(use_enable cxx) \
+ || die
+ # 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=$(mpi_root)
+
+ 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}"/${d}/usr/share/doc/www*
+ else
+ mpi_dodir /usr/share/doc/${PF}/www
+ mv "${D}"/${d}/usr/share/doc/www*/* "${D}"/${d}/usr/share/doc/${PF}/www/
+ fi
+
+ mpi_imp_add_eselect
+}
+
+pkg_postinst() {
+ # 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
+
+ elog ""
+ elog "MPE2 has been removed from this ebuild and now stands alone"
+ elog "as sys-cluster/mpe2."
+ elog ""
+}