aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHonza Macháček <Hloupy.Honza@centrum.cz>2011-12-14 14:24:36 +0100
committerHonza Macháček <Hloupy.Honza@centrum.cz>2011-12-14 14:24:36 +0100
commit3f27ec4bd917aa7c310ded708f1aaa041ba4bb61 (patch)
treecba4b1855b670661ef544e30998d661010e870bf /sci-libs/bigdft/bigdft-1.2.0.5.ebuild
parentmedia-gfx/librecad: version bump to 2.0.0_alpha1 (diff)
downloadsci-3f27ec4bd917aa7c310ded708f1aaa041ba4bb61.tar.gz
sci-3f27ec4bd917aa7c310ded708f1aaa041ba4bb61.tar.bz2
sci-3f27ec4bd917aa7c310ded708f1aaa041ba4bb61.zip
sci-physics/abinit updated to 6.10.3, sci-libs/bigdft to 1.2.0.5, and sci-libs/libxc to 1.1.0
Diffstat (limited to 'sci-libs/bigdft/bigdft-1.2.0.5.ebuild')
-rw-r--r--sci-libs/bigdft/bigdft-1.2.0.5.ebuild86
1 files changed, 86 insertions, 0 deletions
diff --git a/sci-libs/bigdft/bigdft-1.2.0.5.ebuild b/sci-libs/bigdft/bigdft-1.2.0.5.ebuild
new file mode 100644
index 000000000..43b4bd9b3
--- /dev/null
+++ b/sci-libs/bigdft/bigdft-1.2.0.5.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=3
+
+inherit eutils fortran-2 toolchain-funcs
+
+DESCRIPTION="A DFT electronic structure code using a wavelet basis set"
+HOMEPAGE="http://inac.cea.fr/L_Sim/BigDFT/"
+SRC_URI="
+ http://inac.cea.fr/L_Sim/BigDFT/${P}.tar.gz
+ http://inac.cea.fr/L_Sim/BigDFT/${PN}-1.3.2.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cuda doc mpi test"
+
+RDEPEND="
+ =sci-libs/libxc-1*[fortran]
+ virtual/blas
+ virtual/fortran
+ virtual/lapack
+ mpi? ( virtual/mpi )
+ cuda? ( dev-util/nvidia-cuda-sdk )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ >=sys-devel/autoconf-2.59
+ doc? ( virtual/latex-base )"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-0001.patch \
+ "${FILESDIR}"/${PN}-1.2.0.2-testH.patch
+
+ rm -r src/PSolver/ABINIT-common
+ mv ../${PN}-1.3.2/src/PSolver/ABINIT-common src/PSolver/
+ sed -i -e's%@LIBXC_INCLUDE@%-I/usr/lib/finclude%g' \
+ src/PSolver/ABINIT-common/Makefile.*
+ sed -i -e's%config\.inc%config.h%g' \
+ src/PSolver/ABINIT-common/*.F90
+}
+
+src_configure() {
+ # fortran-2.eclass does not handle mpi wrappers
+ if use mpi; then
+ export FC="mpif90"
+ export CC="mpicc"
+ else
+ tc-export FC CC
+ fi
+
+ econf \
+ $(use_enable mpi) \
+ --enable-libpoissonsolver \
+ --enable-libbigdft \
+ --enable-binaries \
+ --with-moduledir=/usr/$(get_libdir)/finclude \
+ --with-ext-linalg="`pkg-config --libs-only-l lapack`" \
+ --with-ext-linalg-path="`pkg-config --libs-only-L lapack`" \
+ --with-xc-module-path="/usr/lib/finclude" \
+ $(use_enable cuda cuda-gpu) \
+ $(use_with cuda cuda-path /opt/cuda) \
+ $(use_with cuda lib-cutils /opt/cuda/lib) \
+ FCFLAGS="${FCFLAGS:- ${FFLAGS:- -O2}}" \
+ LD="$(tc-getLD)"
+}
+
+src_compile() {
+ emake -j1 HAVE_ETSF_XC=1 || die "make failed"
+ if use doc; then
+ emake HAVE_ETSF_XC=1 doc || die "make doc failed"
+ fi
+}
+
+src_test() {
+ if use test; then
+ emake check
+ fi
+}
+
+src_install() {
+ emake HAVE_ETSF_XC=1 DESTDIR="${D}" install || die "install failed"
+ dodoc README INSTALL ChangeLog AUTHORS NEWS || die "dodoc failed"
+}