summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Arnold <nerdboy@gentoo.org>2007-07-09 01:58:30 +0000
committerSteve Arnold <nerdboy@gentoo.org>2007-07-09 01:58:30 +0000
commite86e186d19312bb191c111b73f10738b60e6d60f (patch)
tree8fc29203010ce9ed87c64ddc448a3cfed2034b04 /sys-cluster/mpich2
parentupdated for new mpich2 flag (diff)
downloadhistorical-e86e186d19312bb191c111b73f10738b60e6d60f.tar.gz
historical-e86e186d19312bb191c111b73f10738b60e6d60f.tar.bz2
historical-e86e186d19312bb191c111b73f10738b60e6d60f.zip
updated to current version with major ebuild enhancements
Package-Manager: portage-2.1.3_rc6
Diffstat (limited to 'sys-cluster/mpich2')
-rw-r--r--sys-cluster/mpich2/ChangeLog19
-rw-r--r--sys-cluster/mpich2/Manifest24
-rw-r--r--sys-cluster/mpich2/files/digest-mpich2-1.0.5_p43
-rw-r--r--sys-cluster/mpich2/files/mpich2-1.0.5_p4-make.patch28
-rw-r--r--sys-cluster/mpich2/files/mpich2-1.0.5_p4-soname.patch36
-rw-r--r--sys-cluster/mpich2/mpich2-1.0.5_p4.ebuild219
6 files changed, 324 insertions, 5 deletions
diff --git a/sys-cluster/mpich2/ChangeLog b/sys-cluster/mpich2/ChangeLog
index fcb93d287162..675719b0ad22 100644
--- a/sys-cluster/mpich2/ChangeLog
+++ b/sys-cluster/mpich2/ChangeLog
@@ -1,6 +1,23 @@
# ChangeLog for sys-cluster/mpich2
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpich2/ChangeLog,v 1.19 2007/04/26 06:10:51 dberkholz Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpich2/ChangeLog,v 1.20 2007/07/09 01:58:30 nerdboy Exp $
+
+*mpich2-1.0.5_p4 (09 Jul 2007)
+
+ 09 Jul 2007; Steve Arnold <nerdboy@gentoo.org>
+ +files/mpich2-1.0.5_p4-make.patch, +files/mpich2-1.0.5_p4-soname.patch,
+ +mpich2-1.0.5_p4.ebuild:
+ Updated to current version with major ebuild enhancements (it even builds
+ with all USE flags now :)
+
+ Note: the mpe-sdk flag requires a JDK and libX11, so it's really intended
+ for a development workstation or at least a machine with an X desktop. The
+ JDK parts of the ebuild could probably be improved, and it doesn't currently
+ rebuild the jar files. The docs handling is also hackish, but should Do The
+ Right Thing (TM). I'm pretty sure the upstream *.so config is whacked, and
+ the current patch is about the best I can do right now. Please enhance it.
+
+ Test away...
26 Apr 2007; Donnie Berkholz <dberkholz@gentoo.org>; metadata.xml:
Update for cluster herd split to hp-cluster and ha-cluster.
diff --git a/sys-cluster/mpich2/Manifest b/sys-cluster/mpich2/Manifest
index 3810ce829b28..6a2a35c92ae6 100644
--- a/sys-cluster/mpich2/Manifest
+++ b/sys-cluster/mpich2/Manifest
@@ -18,7 +18,16 @@ AUX mpich2-1.0.3-soname.patch 1201 RMD160 9ff5a58e828f1c51d963002ac14de21e8cff29
MD5 452ee396ae89c5605161ef0cb6ae323c files/mpich2-1.0.3-soname.patch 1201
RMD160 9ff5a58e828f1c51d963002ac14de21e8cff2995 files/mpich2-1.0.3-soname.patch 1201
SHA256 5625f28ac75530099a8230b9b1679f11977079f92e6ddfa75d371e02e3f4b7e3 files/mpich2-1.0.3-soname.patch 1201
+AUX mpich2-1.0.5_p4-make.patch 2620 RMD160 3a233060828a69ec67746994ccf58e375e8aee8e SHA1 bf1cf9a58d9982ee61dfaddcfdcae4595eef576f SHA256 763dc91d9e585df90ee54428bd51538da64e6e55bd9c7c55bdae2ea47dcb7362
+MD5 3efc1039cc4b4154c102b2e59f26776f files/mpich2-1.0.5_p4-make.patch 2620
+RMD160 3a233060828a69ec67746994ccf58e375e8aee8e files/mpich2-1.0.5_p4-make.patch 2620
+SHA256 763dc91d9e585df90ee54428bd51538da64e6e55bd9c7c55bdae2ea47dcb7362 files/mpich2-1.0.5_p4-make.patch 2620
+AUX mpich2-1.0.5_p4-soname.patch 1201 RMD160 9ff5a58e828f1c51d963002ac14de21e8cff2995 SHA1 361065c50ad001c9b9645643cbd82f853cdb03c0 SHA256 5625f28ac75530099a8230b9b1679f11977079f92e6ddfa75d371e02e3f4b7e3
+MD5 452ee396ae89c5605161ef0cb6ae323c files/mpich2-1.0.5_p4-soname.patch 1201
+RMD160 9ff5a58e828f1c51d963002ac14de21e8cff2995 files/mpich2-1.0.5_p4-soname.patch 1201
+SHA256 5625f28ac75530099a8230b9b1679f11977079f92e6ddfa75d371e02e3f4b7e3 files/mpich2-1.0.5_p4-soname.patch 1201
DIST mpich2-1.0.3.tar.gz 12166368 RMD160 5e7cd42f8359d81e6578d1fffca4708471e03cec SHA1 0ca48abaa98e98f0136508463886aad39ecefccb SHA256 294717fc05e9d509ed0e45c99709ddba696ad6919c47fc0801a410fe129623df
+DIST mpich2-1.0.5p4.tar.gz 12849546 RMD160 1a2b56468f88c5b4704662ae0dc6d648a6ca8a65 SHA1 ba561841047e5ed2f6d508a3cb4cf9727feadcf8 SHA256 4b819d318ec514c350ce0fea730126faa2ef36b5f00bc72c4a097dcf9979918d
EBUILD mpich2-1.0.3-r1.ebuild 6126 RMD160 5997a07983cb830b61eb896a465b3b30f06fc230 SHA1 1bcd172f8a935d0001391bba75d108e4042729e5 SHA256 db8638f583ea3dbbb37b051243fa1a308892eff657bfb28401f4ea212e025661
MD5 bcdf741ebc6cd0bfc8f0f8459e9ace5a mpich2-1.0.3-r1.ebuild 6126
RMD160 5997a07983cb830b61eb896a465b3b30f06fc230 mpich2-1.0.3-r1.ebuild 6126
@@ -27,10 +36,14 @@ EBUILD mpich2-1.0.3.ebuild 2824 RMD160 f215c70b49f7958632b5dd279e48e1113aa44e89
MD5 9983d71f808e47f177b973a2c830cdb1 mpich2-1.0.3.ebuild 2824
RMD160 f215c70b49f7958632b5dd279e48e1113aa44e89 mpich2-1.0.3.ebuild 2824
SHA256 b43eadd778c65a41c37dee52c8d48924907d9b26e1ebd5f22ed976b8857901a8 mpich2-1.0.3.ebuild 2824
-MISC ChangeLog 3886 RMD160 05fcb239d623fd11452a182dc7b9fa7ea203952d SHA1 e7ed0093ddb6dfb77bd96b646818974da2cfa255 SHA256 511015c4f03dade766af6494aa4ffd0d2b81084a640df4267b31406923268fce
-MD5 d833d8058aa3e110ea06aca7be38a981 ChangeLog 3886
-RMD160 05fcb239d623fd11452a182dc7b9fa7ea203952d ChangeLog 3886
-SHA256 511015c4f03dade766af6494aa4ffd0d2b81084a640df4267b31406923268fce ChangeLog 3886
+EBUILD mpich2-1.0.5_p4.ebuild 6129 RMD160 19569731d5d151e3ca85d2bd8c06933222fc7eb7 SHA1 cf6bd8335b1e4ef87f107b4e20ce8650561c59f9 SHA256 dd5147f3805e9c31e894d590b447f9e17f4c22fe40d1c88f347a72355bbafe53
+MD5 964b047376b7caf60e67e5fe591fcb5b mpich2-1.0.5_p4.ebuild 6129
+RMD160 19569731d5d151e3ca85d2bd8c06933222fc7eb7 mpich2-1.0.5_p4.ebuild 6129
+SHA256 dd5147f3805e9c31e894d590b447f9e17f4c22fe40d1c88f347a72355bbafe53 mpich2-1.0.5_p4.ebuild 6129
+MISC ChangeLog 4655 RMD160 8a2a8f1e13eef592e86ca464b3362329a2c53638 SHA1 34b8c3831c408ad2d90ef363790ac21f5447625b SHA256 8ac0927627182b07c2c1ddb18ab62ed3f3694e56faeef073c6c3449efd07045b
+MD5 2b4ead16641169edf62dc8de297ad975 ChangeLog 4655
+RMD160 8a2a8f1e13eef592e86ca464b3362329a2c53638 ChangeLog 4655
+SHA256 8ac0927627182b07c2c1ddb18ab62ed3f3694e56faeef073c6c3449efd07045b ChangeLog 4655
MISC metadata.xml 252 RMD160 10123b1072a83227cac20dfe2a5065a3a6851563 SHA1 571c3db0391f894cb0bcbda2e3c5bd561482aca6 SHA256 cbf48aa7f9f6669327e88c9825ece05758d93afffa5c30b9b28568131b008367
MD5 f3a1d3eb35133f846cfa104bad3643ad metadata.xml 252
RMD160 10123b1072a83227cac20dfe2a5065a3a6851563 metadata.xml 252
@@ -41,3 +54,6 @@ SHA256 0727f804a0eaf436ee9176bbd390adf2b28b409e61f20a30491ea3782dd72e0a files/di
MD5 10f6fd0e6437c001aa4ac4f356741a2b files/digest-mpich2-1.0.3-r1 244
RMD160 5b487ae4a71c60a45f5275a0c4c85ca89839187a files/digest-mpich2-1.0.3-r1 244
SHA256 0727f804a0eaf436ee9176bbd390adf2b28b409e61f20a30491ea3782dd72e0a files/digest-mpich2-1.0.3-r1 244
+MD5 6fe1fdde60955546c4ca3b692e30ed3c files/digest-mpich2-1.0.5_p4 250
+RMD160 712c86361146fcb940ec5514e437261eca544d88 files/digest-mpich2-1.0.5_p4 250
+SHA256 7f4f29770d77a7fbc02574a499c5c265ed9cbf3c6ce2157a42d7307153591804 files/digest-mpich2-1.0.5_p4 250
diff --git a/sys-cluster/mpich2/files/digest-mpich2-1.0.5_p4 b/sys-cluster/mpich2/files/digest-mpich2-1.0.5_p4
new file mode 100644
index 000000000000..1aa7b58b853c
--- /dev/null
+++ b/sys-cluster/mpich2/files/digest-mpich2-1.0.5_p4
@@ -0,0 +1,3 @@
+MD5 44d4769e45f5bbd692bca80df732c593 mpich2-1.0.5p4.tar.gz 12849546
+RMD160 1a2b56468f88c5b4704662ae0dc6d648a6ca8a65 mpich2-1.0.5p4.tar.gz 12849546
+SHA256 4b819d318ec514c350ce0fea730126faa2ef36b5f00bc72c4a097dcf9979918d mpich2-1.0.5p4.tar.gz 12849546
diff --git a/sys-cluster/mpich2/files/mpich2-1.0.5_p4-make.patch b/sys-cluster/mpich2/files/mpich2-1.0.5_p4-make.patch
new file mode 100644
index 000000000000..10acbeb3b91d
--- /dev/null
+++ b/sys-cluster/mpich2/files/mpich2-1.0.5_p4-make.patch
@@ -0,0 +1,28 @@
+--- Makefile.in.orig 2007-06-18 19:19:21.000000000 -0700
++++ Makefile.in 2007-06-18 19:27:36.000000000 -0700
+@@ -236,9 +236,9 @@
+ if [ -s lib/lib${MPIFWRAPNAME}.a ] ; then $(INSTALL_DATA) lib/lib${MPIFWRAPNAME}.a ${DESTDIR}${libdir}/lib${MPIFWRAPNAME}.a ; fi
+ if [ -s lib/lib${PMPILIBNAME}.a ] ; then $(INSTALL_DATA) lib/lib${PMPILIBNAME}.a ${DESTDIR}${libdir}/lib${PMPILIBNAME}.a ; fi
+ if [ -s lib/libf${MPILIBNAME}.a ] ; then $(INSTALL_DATA) lib/libf${MPILIBNAME}.a ${DESTDIR}${libdir}/libf${MPILIBNAME}.a ; fi
+- if [ -s lib/lib${MPILIBNAME}.@SHLIB_EXT@ ] ; then $(CREATESHLIB) --mode=install lib/lib${MPILIBNAME}.@SHLIB_EXT@ ${DESTDIR}${libdir}/lib${MPILIBNAME}.@SHLIB_EXT@ ; fi
+- if [ -s lib/lib${PMPILIBNAME}.@SHLIB_EXT@ ] ; then $(CREATESHLIB) --mode=install lib/lib${PMPILIBNAME}.@SHLIB_EXT@ ${DESTDIR}${libdir}/lib${PMPILIBNAME}.@SHLIB_EXT@ ; fi
+- if [ -s lib/libf${MPILIBNAME}.@SHLIB_EXT@ ] ; then $(CREATESHLIB) --mode=install lib/libf${MPILIBNAME}.@SHLIB_EXT@ ${DESTDIR}${libdir}/libf${MPILIBNAME}.@SHLIB_EXT@ ; fi
++ if [ -s lib/lib${MPILIBNAME}.@SHLIB_EXT@ ] ; then $(CREATESHLIB) --mode=install lib/lib${MPILIBNAME}.@SHLIB_EXT@ ${DESTDIR}${libdir}/lib${MPILIBNAME}.@SHLIB_EXT@.0.0 ; fi
++ if [ -s lib/lib${PMPILIBNAME}.@SHLIB_EXT@ ] ; then $(CREATESHLIB) --mode=install lib/lib${PMPILIBNAME}.@SHLIB_EXT@ ${DESTDIR}${libdir}/lib${PMPILIBNAME}.@SHLIB_EXT@.0.0 ; fi
++ if [ -s lib/libf${MPILIBNAME}.@SHLIB_EXT@ ] ; then $(CREATESHLIB) --mode=install lib/libf${MPILIBNAME}.@SHLIB_EXT@ ${DESTDIR}${libdir}/libf${MPILIBNAME}.@SHLIB_EXT@.0.0 ; fi
+ if [ -s $(srcdir)/doc/userguide/user.pdf ] ; then $(INSTALL_DATA) $(srcdir)/doc/userguide/user.pdf ${DESTDIR}${docdir}/user.pdf ; fi
+ if [ -s $(srcdir)/doc/installguide/install.pdf ] ; then $(INSTALL_DATA) $(srcdir)/doc/installguide/install.pdf ${DESTDIR}${docdir}/install.pdf ; fi
+ if [ -s $(srcdir)/doc/smpd/smpd_pmi.pdf ] ; then $(INSTALL_DATA) $(srcdir)/doc/smpd/smpd_pmi.pdf ${DESTDIR}${docdir}/smpd_pmi.pdf ; fi
+@@ -266,9 +266,9 @@
+ -rm -f ${DESTDIR}${libdir}/lib${MPIFWRAPNAME}.a
+ -rm -f ${DESTDIR}${libdir}/lib${PMPILIBNAME}.a
+ -rm -f ${DESTDIR}${libdir}/libf${MPILIBNAME}.a
+- -rm -f ${DESTDIR}${libdir}/lib${MPILIBNAME}.@SHLIB_EXT@
+- -rm -f ${DESTDIR}${libdir}/lib${PMPILIBNAME}.@SHLIB_EXT@
+- -rm -f ${DESTDIR}${libdir}/libf${MPILIBNAME}.@SHLIB_EXT@
++ -rm -f ${DESTDIR}${libdir}/lib${MPILIBNAME}.@SHLIB_EXT@*
++ -rm -f ${DESTDIR}${libdir}/lib${PMPILIBNAME}.@SHLIB_EXT@*
++ -rm -f ${DESTDIR}${libdir}/libf${MPILIBNAME}.@SHLIB_EXT@*
+ -rm -f ${DESTDIR}${docdir}/user.pdf
+ -rm -f ${DESTDIR}${docdir}/install.pdf
+ -rm -f ${DESTDIR}${docdir}/smpd_pmi.pdf
diff --git a/sys-cluster/mpich2/files/mpich2-1.0.5_p4-soname.patch b/sys-cluster/mpich2/files/mpich2-1.0.5_p4-soname.patch
new file mode 100644
index 000000000000..37aabe0ec92f
--- /dev/null
+++ b/sys-cluster/mpich2/files/mpich2-1.0.5_p4-soname.patch
@@ -0,0 +1,36 @@
+--- configure.orig 2005-11-23 10:41:50.000000000 -0800
++++ configure 2006-05-20 21:04:16.000000000 -0700
+@@ -9619,6 +9619,7 @@
+ C_LINK_SHL=true
+ SHLIB_EXT=so
+ SHLIB_FROM_LO=no
++SHLIB_VER=0.0
+ SHLIB_INSTALL='$(INSTALL_PROGRAM)'
+ case "$enable_sharedlibs" in
+ no|none)
+@@ -9640,11 +9641,11 @@
+ # Not quite right yet. See mpich/util/makesharedlib
+ # Use syntax that works in both Make and the shell
+ #C_LINK_SHL='${CC} -shared -Wl,-r'
+- C_LINK_SHL='${CC} -shared'
++ C_LINK_SHL='${CC} -shared -Wl,-soname'
+ # For example, include the libname as ${LIBNAME_SHL}
+ #C_LINK_SHL='${CC} -shared -Wl,-h,<finallibname>'
+ # May need -fPIC
+- CC_SHL='${CC} -fpic'
++ CC_SHL='${CC} -fPIC'
+ C_LINKPATH_SHL="-Wl,-rpath -Wl,"
+ # We need to test that this isn't osx. The following is a
+ # simple hack
+ esac
+--- src/util/createshlib.in.orig 2006-07-11 19:52:47.000000000 -0700
++++ src/util/createshlib.in 2006-07-11 19:56:09.000000000 -0700
+@@ -172,7 +172,7 @@
+
+ *)
+ # This is the default model
+- $Show ${C_LINK_SHL} -o $srclibbase.$SHLIB_EXT .tmp/*.o
++ $Show ${C_LINK_SHL} -Wl,$srclibbase.$SHLIB_EXT.0 -o $srclibbase.$SHLIB_EXT .tmp/*.o
+ ;;
+ esac
+
diff --git a/sys-cluster/mpich2/mpich2-1.0.5_p4.ebuild b/sys-cluster/mpich2/mpich2-1.0.5_p4.ebuild
new file mode 100644
index 000000000000..5dcfb7d83d2d
--- /dev/null
+++ b/sys-cluster/mpich2/mpich2-1.0.5_p4.ebuild
@@ -0,0 +1,219 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpich2/mpich2-1.0.5_p4.ebuild,v 1.1 2007/07/09 01:58:30 nerdboy Exp $
+
+inherit eutils fortran distutils autotools kde-functions toolchain-funcs java-pkg
+
+DESCRIPTION="MPICH2 - A portable MPI implementation"
+HOMEPAGE="http://www-unix.mcs.anl.gov/mpi/mpich2"
+MY_P=${P/_/}
+SRC_URI="ftp://ftp.mcs.anl.gov/pub/mpi/${MY_P}.tar.gz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="crypt cxx debug doc fast fortran mpe mpe-sdk romio threads"
+
+DEPEND="virtual/libc
+ sys-devel/libtool
+ dev-lang/perl
+ >=dev-lang/python-2.3
+ mpe-sdk? ( >=virtual/jdk-1.5
+ x11-proto/xproto )
+ romio? ( >=dev-libs/libaio-0.3.106
+ net-fs/nfs-utils )
+ doc? ( virtual/tetex )"
+
+RDEPEND="${DEPEND}
+ mpe-sdk? ( x11-libs/libX11 )
+ crypt? ( net-misc/openssh )
+ !crypt? ( net-misc/netkit-rsh )
+ !sys-cluster/mpich
+ !sys-cluster/lam-mpi
+ !sys-cluster/openmpi
+ !media-sound/mpd
+ !media-sound/mpd-svn"
+
+RESTRICT="-test"
+
+# To-do: work on tests and add SCTP support for kernel and user tools
+
+pkg_setup() {
+ 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
+ if [ $(gcc-major-version) -ge 4 ] \
+ && built_with_use sys-devel/gcc fortran ; then
+ FORTRAN="gfortran"
+ # we should conform to the Fortran standard, ie, integers
+ # and reals must be the same size
+ export F90FLAGS="-i4 ${F90FLAGS}"
+ 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
+ ewarn "Unless you have another f90 compiler installed, we can only"
+ ewarn "build the f77 and C++ interfaces with gcc-3.x"
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ mv ${WORKDIR}/${MY_P} ${S}
+ cd ${S}
+
+ 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}-soname.patch || die "soname patch failed"
+
+ sed -i -e "s:@LDFLAGS@:@LDFLAGS@ -Wl,-z,now:g" src/pm/mpd/Makefile.in \
+ || die "sed failed"
+}
+
+src_compile() {
+ 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-g=none"
+ else
+ myconf="${myconf} --enable-g=dbg --enable-debuginfo"
+ fi
+
+ if ! use mpe-sdk ; then
+ myconf="${myconf} --enable-rlog=no --enable-slog2=no"
+ fi
+
+ if use threads ; then
+ myconf="${myconf} --with-thread-package=pthreads"
+ else
+ myconf="${myconf} --with-thread-package=none"
+ fi
+
+ # enable f90 support for appropriate compilers
+ case ${FORTRANC} in
+ gfortran|ifc|ifort|f95)
+ myconf="${myconf} --enable-f90"
+ esac
+
+ use romio && myconf="${myconf} --with-file-system=nfs"
+
+ use mpe && MPE_SRC_DIR=${S}/src/mpe2
+
+ if use doc; then
+ doc_conf="--docdir=/usr/share/doc/${PF} \
+ --with-docdir=/usr/share/doc/${PF} \
+ --with-htmldir=/usr/share/doc/${PF}/html \
+ --with-pdfdir=/usr/share/doc/${PF} \
+ --with-psdir=/usr/share/doc/${PF}"
+ else
+ doc_conf="--with-docdir=/usr/share/doc/${PF} \
+ --with-htmldir=/usr/share/doc/${PF}/html"
+ fi
+
+ ./configure --enable-sharedlibs=gcc \
+ ${myconf} \
+ ${doc_conf} \
+ $(use_enable fast) \
+ $(use_enable cxx) \
+ $(use_enable mpe) \
+ $(use_enable romio) \
+ $(use_enable threads) \
+ --libdir=/usr/$(get_libdir) \
+ --includedir=/usr/include \
+ --mandir=/usr/share/man \
+ --sysconfdir=/etc/${PN} \
+ --prefix=/usr --exec-prefix=/usr \
+ --datadir=/usr/share/${PN} || die "configure failed"
+
+ if use mpe-sdk; then
+ cd ${S}/src/mpe2
+ ./configure --prefix=/usr --libdir=/usr/$(get_libdir)/mpe \
+ --with-mpicc=${S}/bin/mpicc --with-mpif77=${S}/bin/mpif77 \
+ --enable-collchk --enable-graphics=yes --enable-wrappers \
+ --with-java=${JAVA_HOME} --datadir=/usr/share/${PN} \
+ --with-flib_path_leader="-Wl,-L" --enable-mpich ${doc_conf} \
+ --with-trace-libdir=/usr/$(get_libdir)/mpe/trace_rlog \
+ || die "MPE configure failed"
+ cd ${S}
+ fi
+
+ # no parallel make here
+ make FFLAGS="-fPIC" || die "make failed"
+}
+
+src_install() {
+ dodir /etc/${PN}
+
+ rm -rf src/mpe2/etc/*.in
+
+ make DESTDIR=${D} LIBDIR=${D}usr/$(get_libdir) install \
+ || die "make install failed"
+
+ 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
+
+ if use mpe-sdk; then
+ dodoc src/mpe2/src/slog2sdk/README.sdk \
+ src/mpe2/src/slog2sdk/README.rte
+ newdoc src/mpe2/src/slog2sdk/FAQ FAQ.sdk
+ fi
+ else
+ rm -rf ${D}usr/share/doc/${PF}/html
+ dodoc README CHANGES COPYRIGHT RELEASE_NOTES
+ fi
+
+ # Tidy up a bit and create the missing links
+ rm ${D}usr/sbin/mpeuninstall
+ cd ${D}usr/$(get_libdir)
+ dosym libmpich.so.0.0 /usr/$(get_libdir)/libmpich.so
+ dosym libfmpich.so.0.0 /usr/$(get_libdir)/libfmpich.so
+}
+
+pkg_postinst() {
+ python_version
+ python_mod_optimize ${ROOT}usr/bin
+
+ elog ""
+ elog "Note 1: enabling the MPE2 SDK requires both a JDK and the core"
+ elog "X11 library for the full set of log analysis and conversion"
+ elog "utilities. You probably don't want to enable the mpe-sdk USE"
+ elog "flag on a server, cluster node, etc."
+ elog ""
+ elog "Note 2: this package still needs testing with other Fortran90"
+ elog "compilers besides gfortran (gcc4). The tests also need some"
+ elog "magic to build properly within the portage build environment."
+ elog "(currently the tests only build and run manually)"
+ elog ""
+ elog "The gfortran support has been tested successfully with hdf5"
+ elog "(using gfortran and the mpif90 wrapper)."
+ elog ""
+}
+
+pkg_postrm() {
+ python_version
+ python_mod_cleanup
+}