aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHonza Macháček <Hloupy.Honza@centrum.cz>2013-01-17 15:39:36 +0100
committerHonza Macháček <Hloupy.Honza@centrum.cz>2013-01-17 15:39:36 +0100
commit1dd1021d6608584b3157e00c529cea7bcc52abd4 (patch)
tree381c476d6ebba74a25a3df35d5d39021b7297a71 /sci-physics/openmx
parentMerge branch 'master' of git+ssh://git.overlays.gentoo.org/proj/sci (diff)
downloadsci-1dd1021d6608584b3157e00c529cea7bcc52abd4.tar.gz
sci-1dd1021d6608584b3157e00c529cea7bcc52abd4.tar.bz2
sci-1dd1021d6608584b3157e00c529cea7bcc52abd4.zip
sci-physics/openmx added, version 3.6. sci-physics/atompaw version bumped to 3.0.1.9. New versions of sci-physics/abinit and sci-libs/bigdft added, but sci-libs/bigdft-1.7_pre12 is a version from the Abinit site, and the bigdft support in sci-physics/abinit-7.0.4 segfaults; on the other hand abinit-7.0.4 supports openmp. GPU support in sci-libs/bigdft-1.7_pre12 and sci-physics/abinit-7.0.4 not yet tested.
Diffstat (limited to 'sci-physics/openmx')
-rw-r--r--sci-physics/openmx/ChangeLog9
-rw-r--r--sci-physics/openmx/Manifest2
-rw-r--r--sci-physics/openmx/openmx-3.6.ebuild96
3 files changed, 107 insertions, 0 deletions
diff --git a/sci-physics/openmx/ChangeLog b/sci-physics/openmx/ChangeLog
new file mode 100644
index 000000000..37b46f62f
--- /dev/null
+++ b/sci-physics/openmx/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for sci-physics/openmx
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*openmx-3.6 (17 Jan 2013)
+
+ 17 Jan 2013; Honza Macháček <Hloupy.Honza@centrum.cz> +openmx-3.6.ebuild:
+ Ebuild for OpenMX added
+
diff --git a/sci-physics/openmx/Manifest b/sci-physics/openmx/Manifest
new file mode 100644
index 000000000..4e0a74a15
--- /dev/null
+++ b/sci-physics/openmx/Manifest
@@ -0,0 +1,2 @@
+DIST openmx3.6.tar.gz 83023744 SHA256 e344914a615d4179e724877207335e44f9d629cd3931b70e135011877355ab71 SHA512 f4d59e839bbd216893149c83d1059aa4dc4fb011d113cb40efbd99db96d558501b371628f0ea064d3091d8ef0d2c8664412b0c3541fa2a7135811e3536cb0018 WHIRLPOOL 54c72309133dbb010218ce138992362e98eb4c345eb3b2897e1d86f3f2469cc95a2024c8547cc3dc0db78befaf620e624640b6a64522c0937bf7158658a28109
+DIST patch3.6.1.tar.gz 202531 SHA256 56cba052a84c73bf332ff3a65787001376f8d50ec50e7e363a67dfb5b417febd SHA512 1f1c2c156c80a21649826cfaeb79a9b2b7d81b46920e713fb0e4489eeceb8cc6a9193c49efb0d4c1a1a69313e21186e10ed4fd97d27e63b555ce1092425c641d WHIRLPOOL 006cb7ec822ef485c03a371b9c3a99c426fc5e6e1249fd17d9f5527f0220f09df1acc049e31a59d6834a3ce44431ae385268954898613a9fe31ff892262a5503
diff --git a/sci-physics/openmx/openmx-3.6.ebuild b/sci-physics/openmx/openmx-3.6.ebuild
new file mode 100644
index 000000000..78f65a3c0
--- /dev/null
+++ b/sci-physics/openmx/openmx-3.6.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="4"
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="Open source package for Material eXplorer using DFT, norm-conserving
+pseudopotentials, and pseudo-atomic localized basis functions."
+HOMEPAGE="http://www.openmx-square.org/"
+SRC_URI="http://www.openmx-square.org/${PN}${PV}.tar.gz
+ http://www.openmx-square.org/bugfixed/11Nov14/patch${PV}.1.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="-debug mpi openmp test"
+S="${WORKDIR}/${PN}${PV}"
+
+RDEPEND="virtual/blas
+ virtual/lapack
+ sci-libs/fftw:3
+ mpi? ( virtual/mpi
+ sci-libs/fftw:3[mpi] )
+ openmp? ( sys-devel/gcc[openmp]
+ sci-libs/fftw:3[openmp] )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+
+
+pkg_setup() {
+ if use mpi; then
+ export CC="mpicc"
+ else
+ tc-export CC
+ fi
+
+ if use openmp; then
+ export CC="${CC} -fopenmp"
+ fi
+}
+
+src_prepare() {
+ cd "${WORKDIR}"
+ mv *.out "${PN}${PV}"/work/input_example
+ mv *.[hc] "${PN}${PV}"/source
+}
+
+src_configure() {
+ CFLAGS="${CFLAGS:- -O3 -funroll-loops -ffast-math}"
+ local FFTW_FLAVOUR=fftw3
+ if use openmp; then
+ FFTW_FLAVOUR=fftw3_omp
+ else
+ export CFLAGS="${CFLAGS} -Dnoomp"
+ fi
+ if use mpi; then
+ FFTW_FLAVOUR=fftw3_mpi
+ else
+ export CFLAGS="${CFLAGS} -Dnompi"
+ fi
+ CFLAGS="${CFLAGS} $(pkg-config --cflags lapack)"
+ CFLAGS="${CFLAGS} $(pkg-config --cflags ${FFTW_FLAVOUR})"
+ export CFLAGS
+
+ local MX_LIB="$(pkg-config --static --libs lapack)"
+ local MX_LIB="${MX_LIB} $(pkg-config --static --libs ${FFTW_FLAVOUR})"
+
+ sed -i -e "s%^CC *=.*$%CC = ${CC} ${CFLAGS}%" \
+ -e "s%^LIB *=.*$%LIB = ${MX_LIB}%" \
+ source/makefile
+}
+
+src_compile() {
+ cd source
+ emake || die "make failed"
+}
+
+src_test() {
+ cd work
+ ../source/openmx -runtest
+}
+
+src_install() {
+ insinto /usr/share/${P}
+ doins -r DFT_DATA11
+ cd work
+ insinto /usr/share/${P}/examples
+ doins -r *
+ cd ../source
+ dodir /usr/bin
+ emake DESTDIR="${D}/usr/bin" install
+ dodoc "${S}/${PN}${PV}.pdf"
+ use test && dodoc "${S}"/work/runtest.result
+} \ No newline at end of file