Skip to content

Commit ac36f2e

Browse files
shifty91juippis
authored andcommitted
sys-cluster/hpx: Sync live ebuild
Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Kurt Kanzenbach <[email protected]> Closes: gentoo#14990 Signed-off-by: Joonas Niilola <[email protected]>
1 parent adf9ea1 commit ac36f2e

File tree

1 file changed

+48
-19
lines changed

1 file changed

+48
-19
lines changed

sys-cluster/hpx/hpx-9999.ebuild

+48-19
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@
33

44
EAPI=7
55

6-
PYTHON_COMPAT=( python3_6 )
6+
PYTHON_COMPAT=( python3_{6..8} )
77

88
if [[ ${PV} == 9999 ]] ; then
99
inherit git-r3
1010
EGIT_REPO_URI="https://github.com/STEllAR-GROUP/hpx.git"
1111
else
1212
SRC_URI="https://stellar.cct.lsu.edu/files/${PN}_${PV}.tar.gz"
1313
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
14-
S="${WORKDIR}/${PN}_${PV}"
1514
fi
16-
inherit cmake fortran-2 python-any-r1
15+
inherit cmake fortran-2 python-single-r1 check-reqs
1716

1817
DESCRIPTION="C++ runtime system for parallel and distributed applications"
1918
HOMEPAGE="https://stellar.cct.lsu.edu/tag/hpx/"
@@ -23,27 +22,55 @@ LICENSE="Boost-1.0"
2322
IUSE="doc examples jemalloc papi +perftools tbb test"
2423
RESTRICT="!test? ( test )"
2524

26-
REQUIRED_USE="?? ( jemalloc perftools tbb )"
25+
REQUIRED_USE="
26+
${PYTHON_REQUIRED_USE}
27+
?? ( jemalloc perftools tbb )
28+
"
2729

2830
BDEPEND="
2931
virtual/pkgconfig
30-
doc? ( >=dev-libs/boost-1.56.0-r1[tools] )
32+
doc? (
33+
${PYTHON_DEPS}
34+
app-doc/doxygen
35+
$(python_gen_cond_dep '
36+
dev-python/sphinx[${PYTHON_MULTI_USEDEP}]
37+
dev-python/sphinx_rtd_theme[${PYTHON_MULTI_USEDEP}]
38+
>=dev-python/breathe-4.14[${PYTHON_MULTI_USEDEP}]
39+
')
40+
)
41+
test? ( ${PYTHON_DEPS} )
3142
"
3243
RDEPEND="
33-
>=dev-libs/boost-1.49:=
34-
>=sys-apps/hwloc-1.8
35-
>=sys-libs/libunwind-1
44+
${PYTHON_DEPS}
45+
dev-libs/boost:=
46+
sys-apps/hwloc
3647
sys-libs/zlib
3748
papi? ( dev-libs/papi )
38-
perftools? ( >=dev-util/google-perftools-1.7.1 )
49+
perftools? ( dev-util/google-perftools )
3950
tbb? ( dev-cpp/tbb )
4051
"
41-
DEPEND="${RDEPEND}
42-
test? ( ${PYTHON_DEPS} )
43-
"
52+
DEPEND="${RDEPEND}"
53+
54+
hpx_memory_requirement() {
55+
# HPX needs enough main memory for compiling
56+
# rule of thumb: 1G per job
57+
if [[ -z ${MAKEOPTS} ]] ; then
58+
echo "2G"
59+
else
60+
local jobs=`echo ${MAKEOPTS} | cut -d j -f 2`
61+
echo "${jobs}G"
62+
fi
63+
}
64+
65+
pkg_pretend() {
66+
local CHECKREQS_MEMORY=$(hpx_memory_requirement)
67+
check-reqs_pkg_setup
68+
}
4469

4570
pkg_setup() {
46-
use test && python-any-r1_pkg_setup
71+
local CHECKREQS_MEMORY=$(hpx_memory_requirement)
72+
check-reqs_pkg_setup
73+
python-single-r1_pkg_setup
4774
}
4875

4976
src_configure() {
@@ -67,16 +94,18 @@ src_configure() {
6794
cmake_src_configure
6895
}
6996

97+
src_compile() {
98+
cmake_src_compile
99+
use test && cmake_build tests
100+
}
101+
70102
src_test() {
71103
# avoid over-suscribing
72-
cmake_build -j1 tests
104+
cmake_src_test -j1
73105
}
74106

75107
src_install() {
76108
cmake_src_install
77-
if use examples; then
78-
mv "${D}/usr/bin/spin" "${D}/usr/bin/hpx_spin" || die
79-
insinto /usr/share/doc/${PF}
80-
doins -r examples
81-
fi
109+
use examples && dodoc -r examples/
110+
python_fix_shebang "${ED}"
82111
}

0 commit comments

Comments
 (0)