aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHonza Macháček <Hloupy.Honza@centrum.cz>2013-07-23 09:28:50 +0200
committerHonza Macháček <Hloupy.Honza@centrum.cz>2013-07-23 09:28:50 +0200
commit196316795959bbc75e9dc351d0d18bb4c7b21429 (patch)
tree5be143080398ca0d7825e3bc9065aaf1f85ae3d3 /sci-physics
parentsci-chemistry/coot: Don't use relative path (diff)
downloadsci-196316795959bbc75e9dc351d0d18bb4c7b21429.tar.gz
sci-196316795959bbc75e9dc351d0d18bb4c7b21429.tar.bz2
sci-196316795959bbc75e9dc351d0d18bb4c7b21429.zip
sci-physics/elk updated to 2.1.25. OpenMP detection improved, python script installation added, obsolete usage of LIBDIR/finclude removed.
Package-Manager: portage-2.1.12.13
Diffstat (limited to 'sci-physics')
-rw-r--r--sci-physics/elk/ChangeLog7
-rw-r--r--sci-physics/elk/Manifest1
-rw-r--r--sci-physics/elk/elk-2.1.25.ebuild131
-rw-r--r--sci-physics/elk/metadata.xml10
4 files changed, 149 insertions, 0 deletions
diff --git a/sci-physics/elk/ChangeLog b/sci-physics/elk/ChangeLog
index 2a837bcdd..9f01d7650 100644
--- a/sci-physics/elk/ChangeLog
+++ b/sci-physics/elk/ChangeLog
@@ -2,6 +2,13 @@
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+*elk-2.1.25 (23 Jul 2013)
+
+ 23 Jul 2013; Honza Macháček <Hloupy.Honza@centrum.cz> +elk-2.1.25.ebuild,
+ metadata.xml:
+ Version bump to 2.1.25. OpenMP detection improved, python script installation
+ added, obsolete usage of LIBDIR/finclude removed.
+
18 Jun 2013; Honza Macháček <Hloupy.Honza@centrum.cz> elk-1.4.22.ebuild:
The dependency on sci-libs/libxc adapted to its recent change in the upgrade
of sci-physics/abinit & friends.
diff --git a/sci-physics/elk/Manifest b/sci-physics/elk/Manifest
index 9d7ce0e72..d2413cac9 100644
--- a/sci-physics/elk/Manifest
+++ b/sci-physics/elk/Manifest
@@ -1 +1,2 @@
DIST elk-1.4.22.tgz 1866287 SHA256 bc8b70d42924c77c9328418bd133285fe2caa4a8b14df4016eecff647ca15ec0 SHA512 7c512ac6738d883fe1c76964c8bd44ef34269f58f4c8d97ee63949949391ef1040dc41cf0c2626492f6c94649b696d7b67eef8292011dc75c312a3c4b3c21da6 WHIRLPOOL 392804fc8bc3ce03208f9689ffafb84d4a61b343d80c09d787adcd23f25ab824dd0d6477bbad41ae2e61ab0acc9cba2f965d6c576fd7d69bb976fd29770e4a1d
+DIST elk-2.1.25.tgz 1932025 SHA256 66a50eff4c9aad02a3e0b0719a6c22d072ade33675045887348631116c4176fb SHA512 ef121946f992a6de2d05681a08a94a50eeab72d0dc6cc81de82ccd3460020eccd266f5f584e7e52c8c79eb8ad1d29ed8a0decc9fa0ecf9ae07fb54c3235b389c WHIRLPOOL fb7a888358aa8f4af185d20f8c17ea7ed8957e9bb5cbc366fd55db504e54b0095133496f5556e1e1137989b518f1b1d7b76457641f4eb04510eb36ec474dfe57
diff --git a/sci-physics/elk/elk-2.1.25.ebuild b/sci-physics/elk/elk-2.1.25.ebuild
new file mode 100644
index 000000000..ebab9ffa3
--- /dev/null
+++ b/sci-physics/elk/elk-2.1.25.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit eutils flag-o-matic fortran-2 multilib toolchain-funcs
+
+DESCRIPTION="All-electron full-potential linearised augmented-plane wave (FP-LAPW)"
+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 perl python test"
+
+RDEPEND="
+ lapack? (
+ virtual/blas
+ virtual/lapack )
+ libxc? ( >=sci-libs/libxc-1.2.0-r1[fortran] )
+ perl? ( dev-lang/perl )
+ python? ( dev-lang/python )
+ mpi? ( virtual/mpi )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( README )
+
+FORTRAN_STANDARD=90
+
+pkg_setup() {
+ # fortran-2.eclass does not handle mpi wrappers
+ if use mpi; then
+ export FC="mpif90"
+ export F77="mpif77"
+ export CC="mpicc"
+ export CXX="mpic++"
+ else
+ tc-export FC F77 CC CXX
+ fi
+
+ use openmp && FORTRAN_NEED_OPENMP=1
+
+ fortran-2_pkg_setup
+
+ if use openmp; then
+ # based on _fortran-has-openmp() of fortran-2.eclass
+ local openmp=""
+ local fcode=ebuild-openmp-flags.f
+ local _fc=$(tc-getFC)
+
+ pushd "${T}"
+ cat <<- EOF > "${fcode}"
+ 1 call omp_get_num_threads
+ 2 end
+ EOF
+
+ for openmp in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp; do
+ "${_fc}" "${openmp}" "${fcode}" -o "${fcode}.x" && break
+ done
+
+ rm -f "${fcode}.*"
+ popd
+
+ append-flags "${openmp}"
+ fi
+}
+
+src_prepare() {
+ rm -rf src/{BLAS,LAPACK} || die
+ if use libxc; then
+ sed -i -e's/^\(SRC_libxc =\)/#\1/' "${S}/src/Makefile" || die
+ fi
+ if use mpi; then
+ sed -i -e's/^\(SRC_mpi =\)/#\1/' "${S}/src/Makefile" || die
+ fi
+
+ sed \
+ -e "s: -o : ${LDFLAGS} -o :g" \
+ -i src/{,eos,spacegroup}/Makefile || die
+}
+
+src_configure() {
+ append-fflags -I/usr/include
+
+ cat > make.inc <<- EOF
+ MAKE = make
+ F90 = $(tc-getFC)
+ F90_OPTS = ${FCFLAGS}
+ F77 = $(tc-getF77)
+ F77_OPTS = ${FFLAGS}
+ CC = $(tc-getCC)
+ CXX = $(tc-getCXX)
+ CFLAGS = ${CFLAGS}
+ CXXFLAGS = ${CXXFLAGS}
+ LD = $(tc-getLD)
+ AR = $(tc-getAR)
+ LIB_SYS =
+ LIB_LPK = $($(tc-getPKG_CONFIG) --libs lapack)
+ LIB_FFT = fftlib.a
+ EOF
+
+ 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
+}
+
+MAKEOPTS+=" -j1"
+
+src_compile() {
+ emake -C src fft
+ emake -C src elk
+ emake -C src/eos
+ emake -C src/spacegroup
+}
+
+src_install() {
+ dobin src/elk src/protex src/eos/eos src/spacegroup/spacegroup
+ dobin utilities/elk-bands/elk-bands
+ use perl && dobin utilities/xps/xps_exc.pl utilities/wien2k-elk/se.pl
+ use python && dobin utilities/blocks2columns/blocks2columns.py
+ dodoc README
+ for doc in docs/*; do
+ dodoc $doc
+ done
+ insinto /usr/share/${P}
+ doins -r species utilities examples tests
+}
diff --git a/sci-physics/elk/metadata.xml b/sci-physics/elk/metadata.xml
index 992e40730..a7ed67ff3 100644
--- a/sci-physics/elk/metadata.xml
+++ b/sci-physics/elk/metadata.xml
@@ -10,4 +10,14 @@ Elk is an all-electron full-potential linearised augmented-plane wave (FP-LAPW)
Use sci-libs/libxc library of exchange-correlation functionals by ETSF.
</flag>
</use>
+ <use>
+ <flag name="perl">
+ Install perl scripts.
+ </flag>
+ </use>
+ <use>
+ <flag name="python">
+ Install python scripts.
+ </flag>
+ </use>
</pkgmetadata>