blob: e7d0a83bca8189c578541242cc978eee95e2d097 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7,8,9} )
PYTHON_REQ_USE="threads(+)"
inherit python-single-r1
DESCRIPTION="Piece of software used to help building software projects"
HOMEPAGE="https://waf.io/"
SRC_URI="https://waf.io/${P}.tar.bz2"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc examples"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
BDEPEND="doc? ( $(python_gen_cond_dep \
'dev-python/sphinx[${PYTHON_USEDEP}]' )
)"
DEPEND="${PYTHON_DEPS}"
RDEPEND="${PYTHON_DEPS}"
src_prepare() {
rm waf || die
default
}
src_configure() {
${EPYTHON} ./waf-light configure || die "waf configure failed"
}
src_compile() {
${EPYTHON} ./waf-light build || die "waf build failed"
use doc && build_sphinx docs/sphinx
}
src_install() {
default
# Set INSTALL to EPREFIX
# Set REVISION to PR
# set dirname to empty because python_get_sitedir
# installs directly to a dir with the correct name
# Set location of waflib to location of Gentoo
# Python sitedir
sed -e "/INSTALL=/s:=.*:='${EPREFIX}':" \
-e "/REVISION=/s:=.*:='${PR}':" \
-e "/dirname =/s:=.*:= '':" \
-e "s:/lib/:$(python_get_sitedir)/:" \
-e "/^#\(==>\|BZ\|<==\)/d" \
-i waf || die
python_doscript waf
python_domodule waflib
if use examples ; then
dodoc -r demos
fi
}
|