public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Honza Macháček" <Hloupy.Honza@centrum.cz>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-physics/elk/
Date: Fri,  1 Jul 2011 07:10:38 +0000 (UTC)	[thread overview]
Message-ID: <0660974bd34f65d3738a089d144812cc74604247.honza_machacek@gentoo> (raw)

commit:     0660974bd34f65d3738a089d144812cc74604247
Author:     Honza Macháček <Hloupy.Honza <AT> centrum <DOT> cz>
AuthorDate: Fri Jul  1 07:01:36 2011 +0000
Commit:     Honza Macháček <Hloupy.Honza <AT> centrum <DOT> cz>
CommitDate: Fri Jul  1 07:01:36 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=0660974b

New ebuild sci-physics/elk-1.3.15 added (a GPL-3 all-electron FP-LAPW code, used for example by sci-physics/abinit developers for comparison).

---
 sci-physics/elk/ChangeLog         |   12 ++++
 sci-physics/elk/elk-1.3.15.ebuild |  104 +++++++++++++++++++++++++++++++++++++
 2 files changed, 116 insertions(+), 0 deletions(-)

diff --git a/sci-physics/elk/ChangeLog b/sci-physics/elk/ChangeLog
new file mode 100644
index 0000000..558ea51
--- /dev/null
+++ b/sci-physics/elk/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for sci-physics/elk
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*elk-1.3.15 (01 Jul 2011)
+
+  01 Jul 2011; Honza Macháček <Hloupy.Honza@centrum.cz> +elk-1.3.15.ebuild:
+  New ebuild added. Compiled with USE=lapack against lapack-atlas at my box, it
+  failed tests miserably, even with a lot of segfaults. Using its internal
+  lapack with USE=-lapack, it looks well. Tested OK with USE="-lapack libxc mpi
+  openmp".
+

diff --git a/sci-physics/elk/elk-1.3.15.ebuild b/sci-physics/elk/elk-1.3.15.ebuild
new file mode 100644
index 0000000..214bbea
--- /dev/null
+++ b/sci-physics/elk/elk-1.3.15.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="3"
+
+inherit eutils fortran-2 multilib toolchain-funcs
+
+DESCRIPTION="All-electron full-potential linearised augmented-plane wave (FP-LAPW) code with advanced features."
+HOMEPAGE="http://elk.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="-debug lapack libxc mpi openmp test"
+
+RDEPEND="lapack? ( virtual/blas
+		virtual/lapack )
+	libxc? ( =sci-libs/libxc-1.0[fortran] )
+	mpi? ( virtual/mpi )"
+DEPEND="${RDEPEND}
+	dev-util/pkgconfig"
+
+pkg_setup() {
+	fortran-2_pkg_setup
+	if use openmp; then
+		tc-has-openmp || \
+		die "Please select an openmp capable compiler like gcc[openmp]"
+	fi
+}
+
+src_prepare() {
+	if use libxc; then
+		sed -i -e's/^\(SRC_libxc =\)/#\1/' "${S}/src/Makefile"
+	fi
+	if use mpi; then
+		sed -i -e's/^\(SRC_mpi =\)/#\1/' "${S}/src/Makefile"
+	fi
+}
+
+src_configure() {
+	if use mpi; then
+		MY_FC="mpif90"
+		MY_CC="mpicc"
+		MY_CXX="mpic++"
+	else
+		MY_FC="$(tc-getFC)"
+		MY_CC="$(tc-getCC)"
+		MY_CXX="$(tc-getCXX)"
+	fi
+	if use openmp; then
+		MY_FC="${MY_FC} -fopenmp"
+		MY_CC="${MY_CC} -fopenmp"
+		MY_CXX="${MY_CXX} -fopenmp"
+	fi
+	MY_FCFLAGS="${FCFLAGS:- ${FFLAGS:- -O3 -funroll-loops -ffast-math}}"
+	MY_FCFLAGS="${MY_FCFLAGS} -I/usr/include -I/usr/$(get_libdir)/finclude"
+	MY_CFLAGS="${CFLAGS:- -O3 -funroll-loops -ffast-math}"
+	MY_CXXFLAGS="${CXXFLAGS:- ${CFLAGS:- -O3 -funroll-loops -ffast-math}}"
+	echo "MAKE = make" > make.inc
+	echo "F90 = $MY_FC" >> make.inc
+	echo "F90_OPTS = $MY_FCFLAGS" >> make.inc
+	echo "F77 = $MY_FC" >> make.inc
+	echo "F77_OPTS = $MY_FCFLAGS" >> make.inc
+	echo "CC = ${MY_CC}" >> make.inc
+	echo "CXX = ${MY_CXX}" >> make.inc
+	echo "CFLAGS = ${MY_CFLAGS}" >> make.inc
+	echo "CXXFLAGS = ${MY_CXXFLAGS}" >> make.inc
+	echo "LD = $(tc-getLD)" >> make.inc
+	echo "AR = ar" >> make.inc
+	echo "LIB_SYS = " >> make.inc
+	if use lapack; then
+		echo "LIB_LPK = $(pkg-config --libs lapack)" >> make.inc
+	else
+		echo "LIB_LPK = lapack.a blas.a" >> make.inc
+	fi
+	echo "LIB_FFT = fftlib.a" >> make.inc
+	if use libxc; then
+		echo "LIB_XC = -L/usr/$(get_libdir) -lxc" >> make.inc
+		echo "SRC_libxc = libxc_funcs.f90 libxc.f90 libxcifc.f90" >>make.inc
+	fi
+}
+
+src_compile() {
+	emake -j1 || die "make failed"
+}
+
+src_test() {
+	emake test
+}
+
+src_install() {
+	dobin src/elk src/eos/eos src/spacegroup/spacegroup utilities/elk-bands
+	dodoc README
+	for doc in docs/*; do
+		dodoc $doc
+	done
+	insinto /usr/share/${P}
+	doins -r species
+	doins -r utilities
+	doins -r examples
+	doins -r tests
+}



             reply	other threads:[~2011-07-01  7:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-01  7:10 Honza Macháček [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-07-01  7:13 [gentoo-commits] proj/sci:master commit in: sci-physics/elk/ Honza Macháček
2011-12-14 16:21 Honza Macháček
2012-07-07 21:34 Honza Macháček
2013-02-21 22:56 Justin Lecher
2013-02-21 22:56 Justin Lecher
2013-07-23  7:29 Honza Macháček
2015-06-08 12:19 Justin Lecher
2015-09-21 19:05 Justin Lecher
2021-01-19 17:02 Andrew Ammerlaan
2021-02-01  2:57 Horea Christian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0660974bd34f65d3738a089d144812cc74604247.honza_machacek@gentoo \
    --to=hloupy.honza@centrum.cz \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox