1 |
commit: 4709d8e4ea9ec149753b98cabf365b3520070d65 |
2 |
Author: Jakov Smolić <jsmolic <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 30 21:18:46 2021 +0000 |
4 |
Commit: Jakov Smolić <jsmolic <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 30 21:22:07 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4709d8e4 |
7 |
|
8 |
sci-physics/espresso: Fix build with gcc-11 |
9 |
|
10 |
* Call python_optimize for non byte-compiled modules |
11 |
* Builds with >=boost-1.75 versions |
12 |
|
13 |
Closes: https://bugs.gentoo.org/737534 |
14 |
Closes: https://bugs.gentoo.org/793011 |
15 |
Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org> |
16 |
|
17 |
sci-physics/espresso/espresso-4.1.3.ebuild | 6 ++++ |
18 |
.../espresso/files/espresso-4.1.3-gcc-11.patch | 37 ++++++++++++++++++++++ |
19 |
2 files changed, 43 insertions(+) |
20 |
|
21 |
diff --git a/sci-physics/espresso/espresso-4.1.3.ebuild b/sci-physics/espresso/espresso-4.1.3.ebuild |
22 |
index 19e9be04e85..4c60379b475 100644 |
23 |
--- a/sci-physics/espresso/espresso-4.1.3.ebuild |
24 |
+++ b/sci-physics/espresso/espresso-4.1.3.ebuild |
25 |
@@ -49,6 +49,10 @@ DOCS=( AUTHORS NEWS README ChangeLog ) |
26 |
|
27 |
S="${WORKDIR}/${PN}" |
28 |
|
29 |
+PATCHES=( |
30 |
+ "${FILESDIR}"/${P}-gcc-11.patch |
31 |
+) |
32 |
+ |
33 |
src_prepare() { |
34 |
use cuda && cuda_src_prepare |
35 |
cmake_src_prepare |
36 |
@@ -79,6 +83,8 @@ src_install() { |
37 |
|
38 |
cmake_src_install |
39 |
|
40 |
+ python_optimize |
41 |
+ |
42 |
insinto /usr/share/${PN}/ |
43 |
doins "${BUILD_DIR}/myconfig-sample.hpp" |
44 |
|
45 |
|
46 |
diff --git a/sci-physics/espresso/files/espresso-4.1.3-gcc-11.patch b/sci-physics/espresso/files/espresso-4.1.3-gcc-11.patch |
47 |
new file mode 100644 |
48 |
index 00000000000..fcda88e9b8b |
49 |
--- /dev/null |
50 |
+++ b/sci-physics/espresso/files/espresso-4.1.3-gcc-11.patch |
51 |
@@ -0,0 +1,37 @@ |
52 |
+https://src.fedoraproject.org/rpms/espresso/blob/f34/f/espresso-gcc11.patch |
53 |
+--- a/src/core/communication.hpp |
54 |
++++ b/src/core/communication.hpp |
55 |
+@@ -49,6 +49,8 @@ |
56 |
+ * to \ref CALLBACK_LIST. |
57 |
+ */ |
58 |
+ |
59 |
++#include <cstddef> |
60 |
++ |
61 |
+ #include "MpiCallbacks.hpp" |
62 |
+ |
63 |
+ /* Includes needed by callbacks. */ |
64 |
+diff --git a/src/script_interface/ParallelScriptInterface.hpp b/src/script_interface/ParallelScriptInterface.hpp |
65 |
+index c33e67d..02ad815 100644 |
66 |
+--- a/src/script_interface/ParallelScriptInterface.hpp |
67 |
++++ b/src/script_interface/ParallelScriptInterface.hpp |
68 |
+@@ -23,6 +23,7 @@ |
69 |
+ #define SCRIPT_INTERFACE_PARALLEL_SCRIPT_INTERFACE_HPP |
70 |
+ |
71 |
+ #include <utility> |
72 |
++#include <limits> |
73 |
+ |
74 |
+ #include "MpiCallbacks.hpp" |
75 |
+ #include "ScriptInterface.hpp" |
76 |
+diff --git a/src/utils/include/utils/NumeratedContainer.hpp b/src/utils/include/utils/NumeratedContainer.hpp |
77 |
+index 1d99098..1191a79 100644 |
78 |
+--- a/src/utils/include/utils/NumeratedContainer.hpp |
79 |
++++ b/src/utils/include/utils/NumeratedContainer.hpp |
80 |
+@@ -24,6 +24,7 @@ |
81 |
+ * Keep an enumerated list of T objects, managed by the class. |
82 |
+ */ |
83 |
+ |
84 |
++#include <cstddef> |
85 |
+ #include <cassert> |
86 |
+ #include <set> |
87 |
+ #include <unordered_map> |
88 |
+ |