1 |
waf can optionally set the standard GNU directories [1]. |
2 |
Based on the code for econf in Portage's phase-helpers.sh. |
3 |
|
4 |
[1] https://waf.io/apidocs/tools/gnu_dirs.html |
5 |
|
6 |
Closes: https://bugs.gentoo.org/711612 |
7 |
Signed-off-by: Chris Mayo <aklhfex@×××××.com> |
8 |
--- |
9 |
|
10 |
Fixes QA problem with media-video/mpv-0.32.0-r1 reported in the linked bug. |
11 |
|
12 |
|
13 |
eclass/waf-utils.eclass | 14 +++++++++++--- |
14 |
1 file changed, 11 insertions(+), 3 deletions(-) |
15 |
|
16 |
diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass |
17 |
index 2cb26bc8dfd..a944195b162 100644 |
18 |
--- a/eclass/waf-utils.eclass |
19 |
+++ b/eclass/waf-utils.eclass |
20 |
@@ -69,7 +69,7 @@ waf-utils_src_configure() { |
21 |
|
22 |
[[ ${fail} ]] && die "Invalid use of waf-utils.eclass" |
23 |
|
24 |
- local libdir=() |
25 |
+ local conf_args=() |
26 |
|
27 |
# @ECLASS-VARIABLE: WAF_BINARY |
28 |
# @DESCRIPTION: |
29 |
@@ -81,7 +81,15 @@ waf-utils_src_configure() { |
30 |
# @DESCRIPTION: |
31 |
# Variable specifying that you don't want to set the libdir for waf script. |
32 |
# Some scripts does not allow setting it at all and die if they find it. |
33 |
- [[ -z ${NO_WAF_LIBDIR} ]] && libdir=(--libdir="${EPREFIX}/usr/$(get_libdir)") |
34 |
+ [[ -z ${NO_WAF_LIBDIR} ]] && conf_args+=(--libdir="${EPREFIX}/usr/$(get_libdir)") |
35 |
+ |
36 |
+ local waf_help=$("${WAF_BINARY}" --help 2>/dev/null) |
37 |
+ if [[ ${waf_help} == *--docdir* ]]; then |
38 |
+ conf_args+=( --docdir="${EPREFIX}"/usr/share/doc/${PF} ) |
39 |
+ fi |
40 |
+ if [[ ${waf_help} == *--htmldir* ]]; then |
41 |
+ conf_args+=( --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html ) |
42 |
+ fi |
43 |
|
44 |
tc-export AR CC CPP CXX RANLIB |
45 |
|
46 |
@@ -91,7 +99,7 @@ waf-utils_src_configure() { |
47 |
PKGCONFIG="$(tc-getPKG_CONFIG)" |
48 |
"${WAF_BINARY}" |
49 |
"--prefix=${EPREFIX}/usr" |
50 |
- "${libdir[@]}" |
51 |
+ "${conf_args[@]}" |
52 |
"${@}" |
53 |
configure |
54 |
) |
55 |
-- |
56 |
2.24.1 |