diff options
author | Tomas Chvatal <scarabeus@gentoo.org> | 2012-12-06 09:28:11 +0000 |
---|---|---|
committer | Tomas Chvatal <scarabeus@gentoo.org> | 2012-12-06 09:28:11 +0000 |
commit | fbe713e2c89404009aad0b04e4cdf4d0c92d1bed (patch) | |
tree | 63f417d7cd188b2f686c4661f1315b47d84adb0e /eclass/waf-utils.eclass | |
parent | Version bump, update license, drop old. (diff) | |
download | historical-fbe713e2c89404009aad0b04e4cdf4d0c92d1bed.tar.gz historical-fbe713e2c89404009aad0b04e4cdf4d0c92d1bed.tar.bz2 historical-fbe713e2c89404009aad0b04e4cdf4d0c92d1bed.zip |
Introduce NO_WAF_LIBDIR to allow building packages that fails when libdir is set.
Diffstat (limited to 'eclass/waf-utils.eclass')
-rw-r--r-- | eclass/waf-utils.eclass | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass index e06d78893662..bdf7614a6fca 100644 --- a/eclass/waf-utils.eclass +++ b/eclass/waf-utils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/waf-utils.eclass,v 1.16 2012/12/06 08:19:42 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/waf-utils.eclass,v 1.17 2012/12/06 09:28:11 scarabeus Exp $ # @ECLASS: waf-utils.eclass # @MAINTAINER: @@ -41,19 +41,37 @@ DEPEND="${DEPEND} waf-utils_src_configure() { debug-print-function ${FUNCNAME} "$@" + local libdir="" + # @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} ]] && libdir="--libdir=${EPREFIX}/usr/$(get_libdir)" + tc-export AR CC CPP CXX RANLIB - echo "CCFLAGS=\"${CFLAGS}\" LINKFLAGS=\"${LDFLAGS}\" \"${WAF_BINARY}\" --prefix=${EPREFIX}/usr --libdir=${EPREFIX}/usr/$(get_libdir) $@ configure" + echo "CCFLAGS=\"${CFLAGS}\" LINKFLAGS=\"${LDFLAGS}\" \"${WAF_BINARY}\" --prefix=${EPREFIX}/usr ${libdir} $@ configure" - CCFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" "${WAF_BINARY}" \ - "--prefix=${EPREFIX}/usr" \ - "--libdir=${EPREFIX}/usr/$(get_libdir)" \ - "$@" \ - configure || die "configure failed" + # This condition is required because waf takes even whitespace as function + # calls, awesome isn't it? + if [[ -z ${NO_WAF_LIBDIR} ]]; then + CCFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" "${WAF_BINARY}" \ + "--prefix=${EPREFIX}/usr" \ + "${libdir}" \ + "$@" \ + configure || die "configure failed" + else + CCFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" "${WAF_BINARY}" \ + "--prefix=${EPREFIX}/usr" \ + "$@" \ + configure || die "configure failed" + fi } # @FUNCTION: waf-utils_src_compile |