Gentoo Archives: gentoo-commits

From: Florian Schmaus <flow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/hpx/files/, sys-cluster/hpx/
Date: Fri, 03 Jun 2022 08:35:27
Message-Id: 1654245303.64d66a0d31a271b0c8614e968f70c90b83a2bf29.flow@gentoo
1 commit: 64d66a0d31a271b0c8614e968f70c90b83a2bf29
2 Author: Kurt Kanzenbach <kurt <AT> kmk-computers <DOT> de>
3 AuthorDate: Mon May 30 18:51:48 2022 +0000
4 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 3 08:35:03 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64d66a0d
7
8 sys-cluster/hpx: add 1.8.0
9
10 Signed-off-by: Kurt Kanzenbach <kurt <AT> kmk-computers.de>
11 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
12
13 sys-cluster/hpx/Manifest | 1 +
14 sys-cluster/hpx/files/hpx-1.8.0-python.patch | 30 ++++++++
15 sys-cluster/hpx/hpx-1.8.0.ebuild | 105 +++++++++++++++++++++++++++
16 3 files changed, 136 insertions(+)
17
18 diff --git a/sys-cluster/hpx/Manifest b/sys-cluster/hpx/Manifest
19 index 32cfd01e4d9c..0e04f6bf71bc 100644
20 --- a/sys-cluster/hpx/Manifest
21 +++ b/sys-cluster/hpx/Manifest
22 @@ -1 +1,2 @@
23 DIST hpx-1.7.1.tar.gz 4751163 BLAKE2B 21e417dab5c118b16ab8d2955b0d65a95ca7d0e2f777496306855e4098cfb400962dd9e0cf03ebbab5e3348f2f985d1053d0a70124c0925c77859e8ada209cec SHA512 6bdb294da393a198abf81d5f63799a066334755eed0fda40bbfc4e9a774b6e19a3e5ad7ab45c989d31f3797e7b547bb552c29f51b552d9a79d166f86aee375a3
24 +DIST hpx-1.8.0.tar.gz 5209106 BLAKE2B aab9d3743cc2d73c2d3a6a2f2323e35dbe38cf506618475ea627d9c0d92855632f646404f5b257e2260eabe6bb22e8090bc3db2aafd9f4f71a0eeb62d7286247 SHA512 80afc93d517144d5c11164f82d7f0dd6fd71c079fb65930532c4fd96b6a5497cdf972bee8a6251035548a3662579a3bee5c04802569f47bc3c042ca868716cb7
25
26 diff --git a/sys-cluster/hpx/files/hpx-1.8.0-python.patch b/sys-cluster/hpx/files/hpx-1.8.0-python.patch
27 new file mode 100644
28 index 000000000000..21b7ce3ceeff
29 --- /dev/null
30 +++ b/sys-cluster/hpx/files/hpx-1.8.0-python.patch
31 @@ -0,0 +1,30 @@
32 +From 3d8d3acf0daad9cec8b092d67f7187265f7704e3 Mon Sep 17 00:00:00 2001
33 +From: Kurt Kanzenbach <kurt@×××××××××××××.de>
34 +Date: Tue, 17 Mar 2020 16:20:35 +0100
35 +Subject: [PATCH 1/4] cmake: python: Use standard python interpreter
36 +
37 +These scripts are needed during build and run time. So, use a python interpreter
38 +which works for both cases.
39 +
40 +Signed-off-by: Kurt Kanzenbach <kurt@×××××××××××××.de>
41 +---
42 + cmake/templates/hpxcxx.in | 2 +-
43 + cmake/templates/hpxrun.py.in | 2 +-
44 + 2 files changed, 2 insertions(+), 2 deletions(-)
45 +
46 +--- a/cmake/templates/hpxcxx.in
47 ++++ b/cmake/templates/hpxcxx.in
48 +@@ -1,4 +1,4 @@
49 +-#! @PYTHON_EXECUTABLE@
50 ++#! /usr/bin/env python
51 + #
52 + # Copyright (c) 2014 Steven R. Brandt
53 + #
54 +--- a/cmake/templates/hpxrun.py.in
55 ++++ b/cmake/templates/hpxrun.py.in
56 +@@ -1,4 +1,4 @@
57 +-#! @PYTHON_EXECUTABLE@
58 ++#! /usr/bin/env python
59 + #
60 + # Copyright (c) 2014 Thomas Heller
61 + #
62
63 diff --git a/sys-cluster/hpx/hpx-1.8.0.ebuild b/sys-cluster/hpx/hpx-1.8.0.ebuild
64 new file mode 100644
65 index 000000000000..a1b86f1f953f
66 --- /dev/null
67 +++ b/sys-cluster/hpx/hpx-1.8.0.ebuild
68 @@ -0,0 +1,105 @@
69 +# Copyright 1999-2022 Gentoo Authors
70 +# Distributed under the terms of the GNU General Public License v2
71 +
72 +EAPI=8
73 +
74 +PYTHON_COMPAT=( python3_{8..11} )
75 +
76 +if [[ ${PV} == 9999 ]] ; then
77 + inherit git-r3
78 + EGIT_REPO_URI="https://github.com/STEllAR-GROUP/hpx.git"
79 +else
80 + SRC_URI="https://github.com/STEllAR-GROUP/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
81 + KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
82 +fi
83 +inherit check-reqs cmake multiprocessing python-single-r1
84 +
85 +DESCRIPTION="C++ runtime system for parallel and distributed applications"
86 +HOMEPAGE="https://hpx.stellar-group.org/"
87 +
88 +SLOT="0"
89 +LICENSE="Boost-1.0"
90 +IUSE="examples jemalloc mpi papi +perftools tbb zlib"
91 +# tests fail to compile
92 +RESTRICT="test"
93 +
94 +REQUIRED_USE="
95 + ${PYTHON_REQUIRED_USE}
96 + ?? ( jemalloc perftools tbb )
97 +"
98 +
99 +BDEPEND="
100 + virtual/pkgconfig
101 +"
102 +RDEPEND="
103 + ${PYTHON_DEPS}
104 + >=dev-cpp/asio-1.12.0
105 + dev-libs/boost:=
106 + sys-apps/hwloc:=
107 + jemalloc? ( dev-libs/jemalloc:= )
108 + mpi? ( virtual/mpi )
109 + papi? ( dev-libs/papi )
110 + perftools? ( dev-util/google-perftools:= )
111 + tbb? ( dev-cpp/tbb:= )
112 + zlib? ( sys-libs/zlib )
113 +"
114 +DEPEND="${RDEPEND}"
115 +
116 +PATCHES=(
117 + "${FILESDIR}/${P}-python.patch"
118 +)
119 +
120 +hpx_memory_requirement() {
121 + # HPX needs enough main memory for compiling
122 + # rule of thumb: 1G per job
123 + if [[ -z ${MAKEOPTS} ]] ; then
124 + echo "2G"
125 + else
126 + local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
127 + echo "${jobs}G"
128 + fi
129 +}
130 +
131 +pkg_pretend() {
132 + local CHECKREQS_MEMORY=$(hpx_memory_requirement)
133 + check-reqs_pkg_setup
134 +}
135 +
136 +pkg_setup() {
137 + local CHECKREQS_MEMORY=$(hpx_memory_requirement)
138 + check-reqs_pkg_setup
139 + python-single-r1_pkg_setup
140 +}
141 +
142 +src_configure() {
143 + local mycmakeargs=(
144 + -DHPX_WITH_EXAMPLES=OFF
145 + -DHPX_WITH_DOCUMENTATION=OFF
146 + -DHPX_WITH_PARCELPORT_MPI=$(usex mpi)
147 + -DHPX_WITH_PAPI=$(usex papi)
148 + -DHPX_WITH_GOOGLE_PERFTOOLS=$(usex perftools)
149 + -DHPX_WITH_COMPRESSION_ZLIB=$(usex zlib)
150 + -DHPX_WITH_TESTS=OFF
151 + )
152 + if use jemalloc; then
153 + mycmakeargs+=( -DHPX_WITH_MALLOC=jemalloc )
154 + elif use perftools; then
155 + mycmakeargs+=( -DHPX_WITH_MALLOC=tcmalloc )
156 + elif use tbb; then
157 + mycmakeargs+=( -DHPX_WITH_MALLOC=tbbmalloc )
158 + else
159 + mycmakeargs+=( -DHPX_WITH_MALLOC=system )
160 + fi
161 +
162 + cmake_src_configure
163 +}
164 +
165 +src_compile() {
166 + cmake_src_compile
167 +}
168 +
169 +src_install() {
170 + cmake_src_install
171 + use examples && dodoc -r examples/
172 + python_fix_shebang "${ED}"
173 +}