aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-physics/openmx')
-rw-r--r--sci-physics/openmx/Manifest1
-rw-r--r--sci-physics/openmx/openmx-3.9_p20211017.ebuild (renamed from sci-physics/openmx/openmx-3.9.ebuild)46
2 files changed, 35 insertions, 12 deletions
diff --git a/sci-physics/openmx/Manifest b/sci-physics/openmx/Manifest
index 0017a79ab..030db9f8c 100644
--- a/sci-physics/openmx/Manifest
+++ b/sci-physics/openmx/Manifest
@@ -1 +1,2 @@
DIST openmx3.9.tar.gz 166014953 BLAKE2B 1aba4107a2b8d014da40e7851ac33c3678fa1d25e30b7cbfc02017d349d89ed577f2bbd0341cb44e519fc2879879adca83140a9c216fd102842deff6c5d35ec2 SHA512 dc8f0712ccf02be749b640f9e1678fcc83cb9821589f1f5091d18b2ba68b909389c80dc1e469ba4d81105281f45790f1b699198c0e12590aeb6a73cf2d2c4ac2
+DIST patch3.9.9.tar.gz 1074993 BLAKE2B ed539788a5f6dedf41814c69339dc0ec3ac8d9da1beec363edfbd691571d22c0bb984f50e386687c75ae0eb9d5fdee2085067cd81451869703fa749f22dc2f3d SHA512 5b7d12f17150b0403a0afae5d206379270b2fa734755a48f52902893e5610a7edb710caee634abd98c230261ec6faea4cc607eb82bd8603e16815aebf0d5c85a
diff --git a/sci-physics/openmx/openmx-3.9.ebuild b/sci-physics/openmx/openmx-3.9_p20211017.ebuild
index ce72ba2f6..2d1e50397 100644
--- a/sci-physics/openmx/openmx-3.9.ebuild
+++ b/sci-physics/openmx/openmx-3.9_p20211017.ebuild
@@ -1,17 +1,21 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit multilib toolchain-funcs flag-o-matic fortran-2
+inherit toolchain-funcs flag-o-matic fortran-2
DESCRIPTION="Material eXplorer"
HOMEPAGE="http://www.openmx-square.org/" # no https, SSL invalid
-SRC_URI="http://t-ozaki.issp.u-tokyo.ac.jp/${PN}${PV}.tar.gz"
+SRC_URI="
+ http://t-ozaki.issp.u-tokyo.ac.jp/${PN}${PV//_*}.tar.gz
+ http://www.openmx-square.org/bugfixed/21Oct17/patch${PV//_*}.9.tar.gz
+"
+S="${WORKDIR}/${PN}${PV//_*}/source"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS=""
+KEYWORDS="~amd64"
IUSE="debug openmp test"
RESTRICT="!test? ( test )"
@@ -20,12 +24,12 @@ RDEPEND="
virtual/blas
virtual/lapack
virtual/mpi
+ sci-libs/scalapack
+ sys-cluster/openmpi
sci-libs/fftw:3.0[mpi,openmp?]"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
-S="${WORKDIR}/${PN}${PV}/source"
-
FORTRAN_STANDARD=90
pkg_setup() {
@@ -65,7 +69,7 @@ pkg_setup() {
(( ${ret} )) || break
done
- rm -f "${code}.*"
+ rm "${code}."* || die
popd
if (( ${ret} )); then
@@ -86,7 +90,7 @@ pkg_setup() {
(( ${ret} )) || break
done
- rm -f "${code}.*"
+ rm "${code}."* || die
popd
if (( ${ret} )); then
@@ -98,18 +102,34 @@ pkg_setup() {
}
+src_unpack() {
+ unpack "${PN}${PV//_*}.tar.gz"
+ # copy patched files to source
+ cd "${S}" || die
+ unpack "patch${PV//_*}.9.tar.gz"
+}
+
src_configure() {
local FFTW_FLAVOUR=fftw3
if use openmp; then
FFTW_FLAVOUR=fftw3_omp
+ append-cflag -fopenmp
else
append-cflag -Dnoomp
fi
+ append-cflag -Dkcomp
+ append-cflag -ffast-math
append-cflags $($(tc-getPKG_CONFIG) --cflags lapack)
+ append-cflags $($(tc-getPKG_CONFIG) --cflags scalapack)
+ append-cflags $($(tc-getPKG_CONFIG) --cflags openmpi)
append-cflags $($(tc-getPKG_CONFIG) --cflags ${FFTW_FLAVOUR})
append-fflags -I/usr/include
+ append-fflags -Dkcomp
+ append-fflags -ffast-math
append-fflags $($(tc-getPKG_CONFIG) --cflags lapack)
+ append-fflags $($(tc-getPKG_CONFIG) --cflags scalapack)
+ append-fflags $($(tc-getPKG_CONFIG) --cflags openmpi)
append-fflags $($(tc-getPKG_CONFIG) --cflags ${FFTW_FLAVOUR})
# otherwise we get Error: Rank mismatch between actual argument
@@ -117,6 +137,8 @@ src_configure() {
append-fflags -fallow-argument-mismatch
local MX_LIB="$($(tc-getPKG_CONFIG) --static --libs lapack)"
+ MX_LIB="${MX_LIB} $($(tc-getPKG_CONFIG) --static --libs scalapack)"
+ MX_LIB="${MX_LIB} $($(tc-getPKG_CONFIG) --static --libs openmpi)"
MX_LIB="${MX_LIB} $($(tc-getPKG_CONFIG) --static --libs ${FFTW_FLAVOUR})"
MX_LIB="${MX_LIB} $(mpif90 -showme:link)"
@@ -135,17 +157,17 @@ src_compile() {
}
src_test() {
- cd ../work
+ cd ../work || die
../source/openmx -runtest || die
}
src_install() {
insinto /usr/share/${P}
doins -r DFT_DATA19
- cd ../work
+ cd ../work || die
insinto /usr/share/${P}/examples
doins -r *
- cd ../source
+ cd ../source || die
emake DESTDIR="${D}/usr/bin" install
dodoc "${S}/${PN}${PV%.?}.pdf"
use test && dodoc "${S}"/work/runtest.result