diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2011-03-07 17:59:59 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2011-03-07 17:59:59 +0000 |
commit | 35b441c21ffce129bb14f1fa8d0706768558303a (patch) | |
tree | c2912507c332b8333dd4931a61fa03d7d66c3fd6 /sci-libs/arpack | |
parent | Version bump (diff) | |
download | gentoo-2-35b441c21ffce129bb14f1fa8d0706768558303a.tar.gz gentoo-2-35b441c21ffce129bb14f1fa8d0706768558303a.tar.bz2 gentoo-2-35b441c21ffce129bb14f1fa8d0706768558303a.zip |
Fixed MPI for openmpi (bug #354993, thanks Yang Zhang. Added a patch to fix occasional crashes taken from octave/debian.
(Portage version: 2.1.9.42/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs/arpack')
-rw-r--r-- | sci-libs/arpack/ChangeLog | 8 | ||||
-rw-r--r-- | sci-libs/arpack/arpack-96-r3.ebuild | 116 |
2 files changed, 123 insertions, 1 deletions
diff --git a/sci-libs/arpack/ChangeLog b/sci-libs/arpack/ChangeLog index 4324651e6c70..c17257708df4 100644 --- a/sci-libs/arpack/ChangeLog +++ b/sci-libs/arpack/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-libs/arpack # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/arpack/ChangeLog,v 1.24 2011/01/24 21:04:56 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/arpack/ChangeLog,v 1.25 2011/03/07 17:59:59 bicatali Exp $ + +*arpack-96-r3 (07 Mar 2011) + + 07 Mar 2011; Sébastien Fabbro <bicatali@gentoo.org> +arpack-96-r3.ebuild: + Fixed MPI for openmpi (bug #354993, thanks Yang Zhang. Added a patch to fix + occasional crashes taken from octave/debian. 24 Jan 2011; Sébastien Fabbro <bicatali@gentoo.org> arpack-96-r2.ebuild: Added missing lapack dependency, fixed some as-needed requirements for diff --git a/sci-libs/arpack/arpack-96-r3.ebuild b/sci-libs/arpack/arpack-96-r3.ebuild new file mode 100644 index 000000000000..b9833f7ae8c2 --- /dev/null +++ b/sci-libs/arpack/arpack-96-r3.ebuild @@ -0,0 +1,116 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/arpack/arpack-96-r3.ebuild,v 1.1 2011/03/07 17:59:59 bicatali Exp $ + +EAPI=4 +inherit eutils autotools toolchain-funcs flag-o-matic + +DESCRIPTION="Arnoldi package library to solve large scale eigenvalue problems." +HOMEPAGE="http://www.caam.rice.edu/software/ARPACK/" +SRC_URI="http://www.caam.rice.edu/software/ARPACK/SRC/${PN}${PV}.tar.gz + http://www.caam.rice.edu/software/ARPACK/SRC/p${PN}${PV}.tar.gz + http://dev.gentoo.org/~bicatali/${P}-patches-2.tar.bz2 + doc? ( http://www.caam.rice.edu/software/ARPACK/SRC/ug.ps.gz + http://www.caam.rice.edu/software/ARPACK/DOCS/tutorial.ps.gz )" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="doc examples mpi static-libs" + +RDEPEND="virtual/blas + virtual/lapack + mpi? ( virtual/mpi )" +DEPEND="${RDEPEND} + dev-util/pkgconfig" + +S="${WORKDIR}/ARPACK" + +src_unpack() { + unpack ${A} + unpack ./*patch.tar.gz +} + +src_prepare() { + cd "${WORKDIR}" + epatch "${WORKDIR}"/${PN}-arscnd.patch + # http://savannah.gnu.org/bugs/?func=detailitem&item_id=31479 + epatch "${WORKDIR}"/${PN}-neupd.patch + epatch "${WORKDIR}"/${PN}-autotools.patch + + cd "${S}" + # fix examples library paths + sed -i \ + -e '/^include/d' \ + -e "s:\$(ALIBS):-larpack $(pkg-config --libs blas lapack):g" \ + -e 's:$(FFLAGS):$(FFLAGS) $(LDFLAGS):g' \ + EXAMPLES/*/makefile || die "sed failed" + + sed -i \ + -e '/^include/d' \ + -e "s:\$(PLIBS):-larpack -lparpack $(pkg-config --libs blas lapack):g" \ + -e 's:_$(PLAT)::g' \ + -e 's:$(PFC):mpif77:g' \ + -e 's:$(PFFLAGS):$(FFLAGS) $(LDFLAGS) $(EXTOBJS):g' \ + PARPACK/EXAMPLES/MPI/makefile || die "sed failed" + + # bug #354993 + rm -f PARPACK/SRC/MPI/mpif.h + #ln -s "${EPREFIX}"/usr/include/mpif*.h PARPACK/SRC/MPI/ + eautoreconf +} + +src_configure() { + econf \ + --with-blas="$(pkg-config --libs blas)" \ + --with-lapack="$(pkg-config --libs lapack)" \ + $(use_enable static-libs static) \ + $(use_enable mpi) +} + +src_test() { + pushd EXAMPLES/SIMPLE + emake simple FC=$(tc-getFC) LDFLAGS="${LDFLAGS} -L${S}/.libs" + local prog= + for p in ss ds sn dn cn zn; do + prog=${p}simp + LD_LIBRARY_PATH="${S}/.libs" ./${prog} \ + || die "${prog} test failed" + rm -f ${prog} *.o + done + popd + + if use mpi; then + pushd PARPACK/EXAMPLES/MPI + mpif77 ${FFLAGS} -c ../../../LAPACK/dpttr{f,s}.f \ + || die "compiling dpttrf,s failed" + emake \ + FC=mpif77 \ + EXTOBJS="dpttr{f,s}.o" \ + LDFLAGS="${LDFLAGS} -L${S}/.libs -L${S}/PARPACK/.libs" \ + pdndrv || die "emake pdndrv failed" + for p in 1 3; do + prog=pdndrv${p} + LD_LIBRARY_PATH="${S}/.libs:${S}/PARPACK/.libs" \ + ./${prog} || die "${prog} test failed" + rm -f ${prog} *.o + done + popd + fi +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc README DOCUMENTS/*.doc + newdoc DOCUMENTS/README README.doc + use doc && dodoc "${WORKDIR}"/*.ps + if use examples; then + insinto /usr/share/doc/${PF} + doins -r EXAMPLES + if use mpi; then + insinto /usr/share/doc/${PF}/EXAMPLES/PARPACK + doins -r PARPACK/EXAMPLES/MPI + fi + fi +} |