commit:     44a7cadbf3648a4fb91e9dc783e968a06947ea65
Author:     Kurt Kanzenbach <kurt <AT> kmk-computers <DOT> de>
AuthorDate: Fri Jul  4 17:26:02 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jul 23 02:30:21 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44a7cadb

sys-cluster/hpx: add 1.11.0

hpx v1.11.0 does not build against >=dev-cpp/asio-1.34. Therefore, add a
restriction for it. It will be fixed with v1.11.1.

Signed-off-by: Kurt Kanzenbach <kurt <AT> kmk-computers.de>
Part-of: https://github.com/gentoo/gentoo/pull/42878
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-cluster/hpx/Manifest                      |   1 +
 sys-cluster/hpx/files/hpx-1.11.0-python.patch |  30 +++++++
 sys-cluster/hpx/hpx-1.11.0.ebuild             | 111 ++++++++++++++++++++++++++
 3 files changed, 142 insertions(+)

diff --git a/sys-cluster/hpx/Manifest b/sys-cluster/hpx/Manifest
index 36d7613c78b9..6616327d34c9 100644
--- a/sys-cluster/hpx/Manifest
+++ b/sys-cluster/hpx/Manifest
@@ -1 +1,2 @@
 DIST hpx-1.10.0.tar.gz 6146815 BLAKE2B 
eeab350944e5a7e68a0bbf2a7bac22c6d739359113ed75d5ed2ff601887c9466c6f92b80823be140e02e1a47480323b69a5f193f13b415f505ccae02792f6e1c
 SHA512 
e1cc9fa72cba4e66b5d6eff2487e93d5d553c32e6eebcfe9131bf69c5b595ab72295ff0986c81d5dc6a7caa8303d6709df91333f64efe59ee256d99a8c289dc5
+DIST hpx-1.11.0.tar.gz 6076551 BLAKE2B 
2cfb03784d4915c9c63afc993b1612c0797f4b0b5dba4a916d512331a0d4a16a5319301ad5ae9ea274d8c80ac349dda300180a7ecf06abf822819e38f4b7c89a
 SHA512 
bf22add7a97087f68bd49fe0ae5b2bfbd7ba01d4018872c3934ebd81a632e2559e6144c5aa06779db971c642d5a41b16c8c48108af2c4069be6d9f9b72985182

diff --git a/sys-cluster/hpx/files/hpx-1.11.0-python.patch 
b/sys-cluster/hpx/files/hpx-1.11.0-python.patch
new file mode 100644
index 000000000000..10d41f09dc35
--- /dev/null
+++ b/sys-cluster/hpx/files/hpx-1.11.0-python.patch
@@ -0,0 +1,30 @@
+From 3d8d3acf0daad9cec8b092d67f7187265f7704e3 Mon Sep 17 00:00:00 2001
+From: Kurt Kanzenbach <[email protected]>
+Date: Tue, 17 Mar 2020 16:20:35 +0100
+Subject: [PATCH 1/4] cmake: python: Use standard python interpreter
+
+These scripts are needed during build and run time. So, use a python 
interpreter
+which works for both cases.
+
+Signed-off-by: Kurt Kanzenbach <[email protected]>
+---
+ cmake/templates/hpxcxx.in    |    2 +-
+ cmake/templates/hpxrun.py.in |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/cmake/templates/hpxcxx.in
++++ b/cmake/templates/hpxcxx.in
+@@ -1,4 +1,4 @@
+-#! @Python_EXECUTABLE@
++#! /usr/bin/env python
+ #
+ # Copyright (c) 2020-@HPX_COPYRIGHT_YEAR@ STE||AR Group
+ # Copyright (c) 2014 Steven R. Brandt
+--- a/cmake/templates/hpxrun.py.in
++++ b/cmake/templates/hpxrun.py.in
+@@ -1,4 +1,4 @@
+-#! @Python_EXECUTABLE@
++#! /usr/bin/env python
+ #
+ # Copyright (c) 2020-@HPX_COPYRIGHT_YEAR@ STE||AR Group
+ # Copyright (c) 2014 Thomas Heller

diff --git a/sys-cluster/hpx/hpx-1.11.0.ebuild 
b/sys-cluster/hpx/hpx-1.11.0.ebuild
new file mode 100644
index 000000000000..725fbaa7abe9
--- /dev/null
+++ b/sys-cluster/hpx/hpx-1.11.0.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+
+if [[ ${PV} == 9999 ]] ; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/STEllAR-GROUP/hpx.git";
+else
+       SRC_URI="https://github.com/STEllAR-GROUP/${PN}/archive/v${PV}.tar.gz 
-> ${P}.tar.gz"
+       KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+fi
+inherit check-reqs cmake multiprocessing python-single-r1
+
+DESCRIPTION="C++ runtime system for parallel and distributed applications"
+HOMEPAGE="https://hpx.stellar-group.org/";
+
+LICENSE="Boost-1.0"
+SLOT="0"
+IUSE="examples jemalloc mpi papi +perftools tbb zlib"
+# tests fail to compile
+RESTRICT="test"
+
+REQUIRED_USE="
+       ${PYTHON_REQUIRED_USE}
+       ?? ( jemalloc perftools tbb )
+"
+
+BDEPEND="
+       virtual/pkgconfig
+"
+
+#
+# hpx v1.11.0 does not build with >=dev-cpp/asio-1.34.
+# See bug report: https://github.com/STEllAR-GROUP/hpx/issues/6730
+# It will be fixed in hpx v1.11.1.
+#
+RDEPEND="
+       ${PYTHON_DEPS}
+       <dev-cpp/asio-1.34
+       dev-libs/boost:=
+       sys-apps/hwloc:=
+       jemalloc? ( dev-libs/jemalloc:= )
+       mpi? ( virtual/mpi )
+       papi? ( dev-libs/papi )
+       perftools? ( dev-util/google-perftools:= )
+       tbb? ( dev-cpp/tbb:= )
+       zlib? ( sys-libs/zlib )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+       "${FILESDIR}/${P}-python.patch"
+)
+
+hpx_memory_requirement() {
+       # HPX needs enough main memory for compiling
+       # rule of thumb: 1G per job
+       if [[ -z ${MAKEOPTS} ]] ; then
+               echo "2G"
+       else
+               local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
+               echo "${jobs}G"
+       fi
+}
+
+pkg_pretend() {
+       local CHECKREQS_MEMORY=$(hpx_memory_requirement)
+       check-reqs_pkg_setup
+}
+
+pkg_setup() {
+       local CHECKREQS_MEMORY=$(hpx_memory_requirement)
+       check-reqs_pkg_setup
+       python-single-r1_pkg_setup
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DHPX_WITH_EXAMPLES=OFF
+               -DHPX_WITH_DOCUMENTATION=OFF
+               -DHPX_WITH_PARCELPORT_MPI=$(usex mpi)
+               -DHPX_WITH_PAPI=$(usex papi)
+               -DHPX_WITH_GOOGLE_PERFTOOLS=$(usex perftools)
+               -DHPX_WITH_COMPRESSION_ZLIB=$(usex zlib)
+               -DHPX_WITH_TESTS=OFF
+       )
+       if use jemalloc; then
+               mycmakeargs+=( -DHPX_WITH_MALLOC=jemalloc )
+       elif use perftools; then
+               mycmakeargs+=( -DHPX_WITH_MALLOC=tcmalloc )
+       elif use tbb; then
+               mycmakeargs+=( -DHPX_WITH_MALLOC=tbbmalloc )
+       else
+               mycmakeargs+=( -DHPX_WITH_MALLOC=system )
+       fi
+
+       cmake_src_configure
+}
+
+src_compile() {
+       cmake_src_compile
+}
+
+src_install() {
+       cmake_src_install
+       use examples && dodoc -r examples/
+       python_fix_shebang "${ED}"
+}

Reply via email to