summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Arnold <nerdboy@gentoo.org>2006-06-26 06:15:00 +0000
committerSteve Arnold <nerdboy@gentoo.org>2006-06-26 06:15:00 +0000
commit3b09444b8e420b370e409bbcb6cb86aa884d36c1 (patch)
treefb37ec12447308a8cbec8035a516adb954a490a1 /sys-cluster
parentmasking jdk dep for mpich2 (diff)
downloadgentoo-2-3b09444b8e420b370e409bbcb6cb86aa884d36c1.tar.gz
gentoo-2-3b09444b8e420b370e409bbcb6cb86aa884d36c1.tar.bz2
gentoo-2-3b09444b8e420b370e409bbcb6cb86aa884d36c1.zip
Added explicit fortran and mpe-sdk support, test section
(Portage version: 2.1.1_pre1-r2)
Diffstat (limited to 'sys-cluster')
-rw-r--r--sys-cluster/mpich2/ChangeLog12
-rw-r--r--sys-cluster/mpich2/files/digest-mpich2-1.0.3-r13
-rw-r--r--sys-cluster/mpich2/files/mpd.conf2
-rw-r--r--sys-cluster/mpich2/files/mpich2-1.0.3-make-test.patch23
-rw-r--r--sys-cluster/mpich2/files/mpich2-1.0.3-mpe-install.patch11
-rw-r--r--sys-cluster/mpich2/mpich2-1.0.3-r1.ebuild202
6 files changed, 252 insertions, 1 deletions
diff --git a/sys-cluster/mpich2/ChangeLog b/sys-cluster/mpich2/ChangeLog
index 7c25e1902f8a..4bab456a6279 100644
--- a/sys-cluster/mpich2/ChangeLog
+++ b/sys-cluster/mpich2/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for sys-cluster/mpich2
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpich2/ChangeLog,v 1.6 2006/06/25 11:48:19 corsair Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpich2/ChangeLog,v 1.7 2006/06/26 06:15:00 nerdboy Exp $
+
+*mpich2-1.0.3-r1 (26 Jun 2006)
+
+ 26 Jun 2006; Steve Arnold <nerdboy@gentoo.org>
+ +files/mpich2-1.0.3-make-test.patch,
+ +files/mpich2-1.0.3-mpe-install.patch, +files/mpd.conf,
+ +mpich2-1.0.3-r1.ebuild:
+ Added explicit fortran and mpe-sdk support, test section, although
+ tests still have a build issue with portage (only manual builds are
+ currently working). Feel free to add magic...
25 Jun 2006; Markus Rothe <corsair@gentoo.org> mpich2-1.0.3.ebuild:
Stable on ppc64; bug #133999
diff --git a/sys-cluster/mpich2/files/digest-mpich2-1.0.3-r1 b/sys-cluster/mpich2/files/digest-mpich2-1.0.3-r1
new file mode 100644
index 000000000000..2739835281c8
--- /dev/null
+++ b/sys-cluster/mpich2/files/digest-mpich2-1.0.3-r1
@@ -0,0 +1,3 @@
+MD5 6fa6b0f5a290285a90c239127d1eaa58 mpich2-1.0.3.tar.gz 12166368
+RMD160 5e7cd42f8359d81e6578d1fffca4708471e03cec mpich2-1.0.3.tar.gz 12166368
+SHA256 294717fc05e9d509ed0e45c99709ddba696ad6919c47fc0801a410fe129623df mpich2-1.0.3.tar.gz 12166368
diff --git a/sys-cluster/mpich2/files/mpd.conf b/sys-cluster/mpich2/files/mpd.conf
new file mode 100644
index 000000000000..07dd9825023a
--- /dev/null
+++ b/sys-cluster/mpich2/files/mpd.conf
@@ -0,0 +1,2 @@
+secretword=test69hike
+MPD_SECRETWORD=test69hike
diff --git a/sys-cluster/mpich2/files/mpich2-1.0.3-make-test.patch b/sys-cluster/mpich2/files/mpich2-1.0.3-make-test.patch
new file mode 100644
index 000000000000..92b58141196c
--- /dev/null
+++ b/sys-cluster/mpich2/files/mpich2-1.0.3-make-test.patch
@@ -0,0 +1,23 @@
+--- test/mpi/attr/Makefile.in.orig 2006-06-11 16:52:54.000000000 -0700
++++ test/mpi/attr/Makefile.in 2006-06-11 17:14:38.000000000 -0700
+@@ -26,7 +26,7 @@
+ LDFLAGS = @LDFLAGS@ ../util/mtest.o
+
+ VPATH = .:@srcdir@
+-INCLUDES = -I../include -I${srcdir}/../include
++INCLUDES = -I../include
+
+ .SUFFIXES:
+ .SUFFIXES: .o .c .txt
+--- test/mpi/util/Makefile.in.orig 2006-06-11 16:52:54.000000000 -0700
++++ test/mpi/util/Makefile.in 2006-06-11 17:09:42.000000000 -0700
+@@ -21,8 +21,7 @@
+ C_COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS)
+
+ VPATH = .:@srcdir@
+-INCLUDES = -I../../../src/include -I${top_srcdir}/src/include -I../include \
+- -I${srcdir}/../include
++INCLUDES = -I../include
+
+ .SUFFIXES:
+ .SUFFIXES: .o .c .txt
diff --git a/sys-cluster/mpich2/files/mpich2-1.0.3-mpe-install.patch b/sys-cluster/mpich2/files/mpich2-1.0.3-mpe-install.patch
new file mode 100644
index 000000000000..74f2fb2419b4
--- /dev/null
+++ b/sys-cluster/mpich2/files/mpich2-1.0.3-mpe-install.patch
@@ -0,0 +1,11 @@
+--- src/mpe2/sbin/mpeinstall.orig 2006-06-10 22:51:48.000000000 -0700
++++ src/mpe2/sbin/mpeinstall 2006-06-10 23:57:02.000000000 -0700
+@@ -457,7 +457,7 @@
+ CopyDirRecurP $etcbuild_dir $sysconfdir $MODE
+ cd $etcbuild_dir && \
+ for file in *.conf ; do \
+- FixInstallFile $file $DESTDIR$sysconfdir/$file ; \
++ FixInstallFile $file $sysconfdir/$file ; \
+ done
+ fi
+ fi
diff --git a/sys-cluster/mpich2/mpich2-1.0.3-r1.ebuild b/sys-cluster/mpich2/mpich2-1.0.3-r1.ebuild
new file mode 100644
index 000000000000..1f2c56ede32f
--- /dev/null
+++ b/sys-cluster/mpich2/mpich2-1.0.3-r1.ebuild
@@ -0,0 +1,202 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpich2/mpich2-1.0.3-r1.ebuild,v 1.1 2006/06/26 06:15:00 nerdboy Exp $
+
+inherit fortran distutils eutils autotools kde-functions toolchain-funcs
+
+DESCRIPTION="MPICH2 - A portable MPI implementation"
+HOMEPAGE="http://www-unix.mcs.anl.gov/mpi/mpich2"
+SRC_URI="ftp://ftp.mcs.anl.gov/pub/mpi/${P}.tar.gz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+# need more arches in here, like sparc...
+IUSE="crypt cxx doc debug fortran mpe mpe-sdk threads"
+
+PROVIDE="virtual/mpi"
+DEPEND="virtual/libc
+ sys-devel/autoconf
+ sys-devel/automake
+ sys-devel/libtool
+ sys-apps/coreutils
+ dev-lang/perl
+ sys-devel/gcc
+ mpe-sdk? ( >=virtual/jdk-1.4.2 )
+ >=dev-lang/python-2.3"
+RDEPEND="${DEPEND}
+ crypt? ( net-misc/openssh )
+ !crypt? ( net-misc/netkit-rsh )
+ !virtual/mpi"
+
+RESTRICT="test"
+
+pkg_setup() {
+ if [ -n "${MPICH_CONFIGURE_OPTS}" ]; then
+ einfo "Custom configure options are ${MPICH_CONFIGURE_OPTS}."
+ fi
+ if use fortran ; then
+ if [ $(gcc-major-version) -ge 4 ] \
+ && built_with_use sys-devel/gcc fortran ; then
+ FORTRAN="gfortran"
+ fortran_pkg_setup
+ else
+ ewarn "You need gcc-4 built with fortran support in order to"
+ ewarn "build the f90 mpi interface, which is required for f90"
+ ewarn "and mpi support in hdf5 (for example)."
+ fi
+ else
+ einfo "Unless you have another f90 compiler installed, we can only"
+ einfo "build the f77 and C++ interfaces with gcc-3.x"
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ need-autoconf 2.5
+ epatch ${FILESDIR}/${P}-soname.patch || die "soname patch failed"
+ ebegin "Reconfiguring"
+ find . -name configure -print | xargs rm
+ ./maint/updatefiles
+ use mpe-sdk && ./src/mpe2/maint/updatefiles
+ eend
+ epatch ${FILESDIR}/${P}-make.patch || die "make patch failed"
+ #epatch ${FILESDIR}/${P}-make-test.patch || die "make test patch failed"
+ echo "LDPATH=\"/usr/$(get_libdir)/${PN}\"" > 42mpich2
+}
+
+src_compile() {
+ export LDFLAGS='-Wl,-z,now'
+ local RSHCOMMAND
+
+ if use crypt ; then
+ RSHCOMMAND="ssh -x"
+ else
+ RSHCOMMAND="rsh"
+ fi
+ export RSHCOMMAND
+
+ local myconf="${MPICH_CONFIGURE_OPTS}"
+
+ if ! use debug ; then
+ myconf="${myconf} --enable-fast --enable-g=none"
+ else
+ myconf="${myconf} --enable-g=dbg --enable-debuginfo"
+ fi
+
+ if ! use mpe-sdk ; then
+ myconf="${myconf} --enable-graphics=no --enable-rlog=no \
+ --enable-clog=no --enable-slog2=no"
+ fi
+ use mpe && MPE_SRC_DIR=${S}/src/mpe2
+
+ ./configure --prefix=/usr --exec-prefix=/usr \
+ --enable-sharedlibs=gcc \
+ ${myconf} \
+ $(use_enable cxx) \
+ $(use_enable mpe) \
+ $(use_enable threads) \
+ --includedir=/usr/include \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --mandir=/usr/share/man \
+ --with-docdir=/usr/share/doc/${PF} \
+ --with-htmldir=/usr/share/doc/${PF}/html \
+ --sysconfdir=/etc/${PN} \
+ --datadir=/usr/share/${PN} || die "configure failed"
+
+ if use mpe-sdk ; then
+ ${MPE_SRC_DIR}/configure --prefix=/usr --enable-mpich \
+ --with-mpicc=mpicc --with-mpif77=mpif77 --enable-wrappers \
+ --enable-collchk --with-flib_path_leader="-Wl,-L"
+ fi
+
+ if use mpe ; then
+ epatch ${FILESDIR}/${P}-mpe-install.patch || die "install patch failed"
+ fi
+
+ # parallel makes are currently broken, so no emake...
+ make dependencies
+ make || die "make failed"
+
+ if has test ${FEATURES} ; then
+ # get setup for src_test
+ export LDFLAGS='-L../../lib'
+ cd ${S}/test/mpi
+ #make clean || die "make clean failed"
+ echo
+ einfo "Using ./configure --prefix=${S} --with-mpi=${S} --disable-f90"
+ echo
+ ./configure --prefix=${S} --with-mpi=${S} $(use_enable threads) \
+ --exec-prefix=${S} --includedir=${S}/src/include --disable-f90 \
+ || die "configure test failed"
+ make dependencies
+ # make doesn't work here for some reason, although it works fine
+ # when run manually. Go figure...
+ #cd ${S}/test/mpi/util
+ #make all || die "make util failed"
+ cd ${S}/test
+ install -g portage -o portage -m 0600 ${FILESDIR}/mpd.conf ${HOME}/.mpd.conf
+ #${S}/bin/mpd --daemon
+ make all || die "make pre-test failed"
+ #cd ${S}/test/mpi
+ #make || die "make test failed"
+ #${S}/bin/mpdallexit
+ fi
+}
+
+src_test() {
+ ewarn "Tests can take a long time to complete, even on a fast box."
+ ewarn "Expected result on amd64 with gcc 4.1.1:"
+ ewarn " 6 tests failed out of 373"
+ echo
+ einfo "Control-C now if you want to disable tests..."
+ epause
+
+ ${S}/bin/mpd --daemon
+ cd ${S}/test
+ nice --adjustment=3 make testing || die "run tests failed"
+ ${S}/bin/mpdallexit
+}
+
+src_install() {
+ dodir /etc/${PN}
+ rm -rf src/mpe2/etc/*.in
+ make install DESTDIR=${D} \
+ LIBDIR=${D}usr/$(get_libdir)/${PN} || die "make install failed"
+
+ dodir /usr/share/${PN}
+ mv ${D}usr/examples/cpi ${D}usr/share/${PN}/cpi
+ rm -rf ${D}usr/examples
+ rm -rf ${D}usr/sbin
+
+ dodir /usr/share/doc/${PF}
+ if use doc; then
+ dodoc COPYRIGHT README README.romio README.testing CHANGES
+ dodoc README.developer RELEASE_NOTES
+ newdoc src/pm/mpd/README README.mpd
+ else
+ rm -rf ${D}usr/share/doc/
+ rm -rf ${D}usr/share/man/
+ dodoc README CHANGES COPYRIGHT RELEASE_NOTES
+ fi
+ doenvd 42mpich2
+}
+
+pkg_postinst() {
+ python_version
+ python_mod_optimize ${ROOT}usr/bin
+ echo
+ einfo "Note: this package still needs testing with other Fortran90"
+ einfo "compilers besides gfortran (gcc4). The tests also need some"
+ einfo "magic to build properly within the portage build environment."
+ einfo "(currently the tests only build and run manually)"
+ echo
+ einfo "The gfortran support has been tested successfully with hdf5"
+ einfo "(using gfortran and the mpif90 wrapper)."
+}
+
+pkg_postrm() {
+ python_version
+ python_mod_cleanup
+}