1 |
commit: 7b6a14caf639a25079c06286c0a07c4ca31d6620 |
2 |
Author: Kurt Kanzenbach <kurt <AT> kmk-computers <DOT> de> |
3 |
AuthorDate: Fri Sep 18 20:01:02 2020 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 31 09:47:39 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b6a14ca |
7 |
|
8 |
sys-cluster/hpx: Bump version to v1.5.1 |
9 |
|
10 |
Package-Manager: Portage-3.0.4, Repoman-3.0.1 |
11 |
Signed-off-by: Kurt Kanzenbach <kurt <AT> kmk-computers.de> |
12 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
13 |
|
14 |
sys-cluster/hpx/Manifest | 1 + |
15 |
sys-cluster/hpx/files/hpx-1.5.1-cmake.patch | 32 +++++++ |
16 |
sys-cluster/hpx/files/hpx-1.5.1-docs.patch | 91 ++++++++++++++++++++ |
17 |
sys-cluster/hpx/files/hpx-1.5.1-python.patch | 37 +++++++++ |
18 |
sys-cluster/hpx/files/hpx-1.5.1-tests.patch | 111 +++++++++++++++++++++++++ |
19 |
sys-cluster/hpx/hpx-1.5.1.ebuild | 120 +++++++++++++++++++++++++++ |
20 |
6 files changed, 392 insertions(+) |
21 |
|
22 |
diff --git a/sys-cluster/hpx/Manifest b/sys-cluster/hpx/Manifest |
23 |
index 1fa6355399d..519246709a7 100644 |
24 |
--- a/sys-cluster/hpx/Manifest |
25 |
+++ b/sys-cluster/hpx/Manifest |
26 |
@@ -1 +1,2 @@ |
27 |
+DIST hpx-1.5.1.tar.gz 4576475 BLAKE2B 8702638461f92d9d94d0e2ac4ec32527d995a45f54babcbf08d644d1cac8fa37692fb66f59e221930f7738861b41a93fd0ab64d11c4e46d4e039ff3b0e4fec72 SHA512 ab2603adca8780808b62b55f57a03bf8491b805665831c1c484eeba8e7b306bb3269884c8940ad2fc4c5b0d679c54b1e33bc077cdb7ea6d1cb9a715ff70b9842 |
28 |
DIST hpx_1.4.1.tar.gz 4213023 BLAKE2B dc8a9cda3061359ea1bb8eba9ccee60dea308f5425cfe0f18d9003032726962d74d417b8748124c8e6a0b207624093ccf625c82e9e1a71fce8dde74d41d987d2 SHA512 f110d5e5c10ec396f6e762568c9ecd5b767cb6efe91168b5caa8fe1e07bb5870cd13b3392fa4e008a2cc0e044b02084a35b0866e943d9b9c7435599c131f1582 |
29 |
|
30 |
diff --git a/sys-cluster/hpx/files/hpx-1.5.1-cmake.patch b/sys-cluster/hpx/files/hpx-1.5.1-cmake.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..ab31178bbe6 |
33 |
--- /dev/null |
34 |
+++ b/sys-cluster/hpx/files/hpx-1.5.1-cmake.patch |
35 |
@@ -0,0 +1,32 @@ |
36 |
+From 8bee06baabf24c4b8f48766dba5c76d1979c8ea6 Mon Sep 17 00:00:00 2001 |
37 |
+From: Kurt Kanzenbach <kurt@×××××××××××××.de> |
38 |
+Date: Sat, 19 Sep 2020 13:19:42 +0200 |
39 |
+Subject: [PATCH] tests: Remove unused cmake options |
40 |
+ |
41 |
+This fixes the following warnings: |
42 |
+ |
43 |
+| * One or more CMake variables were not used by the project: |
44 |
+| * BOOST_ROOT |
45 |
+| * SETUP_TYPE |
46 |
+ |
47 |
+Signed-off-by: Kurt Kanzenbach <kurt@×××××××××××××.de> |
48 |
+--- |
49 |
+ tests/unit/build/CMakeLists.txt | 2 +- |
50 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
51 |
+ |
52 |
+diff --git a/tests/unit/build/CMakeLists.txt b/tests/unit/build/CMakeLists.txt |
53 |
+index a4db8d4c927f..43bb766aced5 100644 |
54 |
+--- a/tests/unit/build/CMakeLists.txt |
55 |
++++ b/tests/unit/build/CMakeLists.txt |
56 |
+@@ -57,7 +57,7 @@ function(create_cmake_test name using_install_dir hpx_dir setup_type test_dir) |
57 |
+ ${name}.make_configure |
58 |
+ COMMAND |
59 |
+ "${CMAKE_COMMAND}" -E chdir "${build_dir}" "${CMAKE_COMMAND}" ${test_dir} |
60 |
+- -DHPX_DIR=${hpx_dir} -DBOOST_ROOT=${BOOST_ROOT} |
61 |
++ -DHPX_DIR=${hpx_dir} |
62 |
+ ${ADDITIONAL_CMAKE_OPTIONS} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS_SAFE} |
63 |
+ -DCMAKE_BUILD_TYPE=$<CONFIGURATION> |
64 |
+ VERBATIM |
65 |
+-- |
66 |
+2.26.2 |
67 |
+ |
68 |
|
69 |
diff --git a/sys-cluster/hpx/files/hpx-1.5.1-docs.patch b/sys-cluster/hpx/files/hpx-1.5.1-docs.patch |
70 |
new file mode 100644 |
71 |
index 00000000000..a9978ea2955 |
72 |
--- /dev/null |
73 |
+++ b/sys-cluster/hpx/files/hpx-1.5.1-docs.patch |
74 |
@@ -0,0 +1,91 @@ |
75 |
+From 785ade96043ab6fff85646a841996ccf6dfd0b62 Mon Sep 17 00:00:00 2001 |
76 |
+From: Kurt Kanzenbach <kurt@×××××××××××××.de> |
77 |
+Date: Wed, 28 Oct 2020 18:37:31 +0100 |
78 |
+Subject: [PATCH] static_reinit: Remove export macro |
79 |
+ |
80 |
+This macro leads to doc generation fail: |
81 |
+ |
82 |
+|/home/kurt/git/hpx/build/docs/sphinx/libs/static_reinit/api.rst:29: WARNING:cpp:identifier reference target not found: HPX_EXPORT_REINITIALIZABLE_STATIC |
83 |
+ |
84 |
+... and it results in an exception in sphinx: |
85 |
+ |
86 |
+|Traceback (most recent call last): |
87 |
+| File "/usr/lib/python3.7/site-packages/sphinx/cmd/build.py", line 280, in build_main |
88 |
+| app.build(args.force_all, filenames) |
89 |
+| File "/usr/lib/python3.7/site-packages/sphinx/application.py", line 348, in build |
90 |
+| self.builder.build_update() |
91 |
+| File "/usr/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 299, in build_update |
92 |
+| len(to_build)) |
93 |
+| File "/usr/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 361, in build |
94 |
+| self.write(docnames, list(updated_docnames), method) |
95 |
+| File "/usr/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 535, in write |
96 |
+| self._write_serial(sorted(docnames)) |
97 |
+| File "/usr/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 542, in _write_serial |
98 |
+| doctree = self.env.get_and_resolve_doctree(docname, self) |
99 |
+| File "/usr/lib/python3.7/site-packages/sphinx/environment/__init__.py", line 539, in get_and_resolve_doctree |
100 |
+| self.apply_post_transforms(doctree, docname) |
101 |
+| File "/usr/lib/python3.7/site-packages/sphinx/environment/__init__.py", line 585, in apply_post_transforms |
102 |
+| transformer.apply_transforms() |
103 |
+| File "/usr/lib/python3.7/site-packages/sphinx/transforms/__init__.py", line 87, in apply_transforms |
104 |
+| super().apply_transforms() |
105 |
+| File "/usr/lib/python3.7/site-packages/docutils/transforms/__init__.py", line 171, in apply_transforms |
106 |
+| transform.apply(**kwargs) |
107 |
+| File "/usr/lib/python3.7/site-packages/sphinx/transforms/post_transforms/__init__.py", line 44, in apply |
108 |
+| self.run(**kwargs) |
109 |
+| File "/usr/lib/python3.7/site-packages/sphinx/transforms/post_transforms/__init__.py", line 88, in run |
110 |
+| typ, target, node, contnode) |
111 |
+| File "/usr/lib/python3.7/site-packages/sphinx/domains/cpp.py", line 7502, in resolve_xref |
112 |
+| target, node, contnode)[0] |
113 |
+| File "/usr/lib/python3.7/site-packages/sphinx/domains/cpp.py", line 7375, in _resolve_xref_inner |
114 |
+| assert parentSymbol # should be there |
115 |
+|AssertionError |
116 |
+ |
117 |
+Actually the macro is not needed. So, just remove it until sphinx is fixed. |
118 |
+ |
119 |
+Signed-off-by: Kurt Kanzenbach <kurt@×××××××××××××.de> |
120 |
+--- |
121 |
+ .../hpx/static_reinit/reinitializable_static.hpp | 14 ++------------ |
122 |
+ 1 file changed, 2 insertions(+), 12 deletions(-) |
123 |
+ |
124 |
+diff --git a/libs/static_reinit/include/hpx/static_reinit/reinitializable_static.hpp b/libs/static_reinit/include/hpx/static_reinit/reinitializable_static.hpp |
125 |
+index 08980b9e269e..3c99400b9553 100644 |
126 |
+--- a/libs/static_reinit/include/hpx/static_reinit/reinitializable_static.hpp |
127 |
++++ b/libs/static_reinit/include/hpx/static_reinit/reinitializable_static.hpp |
128 |
+@@ -17,14 +17,6 @@ |
129 |
+ #include <mutex> |
130 |
+ #include <type_traits> |
131 |
+ |
132 |
+-// clang-format off |
133 |
+-#if !defined(HPX_WINDOWS) |
134 |
+-# define HPX_EXPORT_REINITIALIZABLE_STATIC HPX_EXPORT |
135 |
+-#else |
136 |
+-# define HPX_EXPORT_REINITIALIZABLE_STATIC |
137 |
+-#endif |
138 |
+-// clang-format on |
139 |
+- |
140 |
+ namespace hpx { namespace util { |
141 |
+ /////////////////////////////////////////////////////////////////////////// |
142 |
+ // Provides thread-safe initialization of a single static instance of T. |
143 |
+@@ -39,11 +31,11 @@ namespace hpx { namespace util { |
144 |
+ // functions used by the HPX runtime system to reinitialize the held data |
145 |
+ // structures. |
146 |
+ template <typename T, typename Tag = T, std::size_t N = 1> |
147 |
+- struct HPX_EXPORT_REINITIALIZABLE_STATIC reinitializable_static; |
148 |
++ struct HPX_EXPORT reinitializable_static; |
149 |
+ |
150 |
+ ////////////////////////////////////////////////////////////////////////// |
151 |
+ template <typename T, typename Tag, std::size_t N> |
152 |
+- struct HPX_EXPORT_REINITIALIZABLE_STATIC reinitializable_static |
153 |
++ struct HPX_EXPORT reinitializable_static |
154 |
+ { |
155 |
+ public: |
156 |
+ HPX_NON_COPYABLE(reinitializable_static); |
157 |
+@@ -157,5 +149,3 @@ namespace hpx { namespace util { |
158 |
+ template <typename T, typename Tag, std::size_t N> |
159 |
+ std::once_flag reinitializable_static<T, Tag, N>::constructed_; |
160 |
+ }} // namespace hpx::util |
161 |
+- |
162 |
+-#undef HPX_EXPORT_REINITIALIZABLE_STATIC |
163 |
+-- |
164 |
+2.26.2 |
165 |
+ |
166 |
|
167 |
diff --git a/sys-cluster/hpx/files/hpx-1.5.1-python.patch b/sys-cluster/hpx/files/hpx-1.5.1-python.patch |
168 |
new file mode 100644 |
169 |
index 00000000000..51e225e8f5b |
170 |
--- /dev/null |
171 |
+++ b/sys-cluster/hpx/files/hpx-1.5.1-python.patch |
172 |
@@ -0,0 +1,37 @@ |
173 |
+From 0d250c5747f3a80ddda6f5bf298cead9048d1c28 Mon Sep 17 00:00:00 2001 |
174 |
+From: Kurt Kanzenbach <kurt@×××××××××××××.de> |
175 |
+Date: Tue, 17 Mar 2020 16:20:35 +0100 |
176 |
+Subject: [PATCH] cmake: python: Use standard python interpreter |
177 |
+ |
178 |
+These scripts are needed during build and run time. So, use a python interpreter |
179 |
+which works for both cases. |
180 |
+ |
181 |
+Signed-off-by: Kurt Kanzenbach <kurt@×××××××××××××.de> |
182 |
+--- |
183 |
+ cmake/templates/hpxcxx.in | 2 +- |
184 |
+ cmake/templates/hpxrun.py.in | 2 +- |
185 |
+ 2 files changed, 2 insertions(+), 2 deletions(-) |
186 |
+ |
187 |
+diff --git a/cmake/templates/hpxcxx.in b/cmake/templates/hpxcxx.in |
188 |
+index 81f38f89367d..a0fd7837b066 100755 |
189 |
+--- a/cmake/templates/hpxcxx.in |
190 |
++++ b/cmake/templates/hpxcxx.in |
191 |
+@@ -1,4 +1,4 @@ |
192 |
+-#! @PYTHON_EXECUTABLE@ |
193 |
++#! /usr/bin/env python |
194 |
+ # |
195 |
+ # Copyright (c) 2014 Steven R. Brandt |
196 |
+ # |
197 |
+diff --git a/cmake/templates/hpxrun.py.in b/cmake/templates/hpxrun.py.in |
198 |
+index 44a79e7cbffb..d4ab6020485e 100755 |
199 |
+--- a/cmake/templates/hpxrun.py.in |
200 |
++++ b/cmake/templates/hpxrun.py.in |
201 |
+@@ -1,4 +1,4 @@ |
202 |
+-#! @PYTHON_EXECUTABLE@ |
203 |
++#! /usr/bin/env python |
204 |
+ # |
205 |
+ # Copyright (c) 2014 Thomas Heller |
206 |
+ # |
207 |
+-- |
208 |
+2.26.2 |
209 |
+ |
210 |
|
211 |
diff --git a/sys-cluster/hpx/files/hpx-1.5.1-tests.patch b/sys-cluster/hpx/files/hpx-1.5.1-tests.patch |
212 |
new file mode 100644 |
213 |
index 00000000000..4a930eb0c0c |
214 |
--- /dev/null |
215 |
+++ b/sys-cluster/hpx/files/hpx-1.5.1-tests.patch |
216 |
@@ -0,0 +1,111 @@ |
217 |
+From e623c902bc57f85b3d1b09e58b75fb01898b409e Mon Sep 17 00:00:00 2001 |
218 |
+From: Kurt Kanzenbach <kurt@×××××××××××××.de> |
219 |
+Date: Fri, 18 Sep 2020 08:32:01 +0200 |
220 |
+Subject: [PATCH] tests: Disable failing tests |
221 |
+ |
222 |
+Within portage the following tests fail: |
223 |
+ |
224 |
+|99% tests passed, 5 tests failed out of 920 |
225 |
+| |
226 |
+|Total Test time (real) = 1069.51 sec |
227 |
+| |
228 |
+|The following tests FAILED: |
229 |
+| 299 - tests.unit.modules.async_mpi.mpi_ring_async_executor (Failed) |
230 |
+| 351 - tests.unit.modules.compute.numa_allocator (Failed) |
231 |
+| 492 - tests.regressions.modules.performance_counters.dynamic_counters_loaded_1508 (Failed) |
232 |
+| 919 - tests.unit.parcelset.distributed.mpi.put_parcels_with_coalescing (Failed) |
233 |
+| 920 - tests.unit.parcelset.distributed.tcp.put_parcels_with_coalescing (Failed) |
234 |
+ |
235 |
+Disable them. |
236 |
+ |
237 |
+Signed-off-by: Kurt Kanzenbach <kurt@×××××××××××××.de> |
238 |
+--- |
239 |
+ libs/async_mpi/tests/unit/CMakeLists.txt | 2 +- |
240 |
+ libs/compute/tests/unit/CMakeLists.txt | 2 +- |
241 |
+ .../tests/regressions/CMakeLists.txt | 4 +--- |
242 |
+ .../segmented_algorithms/tests/unit/CMakeLists.txt | 2 +- |
243 |
+ tests/unit/parcelset/CMakeLists.txt | 14 +++++++------- |
244 |
+ 5 files changed, 11 insertions(+), 13 deletions(-) |
245 |
+ |
246 |
+diff --git a/libs/async_mpi/tests/unit/CMakeLists.txt b/libs/async_mpi/tests/unit/CMakeLists.txt |
247 |
+index 30e6de80fa01..d78490089f02 100644 |
248 |
+--- a/libs/async_mpi/tests/unit/CMakeLists.txt |
249 |
++++ b/libs/async_mpi/tests/unit/CMakeLists.txt |
250 |
+@@ -4,7 +4,7 @@ |
251 |
+ # Distributed under the Boost Software License, Version 1.0. (See accompanying |
252 |
+ # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
253 |
+ |
254 |
+-set(tests mpi_ring_async_executor) |
255 |
++# set(tests mpi_ring_async_executor) |
256 |
+ |
257 |
+ set(mpi_ring_async_executor_PARAMETERS THREADS_PER_LOCALITY 4 LOCALITIES 2 |
258 |
+ RUNWRAPPER mpi |
259 |
+diff --git a/libs/compute/tests/unit/CMakeLists.txt b/libs/compute/tests/unit/CMakeLists.txt |
260 |
+index c7c43c91ef08..349483642d33 100644 |
261 |
+--- a/libs/compute/tests/unit/CMakeLists.txt |
262 |
++++ b/libs/compute/tests/unit/CMakeLists.txt |
263 |
+@@ -8,7 +8,7 @@ |
264 |
+ set(tests block_allocator) |
265 |
+ |
266 |
+ if(HPX_WITH_DISTRIBUTED_RUNTIME AND HPX_WITH_SHARED_PRIORITY_SCHEDULER) |
267 |
+- set(tests ${tests} numa_allocator) |
268 |
++ # set(tests ${tests} numa_allocator) |
269 |
+ endif() |
270 |
+ |
271 |
+ # NB. threads = -2 = threads = 'cores' NB. threads = -1 = threads = 'all' |
272 |
+diff --git a/libs/performance_counters/tests/regressions/CMakeLists.txt b/libs/performance_counters/tests/regressions/CMakeLists.txt |
273 |
+index adf982876e21..406b2edf1837 100644 |
274 |
+--- a/libs/performance_counters/tests/regressions/CMakeLists.txt |
275 |
++++ b/libs/performance_counters/tests/regressions/CMakeLists.txt |
276 |
+@@ -5,9 +5,7 @@ |
277 |
+ # Distributed under the Boost Software License, Version 1.0. (See accompanying |
278 |
+ # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
279 |
+ |
280 |
+-set(tests discover_counters_1787 dynamic_counters_loaded_1508 statistics_2666 |
281 |
+- uptime_1737 |
282 |
+-) |
283 |
++set(tests discover_counters_1787 statistics_2666 uptime_1737) |
284 |
+ |
285 |
+ set(dynamic_counters_loaded_1508_FLAGS DEPENDENCIES memory_component) |
286 |
+ |
287 |
+diff --git a/libs/segmented_algorithms/tests/unit/CMakeLists.txt b/libs/segmented_algorithms/tests/unit/CMakeLists.txt |
288 |
+index 6dba64d19fc4..ccaa56b1a0ea 100644 |
289 |
+--- a/libs/segmented_algorithms/tests/unit/CMakeLists.txt |
290 |
++++ b/libs/segmented_algorithms/tests/unit/CMakeLists.txt |
291 |
+@@ -8,7 +8,7 @@ set(tests |
292 |
+ partitioned_vector_adjacent_difference1 |
293 |
+ partitioned_vector_adjacent_difference2 |
294 |
+ partitioned_vector_adjacent_find1 |
295 |
+- partitioned_vector_adjacent_find2 |
296 |
++ # partitioned_vector_adjacent_find2 |
297 |
+ partitioned_vector_all_of1 |
298 |
+ partitioned_vector_all_of2 |
299 |
+ partitioned_vector_any_of1 |
300 |
+diff --git a/tests/unit/parcelset/CMakeLists.txt b/tests/unit/parcelset/CMakeLists.txt |
301 |
+index 1981e2baf8cd..b374292ceee7 100644 |
302 |
+--- a/tests/unit/parcelset/CMakeLists.txt |
303 |
++++ b/tests/unit/parcelset/CMakeLists.txt |
304 |
+@@ -12,13 +12,13 @@ set(put_parcels_PARAMETERS LOCALITIES 2) |
305 |
+ set(put_parcels_FLAGS DEPENDENCIES iostreams_component) |
306 |
+ set(set_parcel_write_handler_PARAMETERS LOCALITIES 2) |
307 |
+ |
308 |
+-if(HPX_WITH_PARCEL_COALESCING) |
309 |
+- set(tests ${tests} put_parcels_with_coalescing) |
310 |
+- set(put_parcels_with_coalescing_PARAMETERS LOCALITIES 2) |
311 |
+- set(put_parcels_with_coalescing_FLAGS DEPENDENCIES iostreams_component |
312 |
+- parcel_coalescing |
313 |
+- ) |
314 |
+-endif() |
315 |
++# if(HPX_WITH_PARCEL_COALESCING) |
316 |
++# set(tests ${tests} put_parcels_with_coalescing) |
317 |
++# set(put_parcels_with_coalescing_PARAMETERS LOCALITIES 2) |
318 |
++# set(put_parcels_with_coalescing_FLAGS DEPENDENCIES iostreams_component |
319 |
++# parcel_coalescing |
320 |
++# ) |
321 |
++# endif() |
322 |
+ |
323 |
+ if(HPX_WITH_COMPRESSION_BZIP2 |
324 |
+ OR HPX_WITH_COMPRESSION_ZLIB |
325 |
+-- |
326 |
+2.26.2 |
327 |
+ |
328 |
|
329 |
diff --git a/sys-cluster/hpx/hpx-1.5.1.ebuild b/sys-cluster/hpx/hpx-1.5.1.ebuild |
330 |
new file mode 100644 |
331 |
index 00000000000..7481a6229a7 |
332 |
--- /dev/null |
333 |
+++ b/sys-cluster/hpx/hpx-1.5.1.ebuild |
334 |
@@ -0,0 +1,120 @@ |
335 |
+# Copyright 1999-2020 Gentoo Authors |
336 |
+# Distributed under the terms of the GNU General Public License v2 |
337 |
+ |
338 |
+EAPI=7 |
339 |
+ |
340 |
+PYTHON_COMPAT=( python3_{6..9} ) |
341 |
+ |
342 |
+if [[ ${PV} == 9999 ]] ; then |
343 |
+ inherit git-r3 |
344 |
+ EGIT_REPO_URI="https://github.com/STEllAR-GROUP/hpx.git" |
345 |
+else |
346 |
+ SRC_URI="https://github.com/STEllAR-GROUP/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
347 |
+ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
348 |
+fi |
349 |
+inherit check-reqs cmake multiprocessing python-single-r1 |
350 |
+ |
351 |
+DESCRIPTION="C++ runtime system for parallel and distributed applications" |
352 |
+HOMEPAGE="https://stellar.cct.lsu.edu/tag/hpx/" |
353 |
+ |
354 |
+SLOT="0" |
355 |
+LICENSE="Boost-1.0" |
356 |
+IUSE="doc examples jemalloc mpi papi +perftools tbb test" |
357 |
+RESTRICT="!test? ( test )" |
358 |
+ |
359 |
+REQUIRED_USE=" |
360 |
+ ${PYTHON_REQUIRED_USE} |
361 |
+ ?? ( jemalloc perftools tbb ) |
362 |
+" |
363 |
+ |
364 |
+BDEPEND=" |
365 |
+ virtual/pkgconfig |
366 |
+ doc? ( |
367 |
+ ${PYTHON_DEPS} |
368 |
+ app-doc/doxygen |
369 |
+ $(python_gen_cond_dep ' |
370 |
+ dev-python/sphinx[${PYTHON_MULTI_USEDEP}] |
371 |
+ dev-python/sphinx_rtd_theme[${PYTHON_MULTI_USEDEP}] |
372 |
+ >=dev-python/breathe-4.22[${PYTHON_MULTI_USEDEP}] |
373 |
+ ') |
374 |
+ ) |
375 |
+ test? ( ${PYTHON_DEPS} ) |
376 |
+" |
377 |
+RDEPEND=" |
378 |
+ ${PYTHON_DEPS} |
379 |
+ dev-libs/boost:= |
380 |
+ sys-apps/hwloc |
381 |
+ sys-libs/zlib |
382 |
+ mpi? ( virtual/mpi ) |
383 |
+ papi? ( dev-libs/papi ) |
384 |
+ perftools? ( dev-util/google-perftools ) |
385 |
+ tbb? ( dev-cpp/tbb ) |
386 |
+" |
387 |
+DEPEND="${RDEPEND}" |
388 |
+ |
389 |
+PATCHES=( |
390 |
+ "${FILESDIR}/${P}-cmake.patch" |
391 |
+ "${FILESDIR}/${P}-docs.patch" |
392 |
+ "${FILESDIR}/${P}-python.patch" |
393 |
+ "${FILESDIR}/${P}-tests.patch" |
394 |
+) |
395 |
+ |
396 |
+hpx_memory_requirement() { |
397 |
+ # HPX needs enough main memory for compiling |
398 |
+ # rule of thumb: 1G per job |
399 |
+ if [[ -z ${MAKEOPTS} ]] ; then |
400 |
+ echo "2G" |
401 |
+ else |
402 |
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") |
403 |
+ echo "${jobs}G" |
404 |
+ fi |
405 |
+} |
406 |
+ |
407 |
+pkg_pretend() { |
408 |
+ local CHECKREQS_MEMORY=$(hpx_memory_requirement) |
409 |
+ check-reqs_pkg_setup |
410 |
+} |
411 |
+ |
412 |
+pkg_setup() { |
413 |
+ local CHECKREQS_MEMORY=$(hpx_memory_requirement) |
414 |
+ check-reqs_pkg_setup |
415 |
+ python-single-r1_pkg_setup |
416 |
+} |
417 |
+ |
418 |
+src_configure() { |
419 |
+ local mycmakeargs=( |
420 |
+ -DHPX_WITH_EXAMPLES=OFF |
421 |
+ -DHPX_WITH_DOCUMENTATION=$(usex doc) |
422 |
+ -DHPX_WITH_PARCELPORT_MPI=$(usex mpi) |
423 |
+ -DHPX_WITH_PAPI=$(usex papi) |
424 |
+ -DHPX_WITH_GOOGLE_PERFTOOLS=$(usex perftools) |
425 |
+ -DBUILD_TESTING=$(usex test) |
426 |
+ ) |
427 |
+ if use jemalloc; then |
428 |
+ mycmakeargs+=( -DHPX_WITH_MALLOC=jemalloc ) |
429 |
+ elif use perftools; then |
430 |
+ mycmakeargs+=( -DHPX_WITH_MALLOC=tcmalloc ) |
431 |
+ elif use tbb; then |
432 |
+ mycmakeargs+=( -DHPX_WITH_MALLOC=tbbmalloc ) |
433 |
+ else |
434 |
+ mycmakeargs+=( -DHPX_WITH_MALLOC=system ) |
435 |
+ fi |
436 |
+ |
437 |
+ cmake_src_configure |
438 |
+} |
439 |
+ |
440 |
+src_compile() { |
441 |
+ cmake_src_compile |
442 |
+ use test && cmake_build tests |
443 |
+} |
444 |
+ |
445 |
+src_test() { |
446 |
+ # avoid over-suscribing |
447 |
+ cmake_src_test -j1 |
448 |
+} |
449 |
+ |
450 |
+src_install() { |
451 |
+ cmake_src_install |
452 |
+ use examples && dodoc -r examples/ |
453 |
+ python_fix_shebang "${ED}" |
454 |
+} |