1 |
commit: 8bfe3614f161abf4836c66418ca0deceef3bb251 |
2 |
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 31 15:25:08 2022 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 31 15:26:10 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8bfe3614 |
7 |
|
8 |
sci-physics/espresso: update to version 4.2.0 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/846287 |
11 |
Closes: https://bugs.gentoo.org/811186 |
12 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> |
13 |
|
14 |
sci-physics/espresso/Manifest | 1 + |
15 |
...{espresso-9999.ebuild => espresso-4.2.0.ebuild} | 34 +++++++++++++--------- |
16 |
sci-physics/espresso/espresso-9999.ebuild | 30 ++++++++++--------- |
17 |
.../files/espresso-4.2.0-fix-disable-test.patch | 12 ++++++++ |
18 |
4 files changed, 50 insertions(+), 27 deletions(-) |
19 |
|
20 |
diff --git a/sci-physics/espresso/Manifest b/sci-physics/espresso/Manifest |
21 |
index 366b7e767003..949e4ac778c0 100644 |
22 |
--- a/sci-physics/espresso/Manifest |
23 |
+++ b/sci-physics/espresso/Manifest |
24 |
@@ -1 +1,2 @@ |
25 |
DIST espresso-4.1.3.tar.gz 16947336 BLAKE2B 14d3513eda87f62a8473a0cac0c273b3590bf78ed48b96e76d10c106713f7bbd7d37de951bd3d9210062b34c02bd83a68f3aaf1ca8215ed1dcde590e4e99b113 SHA512 1fe82683eddb7bfd9bae6e446b0f42a50087d755995963905cd419473ad17b204f20049d0cf4af9264898dd6fee36f02744b38fa45cd0e33086374cf2aebd934 |
26 |
+DIST espresso-4.2.0.tar.gz 14000445 BLAKE2B 79de0e364cd932e534b0e1ee9433ae90e4deeb1ade262aa6877a30c8656f03155ca77b8feafdd5607f83e36ee4f47ad7ec28be353bc3358216a9c9f8c0902323 SHA512 b80afb1bef57911fd79b88378a5b2e31b07a18d415fe17fcd5ed28fb448eeca5922f98af8df42117e9e869645765d55ecfb3aae615fa6a53c915f7d8a63081c5 |
27 |
|
28 |
diff --git a/sci-physics/espresso/espresso-9999.ebuild b/sci-physics/espresso/espresso-4.2.0.ebuild |
29 |
similarity index 83% |
30 |
copy from sci-physics/espresso/espresso-9999.ebuild |
31 |
copy to sci-physics/espresso/espresso-4.2.0.ebuild |
32 |
index 19e9be04e85a..fb6b55b2bc12 100644 |
33 |
--- a/sci-physics/espresso/espresso-9999.ebuild |
34 |
+++ b/sci-physics/espresso/espresso-4.2.0.ebuild |
35 |
@@ -1,9 +1,9 @@ |
36 |
-# Copyright 1999-2021 Gentoo Authors |
37 |
+# Copyright 1999-2022 Gentoo Authors |
38 |
# Distributed under the terms of the GNU General Public License v2 |
39 |
|
40 |
EAPI=7 |
41 |
|
42 |
-PYTHON_COMPAT=( python3_{8,9} ) |
43 |
+PYTHON_COMPAT=( python3_{8..11} ) |
44 |
CMAKE_MAKEFILE_GENERATOR="emake" |
45 |
|
46 |
inherit cmake cuda python-single-r1 savedconfig |
47 |
@@ -19,11 +19,14 @@ else |
48 |
SRC_URI="https://github.com/${PN}md/${PN}/releases/download/${PV}/${P}.tar.gz" |
49 |
KEYWORDS="~amd64 ~x86 ~amd64-linux" |
50 |
fi |
51 |
+S="${WORKDIR}/${PN}" |
52 |
|
53 |
LICENSE="GPL-3" |
54 |
SLOT="0" |
55 |
IUSE="cuda doc examples +fftw +hdf5 test" |
56 |
-RESTRICT="!test? ( test )" |
57 |
+ |
58 |
+# unittest_decorators not packaged |
59 |
+RESTRICT="test" |
60 |
|
61 |
REQUIRED_USE=" |
62 |
${PYTHON_REQUIRED_USE}" |
63 |
@@ -37,17 +40,22 @@ RDEPEND=" |
64 |
cuda? ( >=dev-util/nvidia-cuda-toolkit-4.2.9-r1 ) |
65 |
fftw? ( sci-libs/fftw:3.0 ) |
66 |
dev-libs/boost:=[mpi] |
67 |
- hdf5? ( sci-libs/hdf5:=[mpi] )" |
68 |
+ hdf5? ( sci-libs/hdf5:=[mpi] ) |
69 |
+" |
70 |
|
71 |
DEPEND="${RDEPEND} |
72 |
doc? ( |
73 |
app-doc/doxygen[dot] |
74 |
dev-texlive/texlive-latexextra |
75 |
- virtual/latex-base )" |
76 |
+ virtual/latex-base |
77 |
+ ) |
78 |
+" |
79 |
|
80 |
-DOCS=( AUTHORS NEWS README ChangeLog ) |
81 |
+DOCS=( AUTHORS NEWS Readme.md ChangeLog ) |
82 |
|
83 |
-S="${WORKDIR}/${PN}" |
84 |
+PATCHES=( |
85 |
+ "${FILESDIR}/${P}-fix-disable-test.patch" |
86 |
+) |
87 |
|
88 |
src_prepare() { |
89 |
use cuda && cuda_src_prepare |
90 |
@@ -74,23 +82,23 @@ src_compile() { |
91 |
[[ ${PV} = 9999 ]] && use doc && cmake_build ug dg tutorials |
92 |
} |
93 |
|
94 |
+src_test() { |
95 |
+ LD_PRELOAD="${BUILD_DIR}/src/core/Espresso_core.so" cmake_src_test |
96 |
+} |
97 |
+ |
98 |
src_install() { |
99 |
local i docdir="${S}" |
100 |
|
101 |
cmake_src_install |
102 |
|
103 |
+ python_optimize |
104 |
+ |
105 |
insinto /usr/share/${PN}/ |
106 |
doins "${BUILD_DIR}/myconfig-sample.hpp" |
107 |
|
108 |
save_config "${BUILD_DIR}/src/config/myconfig-final.hpp" |
109 |
|
110 |
if use doc; then |
111 |
- [[ ${PV} = 9999 ]] && docdir="${BUILD_DIR}" |
112 |
- newdoc "${docdir}"/doc/dg/dg.pdf developer_guide.pdf |
113 |
- newdoc "${docdir}"/doc/ug/ug.pdf user_guide.pdf |
114 |
- for i in "${docdir}/doc/tutorials/python"/*/[0-9]*.pdf; do |
115 |
- newdoc "${i}" "tutorial_${i##*/}" |
116 |
- done |
117 |
dodoc -r "${BUILD_DIR}/doc/doxygen/html" |
118 |
fi |
119 |
|
120 |
|
121 |
diff --git a/sci-physics/espresso/espresso-9999.ebuild b/sci-physics/espresso/espresso-9999.ebuild |
122 |
index 19e9be04e85a..0373c76056bf 100644 |
123 |
--- a/sci-physics/espresso/espresso-9999.ebuild |
124 |
+++ b/sci-physics/espresso/espresso-9999.ebuild |
125 |
@@ -1,9 +1,9 @@ |
126 |
-# Copyright 1999-2021 Gentoo Authors |
127 |
+# Copyright 1999-2022 Gentoo Authors |
128 |
# Distributed under the terms of the GNU General Public License v2 |
129 |
|
130 |
EAPI=7 |
131 |
|
132 |
-PYTHON_COMPAT=( python3_{8,9} ) |
133 |
+PYTHON_COMPAT=( python3_{8..11} ) |
134 |
CMAKE_MAKEFILE_GENERATOR="emake" |
135 |
|
136 |
inherit cmake cuda python-single-r1 savedconfig |
137 |
@@ -19,11 +19,14 @@ else |
138 |
SRC_URI="https://github.com/${PN}md/${PN}/releases/download/${PV}/${P}.tar.gz" |
139 |
KEYWORDS="~amd64 ~x86 ~amd64-linux" |
140 |
fi |
141 |
+S="${WORKDIR}/${PN}" |
142 |
|
143 |
LICENSE="GPL-3" |
144 |
SLOT="0" |
145 |
IUSE="cuda doc examples +fftw +hdf5 test" |
146 |
-RESTRICT="!test? ( test )" |
147 |
+ |
148 |
+# unittest_decorators not packaged |
149 |
+RESTRICT="test" |
150 |
|
151 |
REQUIRED_USE=" |
152 |
${PYTHON_REQUIRED_USE}" |
153 |
@@ -37,17 +40,18 @@ RDEPEND=" |
154 |
cuda? ( >=dev-util/nvidia-cuda-toolkit-4.2.9-r1 ) |
155 |
fftw? ( sci-libs/fftw:3.0 ) |
156 |
dev-libs/boost:=[mpi] |
157 |
- hdf5? ( sci-libs/hdf5:=[mpi] )" |
158 |
+ hdf5? ( sci-libs/hdf5:=[mpi] ) |
159 |
+" |
160 |
|
161 |
DEPEND="${RDEPEND} |
162 |
doc? ( |
163 |
app-doc/doxygen[dot] |
164 |
dev-texlive/texlive-latexextra |
165 |
- virtual/latex-base )" |
166 |
+ virtual/latex-base |
167 |
+ ) |
168 |
+" |
169 |
|
170 |
-DOCS=( AUTHORS NEWS README ChangeLog ) |
171 |
- |
172 |
-S="${WORKDIR}/${PN}" |
173 |
+DOCS=( AUTHORS NEWS Readme.md ChangeLog ) |
174 |
|
175 |
src_prepare() { |
176 |
use cuda && cuda_src_prepare |
177 |
@@ -74,6 +78,10 @@ src_compile() { |
178 |
[[ ${PV} = 9999 ]] && use doc && cmake_build ug dg tutorials |
179 |
} |
180 |
|
181 |
+src_test() { |
182 |
+ LD_PRELOAD="${BUILD_DIR}/src/core/Espresso_core.so" cmake_src_test |
183 |
+} |
184 |
+ |
185 |
src_install() { |
186 |
local i docdir="${S}" |
187 |
|
188 |
@@ -85,12 +93,6 @@ src_install() { |
189 |
save_config "${BUILD_DIR}/src/config/myconfig-final.hpp" |
190 |
|
191 |
if use doc; then |
192 |
- [[ ${PV} = 9999 ]] && docdir="${BUILD_DIR}" |
193 |
- newdoc "${docdir}"/doc/dg/dg.pdf developer_guide.pdf |
194 |
- newdoc "${docdir}"/doc/ug/ug.pdf user_guide.pdf |
195 |
- for i in "${docdir}/doc/tutorials/python"/*/[0-9]*.pdf; do |
196 |
- newdoc "${i}" "tutorial_${i##*/}" |
197 |
- done |
198 |
dodoc -r "${BUILD_DIR}/doc/doxygen/html" |
199 |
fi |
200 |
|
201 |
|
202 |
diff --git a/sci-physics/espresso/files/espresso-4.2.0-fix-disable-test.patch b/sci-physics/espresso/files/espresso-4.2.0-fix-disable-test.patch |
203 |
new file mode 100644 |
204 |
index 000000000000..83c133df4bdd |
205 |
--- /dev/null |
206 |
+++ b/sci-physics/espresso/files/espresso-4.2.0-fix-disable-test.patch |
207 |
@@ -0,0 +1,12 @@ |
208 |
+diff --git a/src/script_interface/CMakeLists.txt b/src/script_interface/CMakeLists.txt |
209 |
+index a799571..9d03f33 100644 |
210 |
+--- a/src/script_interface/CMakeLists.txt |
211 |
++++ b/src/script_interface/CMakeLists.txt |
212 |
+@@ -54,4 +54,6 @@ target_link_libraries( |
213 |
+ target_include_directories(Espresso_script_interface |
214 |
+ PUBLIC ${CMAKE_SOURCE_DIR}/src) |
215 |
+ |
216 |
+-add_subdirectory(tests) |
217 |
++if(WITH_TESTS) |
218 |
++ add_subdirectory(tests) |
219 |
++endif(WITH_TESTS) |