1 |
commit: e8f559a24eb6e60e1ffa71bebd3e318a19d911cb |
2 |
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 24 15:52:39 2022 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 24 15:52:39 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=e8f559a2 |
7 |
|
8 |
sci-physics/openmx: bump to patch release |
9 |
|
10 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
11 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> |
12 |
|
13 |
...enmx-3.9.ebuild => openmx-3.9_p20211017.ebuild} | 44 ++++++++++++++++------ |
14 |
1 file changed, 33 insertions(+), 11 deletions(-) |
15 |
|
16 |
diff --git a/sci-physics/openmx/openmx-3.9.ebuild b/sci-physics/openmx/openmx-3.9_p20211017.ebuild |
17 |
similarity index 75% |
18 |
rename from sci-physics/openmx/openmx-3.9.ebuild |
19 |
rename to sci-physics/openmx/openmx-3.9_p20211017.ebuild |
20 |
index e58af9665..2d1e50397 100644 |
21 |
--- a/sci-physics/openmx/openmx-3.9.ebuild |
22 |
+++ b/sci-physics/openmx/openmx-3.9_p20211017.ebuild |
23 |
@@ -1,17 +1,21 @@ |
24 |
-# Copyright 1999-2021 Gentoo Authors |
25 |
+# Copyright 1999-2022 Gentoo Authors |
26 |
# Distributed under the terms of the GNU General Public License v2 |
27 |
|
28 |
-EAPI=7 |
29 |
+EAPI=8 |
30 |
|
31 |
inherit toolchain-funcs flag-o-matic fortran-2 |
32 |
|
33 |
DESCRIPTION="Material eXplorer" |
34 |
HOMEPAGE="http://www.openmx-square.org/" # no https, SSL invalid |
35 |
-SRC_URI="http://t-ozaki.issp.u-tokyo.ac.jp/${PN}${PV}.tar.gz" |
36 |
+SRC_URI=" |
37 |
+ http://t-ozaki.issp.u-tokyo.ac.jp/${PN}${PV//_*}.tar.gz |
38 |
+ http://www.openmx-square.org/bugfixed/21Oct17/patch${PV//_*}.9.tar.gz |
39 |
+" |
40 |
+S="${WORKDIR}/${PN}${PV//_*}/source" |
41 |
|
42 |
LICENSE="GPL-3" |
43 |
SLOT="0" |
44 |
-KEYWORDS="" |
45 |
+KEYWORDS="~amd64" |
46 |
|
47 |
IUSE="debug openmp test" |
48 |
RESTRICT="!test? ( test )" |
49 |
@@ -20,12 +24,12 @@ RDEPEND=" |
50 |
virtual/blas |
51 |
virtual/lapack |
52 |
virtual/mpi |
53 |
+ sci-libs/scalapack |
54 |
+ sys-cluster/openmpi |
55 |
sci-libs/fftw:3.0[mpi,openmp?]" |
56 |
DEPEND="${RDEPEND}" |
57 |
BDEPEND="virtual/pkgconfig" |
58 |
|
59 |
-S="${WORKDIR}/${PN}${PV}/source" |
60 |
- |
61 |
FORTRAN_STANDARD=90 |
62 |
|
63 |
pkg_setup() { |
64 |
@@ -65,7 +69,7 @@ pkg_setup() { |
65 |
(( ${ret} )) || break |
66 |
done |
67 |
|
68 |
- rm -f "${code}.*" |
69 |
+ rm "${code}."* || die |
70 |
popd |
71 |
|
72 |
if (( ${ret} )); then |
73 |
@@ -86,7 +90,7 @@ pkg_setup() { |
74 |
(( ${ret} )) || break |
75 |
done |
76 |
|
77 |
- rm -f "${code}.*" |
78 |
+ rm "${code}."* || die |
79 |
popd |
80 |
|
81 |
if (( ${ret} )); then |
82 |
@@ -98,18 +102,34 @@ pkg_setup() { |
83 |
|
84 |
} |
85 |
|
86 |
+src_unpack() { |
87 |
+ unpack "${PN}${PV//_*}.tar.gz" |
88 |
+ # copy patched files to source |
89 |
+ cd "${S}" || die |
90 |
+ unpack "patch${PV//_*}.9.tar.gz" |
91 |
+} |
92 |
+ |
93 |
src_configure() { |
94 |
local FFTW_FLAVOUR=fftw3 |
95 |
if use openmp; then |
96 |
FFTW_FLAVOUR=fftw3_omp |
97 |
+ append-cflag -fopenmp |
98 |
else |
99 |
append-cflag -Dnoomp |
100 |
fi |
101 |
+ append-cflag -Dkcomp |
102 |
+ append-cflag -ffast-math |
103 |
append-cflags $($(tc-getPKG_CONFIG) --cflags lapack) |
104 |
+ append-cflags $($(tc-getPKG_CONFIG) --cflags scalapack) |
105 |
+ append-cflags $($(tc-getPKG_CONFIG) --cflags openmpi) |
106 |
append-cflags $($(tc-getPKG_CONFIG) --cflags ${FFTW_FLAVOUR}) |
107 |
|
108 |
append-fflags -I/usr/include |
109 |
+ append-fflags -Dkcomp |
110 |
+ append-fflags -ffast-math |
111 |
append-fflags $($(tc-getPKG_CONFIG) --cflags lapack) |
112 |
+ append-fflags $($(tc-getPKG_CONFIG) --cflags scalapack) |
113 |
+ append-fflags $($(tc-getPKG_CONFIG) --cflags openmpi) |
114 |
append-fflags $($(tc-getPKG_CONFIG) --cflags ${FFTW_FLAVOUR}) |
115 |
|
116 |
# otherwise we get Error: Rank mismatch between actual argument |
117 |
@@ -117,6 +137,8 @@ src_configure() { |
118 |
append-fflags -fallow-argument-mismatch |
119 |
|
120 |
local MX_LIB="$($(tc-getPKG_CONFIG) --static --libs lapack)" |
121 |
+ MX_LIB="${MX_LIB} $($(tc-getPKG_CONFIG) --static --libs scalapack)" |
122 |
+ MX_LIB="${MX_LIB} $($(tc-getPKG_CONFIG) --static --libs openmpi)" |
123 |
MX_LIB="${MX_LIB} $($(tc-getPKG_CONFIG) --static --libs ${FFTW_FLAVOUR})" |
124 |
MX_LIB="${MX_LIB} $(mpif90 -showme:link)" |
125 |
|
126 |
@@ -135,17 +157,17 @@ src_compile() { |
127 |
} |
128 |
|
129 |
src_test() { |
130 |
- cd ../work |
131 |
+ cd ../work || die |
132 |
../source/openmx -runtest || die |
133 |
} |
134 |
|
135 |
src_install() { |
136 |
insinto /usr/share/${P} |
137 |
doins -r DFT_DATA19 |
138 |
- cd ../work |
139 |
+ cd ../work || die |
140 |
insinto /usr/share/${P}/examples |
141 |
doins -r * |
142 |
- cd ../source |
143 |
+ cd ../source || die |
144 |
emake DESTDIR="${D}/usr/bin" install |
145 |
dodoc "${S}/${PN}${PV%.?}.pdf" |
146 |
use test && dodoc "${S}"/work/runtest.result |