1 | # Copyright 1999-2010 Gentoo Foundation |
1 | # Copyright 1999-2010 Gentoo Foundation |
2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/waf-utils.eclass,v 1.5 2011/03/01 23:02:08 abcd Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/waf-utils.eclass,v 1.6 2011/08/09 18:53:06 jer Exp $ |
4 | |
4 | |
5 | # @ECLASS: waf-utils.eclass |
5 | # @ECLASS: waf-utils.eclass |
6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
7 | # gnome@gentoo.org |
7 | # gnome@gentoo.org |
8 | # |
8 | # |
… | |
… | |
15 | # @DESCRIPTION: |
15 | # @DESCRIPTION: |
16 | # The waf-utils eclass contains functions that make creating ebuild for |
16 | # The waf-utils eclass contains functions that make creating ebuild for |
17 | # waf-based packages much easier. |
17 | # waf-based packages much easier. |
18 | # Its main features are support of common portage default settings. |
18 | # Its main features are support of common portage default settings. |
19 | |
19 | |
20 | inherit base eutils multilib |
20 | inherit base eutils multilib toolchain-funcs |
21 | |
21 | |
22 | case ${EAPI:-0} in |
22 | case ${EAPI:-0} in |
23 | 4|3) EXPORT_FUNCTIONS src_configure src_compile src_install ;; |
23 | 4|3) EXPORT_FUNCTIONS src_configure src_compile src_install ;; |
24 | *) die "EAPI=${EAPI} is not supported" ;; |
24 | *) die "EAPI=${EAPI} is not supported" ;; |
25 | esac |
25 | esac |
… | |
… | |
33 | # @ECLASS-VARIABLE: WAF_BINARY |
33 | # @ECLASS-VARIABLE: WAF_BINARY |
34 | # @DESCRIPTION: |
34 | # @DESCRIPTION: |
35 | # Eclass can use different waf executable. Usually it is located in "${S}/waf". |
35 | # Eclass can use different waf executable. Usually it is located in "${S}/waf". |
36 | : ${WAF_BINARY:="${S}/waf"} |
36 | : ${WAF_BINARY:="${S}/waf"} |
37 | |
37 | |
|
|
38 | tc-export AR CC CPP CXX RANLIB |
38 | echo "CCFLAGS=\"${CFLAGS}\" LINKFLAGS=\"${LDFLAGS}\" \"${WAF_BINARY}\" --prefix=${EPREFIX}/usr --libdir=${EPREFIX}/usr/$(get_libdir) $@ configure" |
39 | echo "CCFLAGS=\"${CFLAGS}\" LINKFLAGS=\"${LDFLAGS}\" \"${WAF_BINARY}\" --prefix=${EPREFIX}/usr --libdir=${EPREFIX}/usr/$(get_libdir) $@ configure" |
39 | |
40 | |
40 | CCFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" "${WAF_BINARY}" \ |
41 | CCFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" "${WAF_BINARY}" \ |
41 | "--prefix=${EPREFIX}/usr" \ |
42 | "--prefix=${EPREFIX}/usr" \ |
42 | "--libdir=${EPREFIX}/usr/$(get_libdir)" \ |
43 | "--libdir=${EPREFIX}/usr/$(get_libdir)" \ |