3
3
4
4
EAPI=7
5
5
6
- PYTHON_COMPAT=( python3_6 )
6
+ PYTHON_COMPAT=( python3_{6..8} )
7
7
8
8
if [[ ${PV} == 9999 ]] ; then
9
9
inherit git-r3
10
10
EGIT_REPO_URI=" https://github.com/STEllAR-GROUP/hpx.git"
11
11
else
12
12
SRC_URI=" https://stellar.cct.lsu.edu/files/${PN} _${PV} .tar.gz"
13
13
KEYWORDS=" ~amd64 ~x86 ~amd64-linux ~x86-linux"
14
- S=" ${WORKDIR} /${PN} _${PV} "
15
14
fi
16
- inherit cmake fortran-2 python-any -r1
15
+ inherit cmake fortran-2 python-single -r1 check-reqs
17
16
18
17
DESCRIPTION=" C++ runtime system for parallel and distributed applications"
19
18
HOMEPAGE=" https://stellar.cct.lsu.edu/tag/hpx/"
@@ -23,27 +22,55 @@ LICENSE="Boost-1.0"
23
22
IUSE=" doc examples jemalloc papi +perftools tbb test"
24
23
RESTRICT=" !test? ( test )"
25
24
26
- REQUIRED_USE=" ?? ( jemalloc perftools tbb )"
25
+ REQUIRED_USE="
26
+ ${PYTHON_REQUIRED_USE}
27
+ ?? ( jemalloc perftools tbb )
28
+ "
27
29
28
30
BDEPEND="
29
31
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} )
31
42
"
32
43
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
36
47
sys-libs/zlib
37
48
papi? ( dev-libs/papi )
38
- perftools? ( >= dev-util/google-perftools-1.7.1 )
49
+ perftools? ( dev-util/google-perftools )
39
50
tbb? ( dev-cpp/tbb )
40
51
"
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
+ }
44
69
45
70
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
47
74
}
48
75
49
76
src_configure () {
@@ -67,16 +94,18 @@ src_configure() {
67
94
cmake_src_configure
68
95
}
69
96
97
+ src_compile () {
98
+ cmake_src_compile
99
+ use test && cmake_build tests
100
+ }
101
+
70
102
src_test () {
71
103
# avoid over-suscribing
72
- cmake_build -j1 tests
104
+ cmake_src_test -j1
73
105
}
74
106
75
107
src_install () {
76
108
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} "
82
111
}
0 commit comments