From aa6932070f0ba14088360ea28b017bc30d4a2c5b Mon Sep 17 00:00:00 2001 From: Justin Bronder Date: Thu, 5 Aug 2010 04:03:10 +0000 Subject: Fix #313045, add missing libs during linking (Portage version: 2.2_rc67/cvs/Linux x86_64) --- sys-cluster/mpich2/ChangeLog | 9 +- .../files/mpich2-1.2.1-fix-missing-libs.patch | 33 ++++ sys-cluster/mpich2/mpich2-1.2.1_p1-r1.ebuild | 199 +++++++++++++++++++++ sys-cluster/mpich2/mpich2-1.2.1_p1.ebuild | 197 -------------------- 4 files changed, 240 insertions(+), 198 deletions(-) create mode 100644 sys-cluster/mpich2/files/mpich2-1.2.1-fix-missing-libs.patch create mode 100644 sys-cluster/mpich2/mpich2-1.2.1_p1-r1.ebuild delete mode 100644 sys-cluster/mpich2/mpich2-1.2.1_p1.ebuild (limited to 'sys-cluster/mpich2') diff --git a/sys-cluster/mpich2/ChangeLog b/sys-cluster/mpich2/ChangeLog index 0bdba2c559c6..9c10971833ef 100644 --- a/sys-cluster/mpich2/ChangeLog +++ b/sys-cluster/mpich2/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-cluster/mpich2 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpich2/ChangeLog,v 1.56 2010/07/08 12:58:23 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpich2/ChangeLog,v 1.57 2010/08/05 04:03:09 jsbronder Exp $ + +*mpich2-1.2.1_p1-r1 (05 Aug 2010) + + 05 Aug 2010; Justin Bronder + -mpich2-1.2.1_p1.ebuild, +mpich2-1.2.1_p1-r1.ebuild, + +files/mpich2-1.2.1-fix-missing-libs.patch: + Fix #313045, add missing libs during linking 08 Jul 2010; Arfrever Frehtes Taifersar Arahesis mpich2-1.2.1_p1.ebuild: diff --git a/sys-cluster/mpich2/files/mpich2-1.2.1-fix-missing-libs.patch b/sys-cluster/mpich2/files/mpich2-1.2.1-fix-missing-libs.patch new file mode 100644 index 000000000000..1f2ba04cfe1c --- /dev/null +++ b/sys-cluster/mpich2/files/mpich2-1.2.1-fix-missing-libs.patch @@ -0,0 +1,33 @@ +From 94707148dc8c33a1d3245e1f0dd7e28542f91e75 Mon Sep 17 00:00:00 2001 +From: Steve Arnold +Date: Wed, 4 Aug 2010 23:34:06 -0400 +Subject: [PATCH] Added missing library references for the f90 and C++ shared libraries + +Backport of upstream r6848. Directly modifies the Makefile.in to avoid +having to call simplemake to regenerate the entire build system. + +http://trac.mcs.anl.gov/projects/mpich2/changeset/6848 +--- + Makefile.in | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index cbe4a93..d12babb 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -143,10 +143,10 @@ lib/libf${MPILIBNAME}.@SHLIB_EXT@: lib/libf${MPILIBNAME}.la + (cd lib && $(CREATESHLIB) --mode=link -version-info "@ABIVERSION@" -o libf${MPILIBNAME}.la -rpath $(libdir) -L. -l$(MPILIBNAME) -ldflags "$(LDFLAGS)" $(LIBS)) + # Build the shared library from the shared object files + lib/lib${MPILIBNAME}f90.@SHLIB_EXT@: lib/lib${MPILIBNAME}f90.la +- (cd lib && $(CREATESHLIB) --mode=link -version-info "@ABIVERSION@" -o lib${MPILIBNAME}f90.la -rpath $(libdir) -ldflags "$(LDFLAGS)" $(LIBS)) ++ (cd lib && $(CREATESHLIB) --mode=link -version-info "@ABIVERSION@" -o lib${MPILIBNAME}f90.la -rpath $(libdir) -L. -l$(MPILIBNAME) -ldflags "$(LDFLAGS)" $(LIBS)) + # Build the shared library from the shared object files + lib/lib${MPICXXLIBNAME}.@SHLIB_EXT@: lib/lib${MPICXXLIBNAME}.la +- (cd lib && $(CREATESHLIB) --mode=link -version-info "@ABIVERSION@" -o lib${MPICXXLIBNAME}.la -rpath $(libdir) -ldflags "$(LDFLAGS)" $(LIBS)) ++ (cd lib && $(CREATESHLIB) --mode=link -version-info "@ABIVERSION@" -o lib${MPICXXLIBNAME}.la -rpath $(libdir) -L. -l$(MPILIBNAME) -ldflags "$(LDFLAGS)" $(LIBS)) + + # -------------------------------------------------------------------------- + .libstamp0: +-- +1.7.1 + 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 000000000000..3be1a71f8f39 --- /dev/null +++ b/sys-cluster/mpich2/mpich2-1.2.1_p1-r1.ebuild @@ -0,0 +1,199 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpich2/mpich2-1.2.1_p1-r1.ebuild,v 1.1 2010/08/05 04:03:08 jsbronder Exp $ + +EAPI=2 +PYTHON_DEPEND="2" + +inherit eutils fortran python + +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" + +COMMON_DEPEND="dev-libs/libaio + romio? ( net-fs/nfs-utils ) + pvfs2? ( >=sys-cluster/pvfs2-2.7.0 )" + +DEPEND="${COMMON_DEPEND} + dev-lang/perl + sys-devel/libtool" + +RDEPEND="${COMMON_DEPEND} + !media-sound/mpd + !sys-cluster/openmpi + !sys-cluster/lam-mpi" + +S="${WORKDIR}"/${PN}-${MY_PV} + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup + + 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 + MPD_CONF_FILE_DIR=/etc/${PN} +} + +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 + # Upstream trunk, r6848 #313045 + epatch "${FILESDIR}"/mpich2-1.2.1-fix-missing-libs.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 + + # 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 + + c="${c} --sysconfdir=/etc/${PN}" + econf ${c} ${romio_conf} \ + --docdir=/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 f + emake DESTDIR="${D}" install || die + + dodir ${MPD_CONF_FILE_DIR} + insinto ${MPD_CONF_FILE_DIR} + doins "${FILESDIR}"/mpd.conf || die + + dodir /usr/share/doc/${PF} + dodoc COPYRIGHT README CHANGES RELEASE_NOTES || die + newdoc src/pm/mpd/README README.mpd || die + if use romio; then + newdoc src/mpi/romio/README README.romio || die + fi + + if ! use doc; then + rm -rf "${D}"/usr/share/doc/www* + else + dodir /usr/share/doc/${PF}/www + mv "${D}"/usr/share/doc/www*/* "${D}"/usr/share/doc/${PF}/www/ + fi + + # See #316937 + MPD_PYTHON_MODULES="" + for f in "${D}"/usr/bin/*.py; do + MPD_PYTHON_MODULES="${MPD_PYTHON_MODULES} ${f##${D}}" + done +} + +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 "" + + python_mod_optimize ${MPD_PYTHON_MODULES} +} + +pkg_postrm() { + python_mod_cleanup ${MPD_PYTHON_MODULES} +} diff --git a/sys-cluster/mpich2/mpich2-1.2.1_p1.ebuild b/sys-cluster/mpich2/mpich2-1.2.1_p1.ebuild deleted file mode 100644 index 6f2b3609572d..000000000000 --- a/sys-cluster/mpich2/mpich2-1.2.1_p1.ebuild +++ /dev/null @@ -1,197 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpich2/mpich2-1.2.1_p1.ebuild,v 1.5 2010/07/08 12:58:23 arfrever Exp $ - -EAPI=2 -PYTHON_DEPEND="2" - -inherit eutils fortran python - -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" - -COMMON_DEPEND="dev-libs/libaio - romio? ( net-fs/nfs-utils ) - pvfs2? ( >=sys-cluster/pvfs2-2.7.0 )" - -DEPEND="${COMMON_DEPEND} - dev-lang/perl - sys-devel/libtool" - -RDEPEND="${COMMON_DEPEND} - !media-sound/mpd - !sys-cluster/openmpi - !sys-cluster/lam-mpi" - -S="${WORKDIR}"/${PN}-${MY_PV} - -pkg_setup() { - python_set_active_version 2 - python_pkg_setup - - 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 - MPD_CONF_FILE_DIR=/etc/${PN} -} - -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() - 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 - - c="${c} --sysconfdir=/etc/${PN}" - econf ${c} ${romio_conf} \ - --docdir=/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 f - emake DESTDIR="${D}" install || die - - dodir ${MPD_CONF_FILE_DIR} - insinto ${MPD_CONF_FILE_DIR} - doins "${FILESDIR}"/mpd.conf || die - - dodir /usr/share/doc/${PF} - dodoc COPYRIGHT README CHANGES RELEASE_NOTES || die - newdoc src/pm/mpd/README README.mpd || die - if use romio; then - newdoc src/mpi/romio/README README.romio || die - fi - - if ! use doc; then - rm -rf "${D}"/usr/share/doc/www* - else - dodir /usr/share/doc/${PF}/www - mv "${D}"/usr/share/doc/www*/* "${D}"/usr/share/doc/${PF}/www/ - fi - - # See #316937 - MPD_PYTHON_MODULES="" - for f in "${D}"/usr/bin/*.py; do - MPD_PYTHON_MODULES="${MPD_PYTHON_MODULES} ${f##${D}}" - done -} - -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 "" - - python_mod_optimize ${MPD_PYTHON_MODULES} -} - -pkg_postrm() { - python_mod_cleanup ${MPD_PYTHON_MODULES} -} -- cgit v1.2.3-65-gdbad