Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sun, 28 Feb 2016 18:30:14
Message-Id: 1456684196.dc35e691fe2467033044dfdaf13dc8a855b4dd41.mgorny@gentoo
1 commit: dc35e691fe2467033044dfdaf13dc8a855b4dd41
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 28 18:29:21 2016 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 28 18:29:56 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc35e691
7
8 waf-utils.eclass: Simplify --libdir passing logic using arrays
9
10 eclass/waf-utils.eclass | 27 +++++++++------------------
11 1 file changed, 9 insertions(+), 18 deletions(-)
12
13 diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass
14 index 7372e8d..df5de24 100644
15 --- a/eclass/waf-utils.eclass
16 +++ b/eclass/waf-utils.eclass
17 @@ -69,7 +69,7 @@ waf-utils_src_configure() {
18
19 [[ ${fail} ]] && die "Invalid use of waf-utils.eclass"
20
21 - local libdir=""
22 + local libdir=()
23
24 # @ECLASS-VARIABLE: WAF_BINARY
25 # @DESCRIPTION:
26 @@ -81,25 +81,16 @@ waf-utils_src_configure() {
27 # @DESCRIPTION:
28 # Variable specifying that you don't want to set the libdir for waf script.
29 # Some scripts does not allow setting it at all and die if they find it.
30 - [[ -z ${NO_WAF_LIBDIR} ]] && libdir="--libdir=${EPREFIX}/usr/$(get_libdir)"
31 + [[ -z ${NO_WAF_LIBDIR} ]] && libdir=(--libdir="${EPREFIX}/usr/$(get_libdir)")
32
33 tc-export AR CC CPP CXX RANLIB
34 - echo "CCFLAGS=\"${CFLAGS}\" LINKFLAGS=\"${CFLAGS} ${LDFLAGS}\" \"${WAF_BINARY}\" --prefix=${EPREFIX}/usr ${libdir} $@ configure"
35 -
36 - # This condition is required because waf takes even whitespace as function
37 - # calls, awesome isn't it?
38 - if [[ -z ${NO_WAF_LIBDIR} ]]; then
39 - CCFLAGS="${CFLAGS}" LINKFLAGS="${CFLAGS} ${LDFLAGS}" "${WAF_BINARY}" \
40 - "--prefix=${EPREFIX}/usr" \
41 - "${libdir}" \
42 - "$@" \
43 - configure || die "configure failed"
44 - else
45 - CCFLAGS="${CFLAGS}" LINKFLAGS="${CFLAGS} ${LDFLAGS}" "${WAF_BINARY}" \
46 - "--prefix=${EPREFIX}/usr" \
47 - "$@" \
48 - configure || die "configure failed"
49 - fi
50 + echo "CCFLAGS=\"${CFLAGS}\" LINKFLAGS=\"${CFLAGS} ${LDFLAGS}\" \"${WAF_BINARY}\" --prefix=${EPREFIX}/usr ${libdir[@]} $@ configure"
51 +
52 + CCFLAGS="${CFLAGS}" LINKFLAGS="${CFLAGS} ${LDFLAGS}" "${WAF_BINARY}" \
53 + "--prefix=${EPREFIX}/usr" \
54 + "${libdir[@]}" \
55 + "$@" \
56 + configure || die "configure failed"
57 }
58
59 # @FUNCTION: waf-utils_src_compile