Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/hpx/files/, sys-cluster/hpx/
Date: Tue, 24 Aug 2021 08:50:39
Message-Id: 1629795026.cb5f6e4697232cd663ce85d9a72b0db00da81948.juippis@gentoo
1 commit: cb5f6e4697232cd663ce85d9a72b0db00da81948
2 Author: Kurt Kanzenbach <kurt <AT> kmk-computers <DOT> de>
3 AuthorDate: Thu Aug 19 18:27:23 2021 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 24 08:50:26 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb5f6e46
7
8 sys-cluster/hpx: Bump version to v1.7.1
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.3
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.7.1-python.patch | 30 ++++++++
16 sys-cluster/hpx/hpx-1.7.1.ebuild | 104 +++++++++++++++++++++++++++
17 3 files changed, 135 insertions(+)
18
19 diff --git a/sys-cluster/hpx/Manifest b/sys-cluster/hpx/Manifest
20 index e89c5667bf2..7e92db81410 100644
21 --- a/sys-cluster/hpx/Manifest
22 +++ b/sys-cluster/hpx/Manifest
23 @@ -1 +1,2 @@
24 DIST hpx-1.7.0.tar.gz 4729879 BLAKE2B 05be1461eb0867b690a8f34a7ddf46d4fa19e05b5666df6cf5a3dfd28fa6a6ecacf6305bf2eaa42a669f18264b61c9690988695b8748ba09a27011001b543952 SHA512 052b3278710d8047c8e0e0979a668aa5161c495fcd12b089dd5039c64bd414b4ec0b96dfcd414d68e0db5b31c360dffb84374413c53794f37ce77d9cabc89518
25 +DIST hpx-1.7.1.tar.gz 4751163 BLAKE2B 21e417dab5c118b16ab8d2955b0d65a95ca7d0e2f777496306855e4098cfb400962dd9e0cf03ebbab5e3348f2f985d1053d0a70124c0925c77859e8ada209cec SHA512 6bdb294da393a198abf81d5f63799a066334755eed0fda40bbfc4e9a774b6e19a3e5ad7ab45c989d31f3797e7b547bb552c29f51b552d9a79d166f86aee375a3
26
27 diff --git a/sys-cluster/hpx/files/hpx-1.7.1-python.patch b/sys-cluster/hpx/files/hpx-1.7.1-python.patch
28 new file mode 100644
29 index 00000000000..21b7ce3ceef
30 --- /dev/null
31 +++ b/sys-cluster/hpx/files/hpx-1.7.1-python.patch
32 @@ -0,0 +1,30 @@
33 +From 3d8d3acf0daad9cec8b092d67f7187265f7704e3 Mon Sep 17 00:00:00 2001
34 +From: Kurt Kanzenbach <kurt@×××××××××××××.de>
35 +Date: Tue, 17 Mar 2020 16:20:35 +0100
36 +Subject: [PATCH 1/4] cmake: python: Use standard python interpreter
37 +
38 +These scripts are needed during build and run time. So, use a python interpreter
39 +which works for both cases.
40 +
41 +Signed-off-by: Kurt Kanzenbach <kurt@×××××××××××××.de>
42 +---
43 + cmake/templates/hpxcxx.in | 2 +-
44 + cmake/templates/hpxrun.py.in | 2 +-
45 + 2 files changed, 2 insertions(+), 2 deletions(-)
46 +
47 +--- a/cmake/templates/hpxcxx.in
48 ++++ b/cmake/templates/hpxcxx.in
49 +@@ -1,4 +1,4 @@
50 +-#! @PYTHON_EXECUTABLE@
51 ++#! /usr/bin/env python
52 + #
53 + # Copyright (c) 2014 Steven R. Brandt
54 + #
55 +--- a/cmake/templates/hpxrun.py.in
56 ++++ b/cmake/templates/hpxrun.py.in
57 +@@ -1,4 +1,4 @@
58 +-#! @PYTHON_EXECUTABLE@
59 ++#! /usr/bin/env python
60 + #
61 + # Copyright (c) 2014 Thomas Heller
62 + #
63
64 diff --git a/sys-cluster/hpx/hpx-1.7.1.ebuild b/sys-cluster/hpx/hpx-1.7.1.ebuild
65 new file mode 100644
66 index 00000000000..2ab8ea741f3
67 --- /dev/null
68 +++ b/sys-cluster/hpx/hpx-1.7.1.ebuild
69 @@ -0,0 +1,104 @@
70 +# Copyright 1999-2021 Gentoo Authors
71 +# Distributed under the terms of the GNU General Public License v2
72 +
73 +EAPI=7
74 +
75 +PYTHON_COMPAT=( python3_{8..10} )
76 +
77 +if [[ ${PV} == 9999 ]] ; then
78 + inherit git-r3
79 + EGIT_REPO_URI="https://github.com/STEllAR-GROUP/hpx.git"
80 +else
81 + SRC_URI="https://github.com/STEllAR-GROUP/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
82 + KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
83 +fi
84 +inherit check-reqs cmake multiprocessing python-single-r1
85 +
86 +DESCRIPTION="C++ runtime system for parallel and distributed applications"
87 +HOMEPAGE="https://stellar.cct.lsu.edu/tag/hpx/"
88 +
89 +SLOT="0"
90 +LICENSE="Boost-1.0"
91 +IUSE="examples jemalloc mpi papi +perftools tbb"
92 +# tests fail to compile
93 +RESTRICT="test"
94 +
95 +REQUIRED_USE="
96 + ${PYTHON_REQUIRED_USE}
97 + ?? ( jemalloc perftools tbb )
98 +"
99 +
100 +BDEPEND="
101 + virtual/pkgconfig
102 +"
103 +RDEPEND="
104 + ${PYTHON_DEPS}
105 + dev-cpp/asio
106 + dev-libs/boost:=
107 + sys-apps/hwloc
108 + sys-libs/zlib
109 + jemalloc? ( dev-libs/jemalloc )
110 + mpi? ( virtual/mpi )
111 + papi? ( dev-libs/papi )
112 + perftools? ( dev-util/google-perftools )
113 + tbb? ( dev-cpp/tbb )
114 +"
115 +DEPEND="${RDEPEND}"
116 +
117 +PATCHES=(
118 + "${FILESDIR}/${P}-python.patch"
119 +)
120 +
121 +hpx_memory_requirement() {
122 + # HPX needs enough main memory for compiling
123 + # rule of thumb: 1G per job
124 + if [[ -z ${MAKEOPTS} ]] ; then
125 + echo "2G"
126 + else
127 + local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
128 + echo "${jobs}G"
129 + fi
130 +}
131 +
132 +pkg_pretend() {
133 + local CHECKREQS_MEMORY=$(hpx_memory_requirement)
134 + check-reqs_pkg_setup
135 +}
136 +
137 +pkg_setup() {
138 + local CHECKREQS_MEMORY=$(hpx_memory_requirement)
139 + check-reqs_pkg_setup
140 + python-single-r1_pkg_setup
141 +}
142 +
143 +src_configure() {
144 + local mycmakeargs=(
145 + -DHPX_WITH_EXAMPLES=OFF
146 + -DHPX_WITH_DOCUMENTATION=OFF
147 + -DHPX_WITH_PARCELPORT_MPI=$(usex mpi)
148 + -DHPX_WITH_PAPI=$(usex papi)
149 + -DHPX_WITH_GOOGLE_PERFTOOLS=$(usex perftools)
150 + -DBUILD_TESTING=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 +}