*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / sys-cluster / charliecloud / charliecloud-0.9.10.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python3_{6,7} )
7
8 inherit python-single-r1
9
10 if [[ ${PV} == "9999" ]] ; then
11         inherit git-r3
12         EGIT_REPO_URI="https://github.com/hpc/${PN}.git"
13         S="${WORKDIR}/${P}"
14 else
15         SRC_URI="https://github.com/hpc/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
16         KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
17 fi
18
19 DESCRIPTION="Lightweight user-defined software stacks for high-performance computing"
20 HOMEPAGE="https://hpc.github.io/charliecloud/"
21
22 SLOT="0"
23 LICENSE="Apache-2.0"
24 IUSE="doc examples +pv"
25
26 # Extensive test suite exists, but downloads container images
27 # directly and via Docker and installs packages inside using apt/yum.
28 # Additionally, clashes with portage namespacing and sandbox.
29 RESTRICT="test"
30
31 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
32
33 RDEPEND="${PYTHON_DEPS}
34         pv? ( sys-apps/pv )
35 "
36 DEPEND="doc? (
37                 dev-python/sphinx[${PYTHON_USEDEP}]
38                 dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
39                 net-misc/rsync
40         )"
41
42 PATCHES=(
43         "${FILESDIR}"/"${PN}-${PV}"-fix-flags.patch
44         "${FILESDIR}"/"${PN}-${PV}"-fix-hardcoded-gcc.patch
45 )
46
47 src_compile() {
48         emake
49         use doc && emake -C doc-src
50 }
51
52 src_install() {
53         emake install PREFIX="${EPREFIX}/usr" DESTDIR="${D}" LIBEXEC_DIR="libexec/${PF}"
54         if use doc; then
55                 local HTML_DOCS=(doc/.)
56         fi
57         if use examples; then
58                 docompress -x "/usr/share/doc/${PF}/examples"
59                 dodoc -r examples
60         fi
61         rm -rf "${ED}/usr/share/doc/charliecloud" || die
62         einstalldocs
63 }