diff options
author | Markus Dittrich <markusle@gentoo.org> | 2009-12-18 01:26:24 +0000 |
---|---|---|
committer | Markus Dittrich <markusle@gentoo.org> | 2009-12-18 01:26:24 +0000 |
commit | 19ea67d32caeda1f8349c983ee030e5b59b7f915 (patch) | |
tree | 9af46b857046bae200678eccf71f523af9483196 /sci-physics | |
parent | Stable for HPPA (bug #296580). (diff) | |
download | gentoo-2-19ea67d32caeda1f8349c983ee030e5b59b7f915.tar.gz gentoo-2-19ea67d32caeda1f8349c983ee030e5b59b7f915.tar.bz2 gentoo-2-19ea67d32caeda1f8349c983ee030e5b59b7f915.zip |
Updated ebuild so it honors CFLAGS/FFLAGS and installs docs properly (fixes bug#297195).
(Portage version: 2.1.7.14/cvs/Linux x86_64)
Diffstat (limited to 'sci-physics')
-rw-r--r-- | sci-physics/abinit/ChangeLog | 11 | ||||
-rw-r--r-- | sci-physics/abinit/abinit-5.4.4-r1.ebuild | 107 | ||||
-rw-r--r-- | sci-physics/abinit/files/abinit-5.4.4-test.patch | 24 |
3 files changed, 140 insertions, 2 deletions
diff --git a/sci-physics/abinit/ChangeLog b/sci-physics/abinit/ChangeLog index 0f4dab3edd86..c976b6c98c9c 100644 --- a/sci-physics/abinit/ChangeLog +++ b/sci-physics/abinit/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sci-physics/abinit -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-physics/abinit/ChangeLog,v 1.9 2008/07/05 01:10:36 dberkholz Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-physics/abinit/ChangeLog,v 1.10 2009/12/18 01:26:24 markusle Exp $ + +*abinit-5.4.4-r1 (18 Dec 2009) + + 18 Dec 2009; Markus Dittrich <markusle@gentoo.org> + +abinit-5.4.4-r1.ebuild, +files/abinit-5.4.4-test.patch: + Updated ebuild so it honors CFLAGS/FFLAGS and installs docs + properly (fixes bug#297195). *abinit-5.4.4 (05 Jul 2008) diff --git a/sci-physics/abinit/abinit-5.4.4-r1.ebuild b/sci-physics/abinit/abinit-5.4.4-r1.ebuild new file mode 100644 index 000000000000..83cb1ab0dc90 --- /dev/null +++ b/sci-physics/abinit/abinit-5.4.4-r1.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-physics/abinit/abinit-5.4.4-r1.ebuild,v 1.1 2009/12/18 01:26:24 markusle Exp $ + +inherit fortran toolchain-funcs + +DESCRIPTION="Find total energy, charge density and electronic structure using density functional theory" +HOMEPAGE="http://www.abinit.org/" +SRC_URI="ftp://ftp.abinit.org/pub/abinitio/ABINIT_v${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="mpi test" + +RDEPEND="virtual/blas + virtual/lapack" +DEPEND="${RDEPEND}" + +# F90 code, g77 won't work +FORTRAN="gfortran ifc" + +pkg_setup() { + fortran_pkg_setup + + # Doesn't compile with gcc-4.0, only >=4.1 + local diemsg="Requires gcc-4.1 or newer" + if [[ "${FORTRANC}" = "gfortran" ]]; then + if [[ $(gcc-major-version) -eq 4 ]] \ + && [[ $(gcc-minor-version) -lt 1 ]]; then + die "${diemsg}" + fi + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/5.3.4-change-default-directories.patch + epatch "${FILESDIR}"/5.2.3-fix-64bit-detection.patch + epatch "${FILESDIR}"/${P}-test.patch + + # bug #223111: Our eautoreconf directory detection breaks + sed -i -e "s:@abinit_srcdir@/::" Makefile.am + + # bug #223111: libtool 2.2 fix (taken from bug #230271) + if [ -f '/usr/share/aclocal/ltsugar.m4' ]; then + cat "/usr/share/aclocal/ltsugar.m4" >> config/m4/libtool.m4 + cat "/usr/share/aclocal/ltversion.m4" >> config/m4/libtool.m4 + cat "/usr/share/aclocal/lt~obsolete.m4" >> config/m4/libtool.m4 + cat "/usr/share/aclocal/ltoptions.m4" >> config/m4/libtool.m4 + fi + + # Yea for breaking compatibility with no ChangeLog entry in 2.60 + if has_version '>=sys-devel/autoconf-2.60'; then + sed -i -e "s:_AC_SRCPATHS:_AC_SRCDIRS:g" config/m4/init.m4 + fi + + eautoreconf +} + +src_compile() { + econf \ + --disable-config-file \ + $(use_enable mpi) \ + --with-cc-optflags="${CFLAGS}" \ + --with-fc-optflags="${FFLAGS}" \ + --with-fc-ldflags='-lpthread' \ + FC="${FORTRANC}" \ + CC="$(tc-getCC)" \ + LD="$(tc-getLD)" \ + || die "configure failed" + + emake || die "make failed" +} + +src_test() { + einfo "The tests take quite a while, on the order of 2-3 hours" + einfo "on a dual Athlon 2000+." + cd "${S}"/tests + emake tests_dev + + local REPORT + for REPORT in $(find . -name *fl*); do + elog "Results for ${REPORT%%/*} tests" + while read line; do + elog "${line}" + done \ + < <(cat ${REPORT} ) + done +} + +src_install() { + emake DESTDIR="${D}" install || die "install failed" + + if use test; then + dodoc tests/summary_tests.tar.gz + fi + + dodoc KNOWN_PROBLEMS README +} + +pkg_postinst() { + if use test; then + elog "The test results will be installed as summary_tests.tar.gz." + fi +} diff --git a/sci-physics/abinit/files/abinit-5.4.4-test.patch b/sci-physics/abinit/files/abinit-5.4.4-test.patch new file mode 100644 index 000000000000..c9d476a4619f --- /dev/null +++ b/sci-physics/abinit/files/abinit-5.4.4-test.patch @@ -0,0 +1,24 @@ +diff -Naur abinit-5.4.4/tests/Scripts/wrap-parallel-tests.sh abinit-5.4.4.new/tests/Scripts/wrap-parallel-tests.sh +--- abinit-5.4.4/tests/Scripts/wrap-parallel-tests.sh 2007-10-15 00:19:31.000000000 -0400 ++++ abinit-5.4.4.new/tests/Scripts/wrap-parallel-tests.sh 2009-12-17 20:01:02.000000000 -0500 +@@ -22,7 +22,7 @@ + + # Init + my_name="wrap-parallel-tests" +-my_cnffile="tests.env" ++my_cnffile="../tests/tests.env" + + # Check arguments + if test "${#}" -lt "2"; then +diff -Naur abinit-5.4.4/tests/Scripts/wrap-standard-tests.sh abinit-5.4.4.new/tests/Scripts/wrap-standard-tests.sh +--- abinit-5.4.4/tests/Scripts/wrap-standard-tests.sh 2007-10-15 00:19:31.000000000 -0400 ++++ abinit-5.4.4.new/tests/Scripts/wrap-standard-tests.sh 2009-12-17 20:01:22.000000000 -0500 +@@ -3,7 +3,7 @@ + # + + my_name="wrap-standard-tests" +-my_cnffile="tests.env" ++my_cnffile="../tests/tests.env" + + # Check arguments + if test "${#}" -lt "1"; then |