From 623ee73d661e5ed8475cb264511f683407d87365 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 12 Apr 2020 03:41:30 +0100 Subject: gentoo Easter resync : 12.04.2020 --- sys-cluster/hpx/hpx-9999.ebuild | 71 +++++++++++++++++++++++++++++------------ 1 file changed, 51 insertions(+), 20 deletions(-) (limited to 'sys-cluster/hpx/hpx-9999.ebuild') diff --git a/sys-cluster/hpx/hpx-9999.ebuild b/sys-cluster/hpx/hpx-9999.ebuild index d075974e0bd9..25019566f392 100644 --- a/sys-cluster/hpx/hpx-9999.ebuild +++ b/sys-cluster/hpx/hpx-9999.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( python3_6 ) +PYTHON_COMPAT=( python3_{6..8} ) if [[ ${PV} == 9999 ]] ; then inherit git-r3 @@ -11,45 +11,74 @@ if [[ ${PV} == 9999 ]] ; then else SRC_URI="https://stellar.cct.lsu.edu/files/${PN}_${PV}.tar.gz" KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" - S="${WORKDIR}/${PN}_${PV}" fi -inherit cmake fortran-2 python-any-r1 +inherit cmake fortran-2 python-single-r1 check-reqs DESCRIPTION="C++ runtime system for parallel and distributed applications" HOMEPAGE="https://stellar.cct.lsu.edu/tag/hpx/" SLOT="0" LICENSE="Boost-1.0" -IUSE="doc examples jemalloc papi +perftools tbb test" +IUSE="doc examples jemalloc mpi papi +perftools tbb test" RESTRICT="!test? ( test )" -REQUIRED_USE="?? ( jemalloc perftools tbb )" +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + ?? ( jemalloc perftools tbb ) +" BDEPEND=" virtual/pkgconfig - doc? ( >=dev-libs/boost-1.56.0-r1[tools] ) + doc? ( + ${PYTHON_DEPS} + app-doc/doxygen + $(python_gen_cond_dep ' + dev-python/sphinx[${PYTHON_MULTI_USEDEP}] + dev-python/sphinx_rtd_theme[${PYTHON_MULTI_USEDEP}] + >=dev-python/breathe-4.14[${PYTHON_MULTI_USEDEP}] + ') + ) + test? ( ${PYTHON_DEPS} ) " RDEPEND=" - >=dev-libs/boost-1.49:= - >=sys-apps/hwloc-1.8 - >=sys-libs/libunwind-1 + ${PYTHON_DEPS} + dev-libs/boost:= + sys-apps/hwloc sys-libs/zlib + mpi? ( virtual/mpi ) papi? ( dev-libs/papi ) - perftools? ( >=dev-util/google-perftools-1.7.1 ) + perftools? ( dev-util/google-perftools ) tbb? ( dev-cpp/tbb ) " -DEPEND="${RDEPEND} - test? ( ${PYTHON_DEPS} ) -" +DEPEND="${RDEPEND}" + +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=`echo ${MAKEOPTS} | cut -d j -f 2` + echo "${jobs}G" + fi +} + +pkg_pretend() { + local CHECKREQS_MEMORY=$(hpx_memory_requirement) + check-reqs_pkg_setup +} pkg_setup() { - use test && python-any-r1_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=$(usex doc) + -DHPX_WITH_PARCELPORT_MPI=$(usex mpi) -DHPX_WITH_PAPI=$(usex papi) -DHPX_WITH_GOOGLE_PERFTOOLS=$(usex perftools) -DBUILD_TESTING=$(usex test) @@ -67,16 +96,18 @@ src_configure() { cmake_src_configure } +src_compile() { + cmake_src_compile + use test && cmake_build tests +} + src_test() { # avoid over-suscribing - cmake_build -j1 tests + cmake_src_test -j1 } src_install() { cmake_src_install - if use examples; then - mv "${D}/usr/bin/spin" "${D}/usr/bin/hpx_spin" || die - insinto /usr/share/doc/${PF} - doins -r examples - fi + use examples && dodoc -r examples/ + python_fix_shebang "${ED}" } -- cgit v1.2.3