# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=2 inherit eutils fortran multilib DESCRIPTION="DFT electronic structure code using a wavelet basis set" HOMEPAGE="http://inac.cea.fr/L_Sim/BigDFT" SRC_URI="${HOMEPAGE}/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="cuda mpi" RDEPEND="cuda? ( dev-util/nvidia-cuda-sdk ) mpi? ( virtual/mpi ) virtual/lapack virtual/blas" DEPEND="${RDEPEND} >=sys-devel/autoconf-2.59" FORTRAN="gfortran ifc mpif90" src_prepare() { # Patch taken from sci-physics/abinit-5.7.3 bundled version epatch "${FILESDIR}"/${P}-0001.patch } src_configure() { # Build this as a library for sci-physics/abinit econf \ --with-moduledir=/usr/$(get_libdir)/finclude \ $(use_enable mpi) \ $(use_enable cuda cuda-gpu) \ $(use_with cuda cuda-path /opt/cuda) \ $(use_with cuda lib-cutils /opt/cuda/lib) \ FCFLAGS="${FCFLAGS:- ${FFLAGS:- -O2}}" } src_test() { emake check || die } src_install() { emake DESTDIR="${D}" install || die "emake install failed" dodoc README NEWS AUTHORS INSTALL ChangeLog || die "dodoc failed" }