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 | 73bb084e1ebe7f71c72b2b5090d4636f53d63db5 (patch) | |
tree | b8d70d95d5ae8b7e98048d07db4bf92f3dc8f14c /eclass | |
parent | Version bump, update license, drop old. (diff) | |
download | gentoo-2-73bb084e1ebe7f71c72b2b5090d4636f53d63db5.tar.gz gentoo-2-73bb084e1ebe7f71c72b2b5090d4636f53d63db5.tar.bz2 gentoo-2-73bb084e1ebe7f71c72b2b5090d4636f53d63db5.zip |
Introduce NO_WAF_LIBDIR to allow building packages that fails when libdir is set.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 6 | ||||
-rw-r--r-- | eclass/waf-utils.eclass | 32 |
2 files changed, 30 insertions, 8 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 9747904e139f..f3a2230fd85e 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for eclass directory # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.545 2012/12/06 08:19:42 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.546 2012/12/06 09:28:11 scarabeus Exp $ + + 06 Dec 2012; Tomáš Chvátal <scarabeus@gentoo.org> waf-utils.eclass: + Introduce NO_WAF_LIBDIR to allow building packages that fails when libdir is + set. 06 Dec 2012; Tomáš Chvátal <scarabeus@gentoo.org> waf-utils.eclass: Sort this eapi case stuff. 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 |