diff options
author | Justin Lecher <jlec@gentoo.org> | 2011-07-17 12:50:56 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2011-07-17 12:50:56 +0000 |
commit | 5fe547e25d23980b3fd1a73bb95f296b2804f8e6 (patch) | |
tree | 112ac39b699af4f4f23e584ad0eb60ec04dfb19d /sci-chemistry/mpqc | |
parent | [sci-chemistry/votca-csg] Added IUSE=examples (diff) | |
download | historical-5fe547e25d23980b3fd1a73bb95f296b2804f8e6.tar.gz historical-5fe547e25d23980b3fd1a73bb95f296b2804f8e6.tar.bz2 historical-5fe547e25d23980b3fd1a73bb95f296b2804f8e6.zip |
Use pkg-config for blas/lapack detection, #262143
Package-Manager: portage-2.2.0_alpha45/cvs/Linux x86_64
Diffstat (limited to 'sci-chemistry/mpqc')
-rw-r--r-- | sci-chemistry/mpqc/ChangeLog | 11 | ||||
-rw-r--r-- | sci-chemistry/mpqc/files/mpqc-2.3.1-blas.patch | 55 | ||||
-rw-r--r-- | sci-chemistry/mpqc/metadata.xml | 8 | ||||
-rw-r--r-- | sci-chemistry/mpqc/mpqc-2.3.1-r1.ebuild | 29 | ||||
-rw-r--r-- | sci-chemistry/mpqc/mpqc-2.3.1-r2.ebuild | 32 | ||||
-rw-r--r-- | sci-chemistry/mpqc/mpqc-2.3.1-r3.ebuild | 101 |
6 files changed, 202 insertions, 34 deletions
diff --git a/sci-chemistry/mpqc/ChangeLog b/sci-chemistry/mpqc/ChangeLog index 775620ab1343..8a1f373bed29 100644 --- a/sci-chemistry/mpqc/ChangeLog +++ b/sci-chemistry/mpqc/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sci-chemistry/mpqc -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/mpqc/ChangeLog,v 1.22 2010/12/16 15:19:28 jlec Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/mpqc/ChangeLog,v 1.23 2011/07/17 12:50:56 jlec Exp $ + +*mpqc-2.3.1-r3 (17 Jul 2011) + + 17 Jul 2011; Justin Lecher <jlec@gentoo.org> mpqc-2.3.1-r1.ebuild, + mpqc-2.3.1-r2.ebuild, +mpqc-2.3.1-r3.ebuild, +files/mpqc-2.3.1-blas.patch, + metadata.xml: + Use pkg-config for blas/lapack detection, #262143 16 Dec 2010; Justin Lecher <jlec@gentoo.org> mpqc-2.3.1-r1.ebuild, mpqc-2.3.1-r2.ebuild: diff --git a/sci-chemistry/mpqc/files/mpqc-2.3.1-blas.patch b/sci-chemistry/mpqc/files/mpqc-2.3.1-blas.patch new file mode 100644 index 000000000000..b99c82fb71da --- /dev/null +++ b/sci-chemistry/mpqc/files/mpqc-2.3.1-blas.patch @@ -0,0 +1,55 @@ + configure.in | 36 +++--------------------------------- + 1 files changed, 3 insertions(+), 33 deletions(-) + +diff --git a/configure.in b/configure.in +index ee82977..caae1f9 100644 +--- a/configure.in ++++ b/configure.in +@@ -1487,44 +1487,14 @@ AC_LANG_CPLUSPLUS + LIBSSAV="$LIBS" + LIBS="$LIBSSAV $FLIBS" + +-LIBBLAS="" +-F77_DGEMM=`$PERL $srcdir/bin/mkf77sym.pl.in -method $F77_SYMBOLS DAXPY` +-AC_CHECK_FUNC($F77_DGEMM,HAVE_BLAS=yes,[ +- AC_CHECK_LIB(essl,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lessl"], +- AC_CHECK_LIB(blas,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lblas"]) +- )] +-) +-if test X$HAVE_BLAS != Xyes; then +- LIBSSAV2="$LIBS" +- LIBS="-latlas $LIBS" +- AC_CHECK_LIB(f77blas,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lf77blas -latlas"], +- LIBS="$LIBSSAV2") +-fi +-AC_SUBST(HAVE_BLAS) +-if test X$HAVE_BLAS != Xyes; then +- echo "WARNING: Could not link to the BLAS library. It can be obtained at" +- echo "http://www.netlib.org/blas. Use --with-libdirs and/or --with-libs" +- echo "to specify the name of the library." +- AC_MSG_ERROR([BLAS is required to complete the build]) +-fi ++PKG_CHECK_MODULES([BLAS], [blas], [LIBBLAS="${BLAS_LIBS}"]) + + LIBS="$LIBSSAV $LIBBLAS $FLIBS" + +-LIBLAPACK="" +-F77_DGESVD=`$PERL $srcdir/bin/mkf77sym.pl.in -method $F77_SYMBOLS DGESVD` +-AC_CHECK_FUNC($F77_DGESVD,HAVE_LAPACK=yes,[ +- AC_CHECK_LIB(lapack,$F77_DGESVD,[HAVE_LAPACK=yes;LIBLAPACK="-llapack"] +- )] +-) +-AC_SUBST(HAVE_LAPACK) +-if test X$HAVE_LAPACK != Xyes; then +- echo "Could not link to the LAPACK library. It can be obtained at" +- echo "http://www.netlib.org/lapack. Use --with-libdirs and/or --with-libs" +- echo "to specify the name of the library." +- AC_MSG_ERROR([LAPACK is required to complete the build]) +-fi ++PKG_CHECK_MODULES([LAPACK], [lapack], [LIBLAPACK="${LAPACK_LIBS}"]) + + FLIBS="$LIBLAPACK $LIBBLAS $FLIBS" ++ + AC_LANG_RESTORE + + dnl ----------- check for Scalable BLAS library -------------- diff --git a/sci-chemistry/mpqc/metadata.xml b/sci-chemistry/mpqc/metadata.xml index dafc7c94643e..ed0fef59f844 100644 --- a/sci-chemistry/mpqc/metadata.xml +++ b/sci-chemistry/mpqc/metadata.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer> - <email>markusle@gentoo.org</email> - <name>Markus Dittrich</name> - </maintainer> + <maintainer> + <email>markusle@gentoo.org</email> + <name>Markus Dittrich</name> + </maintainer> <herd>sci-chemistry</herd> </pkgmetadata> diff --git a/sci-chemistry/mpqc/mpqc-2.3.1-r1.ebuild b/sci-chemistry/mpqc/mpqc-2.3.1-r1.ebuild index 74f12add7301..49e032af60ec 100644 --- a/sci-chemistry/mpqc/mpqc-2.3.1-r1.ebuild +++ b/sci-chemistry/mpqc/mpqc-2.3.1-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/mpqc/mpqc-2.3.1-r1.ebuild,v 1.8 2010/12/16 15:19:28 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/mpqc/mpqc-2.3.1-r1.ebuild,v 1.9 2011/07/17 12:50:56 jlec Exp $ DESCRIPTION="The Massively Parallel Quantum Chemistry Program" HOMEPAGE="http://www.mpqc.org/" @@ -8,18 +8,19 @@ SRC_URI="mirror://sourceforge/mpqc/${P}.tar.bz2" LICENSE="GPL-2" SLOT="0" -# Should work on x86, amd64 and ppc, at least KEYWORDS="amd64 ppc ppc64 x86" IUSE="doc threads tk" -RDEPEND="virtual/blas +RDEPEND=" + virtual/blas virtual/lapack tk? ( dev-lang/tk )" DEPEND="${RDEPEND} sys-devel/flex dev-lang/perl - >=sys-apps/sed-4 - doc? ( app-doc/doxygen + sys-apps/sed + doc? ( + app-doc/doxygen media-gfx/graphviz )" src_unpack() { @@ -28,7 +29,8 @@ src_unpack() { # do not install tkmolrender if not requested if ! use tk; then - sed -e "s:.*/bin/molrender/tkmolrender.*::" \ + sed \ + -e "s:.*/bin/molrender/tkmolrender.*::" \ -e "s:.*\$(INSTALLBINOPT) tkmolrender.*::" \ -e "s:/bin/rm -f tkmolrender::" \ -i "./src/bin/molrender/Makefile" \ @@ -42,9 +44,10 @@ src_compile() { econf \ $(use_enable threads) \ --enable-shared \ - ${myconf} || die "configure failed" + ${myconf} - sed -i -e "s:^CFLAGS =.*$:CFLAGS=${CFLAGS}:" \ + sed \ + -e "s:^CFLAGS =.*$:CFLAGS=${CFLAGS}:" \ -e "s:^FFLAGS =.*$:FFLAGS=${FFLAGS:- -O2}:" \ -e "s:^CXXFLAGS =.*$:CXXFLAGS=${CXXFLAGS}:" \ lib/LocalMakefile @@ -57,11 +60,11 @@ src_test() { # we'll only run the small test set, since the # medium and large ones take >10h and >24h on my # 1.8Ghz P4M - make check0 || die "failed in test routines" + emake -j1 check0 || die "failed in test routines" } src_install() { - make installroot="${D}" install install_devel install_inc \ + emake -j1 installroot="${D}" install install_devel install_inc \ || die "install failed" dodoc CHANGES CITATION README || die "failed to install docs" @@ -69,8 +72,8 @@ src_install() { # make extended docs if use doc; then cd "${S}"/doc - make all || die "failed to generate documentation" - doman man/man1/* && doman man/man3/* || \ + emake -j1 all || die "failed to generate documentation" + doman man/man1/* man/man3/* || \ die "failed to install man pages" dohtml -r html/ fi diff --git a/sci-chemistry/mpqc/mpqc-2.3.1-r2.ebuild b/sci-chemistry/mpqc/mpqc-2.3.1-r2.ebuild index 2040198dcd4a..92c858c611fa 100644 --- a/sci-chemistry/mpqc/mpqc-2.3.1-r2.ebuild +++ b/sci-chemistry/mpqc/mpqc-2.3.1-r2.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/mpqc/mpqc-2.3.1-r2.ebuild,v 1.4 2010/12/16 15:19:28 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/mpqc/mpqc-2.3.1-r2.ebuild,v 1.5 2011/07/17 12:50:56 jlec Exp $ EAPI=2 @@ -23,18 +23,20 @@ RDEPEND=" DEPEND="${RDEPEND} dev-lang/perl sys-devel/flex - >=sys-apps/sed-4 - doc? ( app-doc/doxygen + sys-apps/sed + doc? ( + app-doc/doxygen media-gfx/graphviz )" src_prepare() { - epatch "${FILESDIR}/${P}-as-needed.patch" - epatch "${FILESDIR}/${P}-respect-ldflags.patch" - # it's a nasty workaround rather than patch - epatch "${FILESDIR}/${P}-test-failure-hack.patch" + epatch \ + "${FILESDIR}"/${P}-as-needed.patch \ + "${FILESDIR}"/${P}-respect-ldflags.patch \ + "${FILESDIR}"/${P}-test-failure-hack.patch # do not install tkmolrender if not requested if ! use tk; then - sed -e "s:.*/bin/molrender/tkmolrender.*::" \ + sed \ + -e "s:.*/bin/molrender/tkmolrender.*::" \ -e "s:.*\$(INSTALLBINOPT) tkmolrender.*::" \ -e "s:/bin/rm -f tkmolrender::" \ -i "./src/bin/molrender/Makefile" \ @@ -44,8 +46,7 @@ src_prepare() { } src_configure() { - tc-export CC - tc-export CXX + tc-export CC CXX if use mpi; then export CC=mpicc export CXX=mpicxx @@ -56,7 +57,8 @@ src_configure() { --enable-shared \ ${myconf} - sed -i -e "s:^CFLAGS =.*$:CFLAGS=${CFLAGS}:" \ + sed \ + -e "s:^CFLAGS =.*$:CFLAGS=${CFLAGS}:" \ -e "s:^FFLAGS =.*$:FFLAGS=${FFLAGS:- -O2}:" \ -e "s:^CXXFLAGS =.*$:CXXFLAGS=${CXXFLAGS}:" \ lib/LocalMakefile @@ -68,7 +70,7 @@ src_test() { # we'll only run the small test set, since the # medium and large ones take >10h and >24h on my # 1.8Ghz P4M - make check0 || die "failed in test routines" + emake -j1 check0 || die "failed in test routines" } src_install() { @@ -80,8 +82,8 @@ src_install() { # make extended docs if use doc; then cd "${S}"/doc - make all || die "failed to generate documentation" - doman man/man1/* && doman man/man3/* || \ + emake -j1 all || die "failed to generate documentation" + doman man/man1/* man/man3/* || \ die "failed to install man pages" dohtml -r html/ fi diff --git a/sci-chemistry/mpqc/mpqc-2.3.1-r3.ebuild b/sci-chemistry/mpqc/mpqc-2.3.1-r3.ebuild new file mode 100644 index 000000000000..5956831ef6fa --- /dev/null +++ b/sci-chemistry/mpqc/mpqc-2.3.1-r3.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/mpqc/mpqc-2.3.1-r3.ebuild,v 1.1 2011/07/17 12:50:56 jlec Exp $ + +EAPI=4 + +inherit autotools eutils toolchain-funcs + +DESCRIPTION="The Massively Parallel Quantum Chemistry Program" +HOMEPAGE="http://www.mpqc.org/" +SRC_URI="mirror://sourceforge/mpqc/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="doc mpi threads tk" + +RDEPEND=" + virtual/blas + virtual/lapack + mpi? ( virtual/mpi[cxx] ) + tk? ( dev-lang/tk )" +DEPEND="${RDEPEND} + dev-lang/perl + sys-devel/flex + sys-apps/sed + doc? ( + app-doc/doxygen + media-gfx/graphviz )" + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-as-needed.patch \ + "${FILESDIR}"/${P}-respect-ldflags.patch \ + "${FILESDIR}"/${P}-test-failure-hack.patch \ + "${FILESDIR}"/${P}-blas.patch + # do not install tkmolrender if not requested + if ! use tk; then + sed \ + -e "s:.*/bin/molrender/tkmolrender.*::" \ + -e "s:.*\$(INSTALLBINOPT) tkmolrender.*::" \ + -e "s:/bin/rm -f tkmolrender::" \ + -i "./src/bin/molrender/Makefile" \ + || die "failed to disable tkmolrender" + fi + eautoreconf +} + +src_configure() { + tc-export CC CXX + if use mpi; then + export CC=mpicc + export CXX=mpicxx + fi + econf \ + $(use_enable threads) \ + $(use_enable mpi parallel) \ + --enable-shared \ + ${myconf} + + sed \ + -e "s:^CFLAGS =.*$:CFLAGS=${CFLAGS}:" \ + -e "s:^FFLAGS =.*$:FFLAGS=${FFLAGS:- -O2}:" \ + -e "s:^CXXFLAGS =.*$:CXXFLAGS=${CXXFLAGS}:" \ + -i lib/LocalMakefile || die +} + +src_test() { + cd "${S}"/src/bin/mpqc/validate + + # we'll only run the small test set, since the + # medium and large ones take >10h and >24h on my + # 1.8Ghz P4M + emake -j1 check0 +} + +src_install() { + emake installroot="${D}" install install_devel install_inc + + dodoc CHANGES CITATION README + + # make extended docs + if use doc; then + cd "${S}"/doc + emake -j1 all + doman man/man1/* man/man3/* + dohtml -r html + fi +} + +pkg_postinst() { + echo + einfo "MPQC can be picky with regard to compilation flags." + einfo "If during mpqc runs you have trouble converging or " + einfo "experience oscillations during SCF interations, " + einfo "consider recompiling with less aggressive CFLAGS/CXXFLAGS." + einfo "Particularly, replacing -march=pentium4 by -march=pentium3" + einfo "might help if you encounter problems with correlation " + einfo "consistent basis sets." + echo +} |