diff options
author | Chris Mayo <aklhfex@gmail.com> | 2020-03-24 19:49:57 +0000 |
---|---|---|
committer | Mikle Kolyada <zlogene@gentoo.org> | 2020-04-01 13:34:11 +0300 |
commit | 00d57471c9761e1e782342129b47bd883fc86abe (patch) | |
tree | d68a0a95e8ec35d866c85790b99631bfcc87d49e /eclass/waf-utils.eclass | |
parent | waf-utils.eclass: Support --docdir and --htmldir (diff) | |
download | gentoo-00d57471c9761e1e782342129b47bd883fc86abe.tar.gz gentoo-00d57471c9761e1e782342129b47bd883fc86abe.tar.bz2 gentoo-00d57471c9761e1e782342129b47bd883fc86abe.zip |
waf-utils.eclass: Replace NO_WAF_LIBDIR with an automatic check
Test `waf --help` for --libdir support instead.
Signed-off-by: Chris Mayo <aklhfex@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/15093
Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
Diffstat (limited to 'eclass/waf-utils.eclass')
-rw-r--r-- | eclass/waf-utils.eclass | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass index a944195b1627..7a894f6bbb73 100644 --- a/eclass/waf-utils.eclass +++ b/eclass/waf-utils.eclass @@ -69,19 +69,12 @@ waf-utils_src_configure() { [[ ${fail} ]] && die "Invalid use of waf-utils.eclass" - local conf_args=() - # @ECLASS-VARIABLE: WAF_BINARY # @DESCRIPTION: # Eclass can use different waf executable. Usually it is located in "${S}/waf". : ${WAF_BINARY:="${S}/waf"} - # @ECLASS-VARIABLE: NO_WAF_LIBDIR - # @DEFAULT_UNSET - # @DESCRIPTION: - # Variable specifying that you don't want to set the libdir for waf script. - # Some scripts does not allow setting it at all and die if they find it. - [[ -z ${NO_WAF_LIBDIR} ]] && conf_args+=(--libdir="${EPREFIX}/usr/$(get_libdir)") + local conf_args=() local waf_help=$("${WAF_BINARY}" --help 2>/dev/null) if [[ ${waf_help} == *--docdir* ]]; then @@ -90,6 +83,9 @@ waf-utils_src_configure() { if [[ ${waf_help} == *--htmldir* ]]; then conf_args+=( --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html ) fi + if [[ ${waf_help} == *--libdir* ]]; then + conf_args+=( --libdir="${EPREFIX}/usr/$(get_libdir)" ) + fi tc-export AR CC CPP CXX RANLIB |