From 308d4f5d3f36a02e720ecb93e97314a0d5da5d9a Mon Sep 17 00:00:00 2001 From: Donnie Berkholz Date: Fri, 27 Mar 2009 22:52:09 +0100 Subject: abinit: further progress toward a working ebuild. - Port to EAPI=2 for easier development, so I don't have to re-run configure when I'm re-running src_compile. - Pull repeated information from plugins options into variables. - Fall back to compiler flags more intelligently. - For tests, use 'report' files instead of anything else because these are very readable and parsed into a format that's easy to interpret. --- sci-physics/abinit/Manifest | 2 +- sci-physics/abinit/abinit-5.7.3.ebuild | 45 ++++++++++++++++++---------------- 2 files changed, 25 insertions(+), 22 deletions(-) (limited to 'sci-physics') diff --git a/sci-physics/abinit/Manifest b/sci-physics/abinit/Manifest index 9e7854a..558e583 100644 --- a/sci-physics/abinit/Manifest +++ b/sci-physics/abinit/Manifest @@ -1,3 +1,3 @@ AUX 5.3.4-change-default-directories.patch 1550 RMD160 02abf8695d4a12b0d47b96f86fedb05f65f0fde8 SHA1 03c6200cbe0458040cd3f7af42a28515b4c17b57 SHA256 3d493ed6f49924c248694d0de5aa0c66ac693b4ce5c6b3ce892471c9b2d7fbf7 DIST abinit-5.7.3.tar.gz 31683174 RMD160 e2a6094a0034b9ccedac845be86b2f85b188f300 SHA1 94410b006038d55531a1d352df63ba7cb0680da9 SHA256 caac56530ceaa5e16326fd4407adcd0b1aede07ded51017f3eb6a6a3696c2867 -EBUILD abinit-5.7.3.ebuild 2360 RMD160 a2211584ce6b990a3874e5eb6a0584f2007a9897 SHA1 7b65c21f2f68253fd12cde8da609301a5fda0b53 SHA256 1ef9ee66d8b68221b7e843faa78765e81041663b8061688c7a5153203de0526f +EBUILD abinit-5.7.3.ebuild 2465 RMD160 0c592e019df0e0f4bce6bc785ccb133e6db1bf97 SHA1 13bdc869c246ea73db3c06355e0300005067e5d1 SHA256 54bfaf200039074be980af0f7e7932d78f97f26d727b84c733a7a574d58dca11 diff --git a/sci-physics/abinit/abinit-5.7.3.ebuild b/sci-physics/abinit/abinit-5.7.3.ebuild index 408ee40..40fab3e 100644 --- a/sci-physics/abinit/abinit-5.7.3.ebuild +++ b/sci-physics/abinit/abinit-5.7.3.ebuild @@ -1,7 +1,9 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -inherit fortran toolchain-funcs +EAPI="2" + +inherit fortran multilib toolchain-funcs DESCRIPTION="Find total energy, charge density and electronic structure using density functional theory" HOMEPAGE="http://www.abinit.org/" @@ -26,38 +28,39 @@ DEPEND="${RDEPEND}" # F90 code, g77 won't work FORTRAN="gfortran ifc mpif90" -src_unpack() { - unpack ${A} - cd "${S}" +src_prepare() { epatch "${FILESDIR}"/5.3.4-change-default-directories.patch - eautoreconf } -src_compile() { +src_configure() { + local libs="-L/usr/$(get_libdir)" + local modules="-I/usr/$(get_libdir)/finclude" econf \ $(use_enable mpi) \ - --with-linalg-libs="-lblas -llapack" \ + --with-linalg-libs="${libs} -lblas -llapack" \ --with-netcdf-includes="-I/usr/include" \ - --with-netcdf-libs="-lnetcdff" \ - --with-fox-includes="-I/usr/lib/finclude" \ - --with-fox-libs="-lwcml" \ - --with-etsf-io-includes="-I/usr/lib/finclude" \ - --with-etsf-io-libs="-letsf_io -letsf_io_low_level -letsf_io_utils" \ - --with-etsf-xc-includes="-I/usr/lib/finclude" \ - --with-etsf-xc-libs="-lxc -lstring_f" \ - --with-bigdft-includes="-I/usr/lib/finclude" \ - --with-bigdft-libs="-lpoissonsolver -lbigdft" \ + --with-netcdf-libs="${libs} -lnetcdff" \ + --with-fox-includes="${modules}" \ + --with-fox-libs="${libs} -lwcml" \ + --with-etsf-io-includes="${modules}" \ + --with-etsf-io-libs="${libs} -letsf_io -letsf_io_low_level -letsf_io_utils" \ + --with-etsf-xc-includes="${modules}" \ + --with-etsf-xc-libs="${libs} -lxc -lstring_f" \ + --with-bigdft-includes="${modules}" \ + --with-bigdft-libs="${libs} -lpoissonsolver -lbigdft" \ --with-wannier90="/usr/bin/wannier90.x" \ - --with-wannier90-includes="-I/usr/lib/finclude" \ - --with-wannier90-libs="-lwannier" \ + --with-wannier90-includes="${modules}" \ + --with-wannier90-libs="${libs} -lwannier" \ --with-cc-optflags="${CFLAGS}" \ - --with-fc-optflags="${FFLAGS}" \ + --with-fc-optflags="${FCFLAGS:- ${FFLAGS:- -O2}}" \ --with-fc-ld-optlibs='-lpthread' \ FC="${FORTRANC}" \ CC="$(tc-getCC)" \ LD="$(tc-getLD)" +} +src_compile() { if use mpi; then emake multi || die else @@ -72,13 +75,13 @@ src_test() { emake tests_dev local REPORT - for REPORT in $(find . -name summary*); do + for REPORT in $(find . -name report); do REPORT=${REPORT#*/} elog "Parameters and unusual results for ${REPORT%%/*} tests" while read line; do elog "${line}" done \ - < <(grep -v 'no significant difference has been found' ${REPORT}) + < <(grep -v -e succeeded -e passed ${REPORT}) done elog "The full test results will be installed as summary_tests.tar.gz." -- cgit v1.2.3-65-gdbad