From: "Tomas Chvatal (scarabeus)" <scarabeus@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in eclass: waf-utils.eclass
Date: Thu, 13 Jan 2011 18:43:58 +0000 (UTC) [thread overview]
Message-ID: <20110113184358.B93D320054@flycatcher.gentoo.org> (raw)
scarabeus 11/01/13 18:43:58
Modified: waf-utils.eclass
Log:
Merge in changes to be similar to cmake-utils.eclass so this eclass can be used for talloc.
Revision Changes Path
1.2 eclass/waf-utils.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/waf-utils.eclass?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/waf-utils.eclass?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/waf-utils.eclass?r1=1.1&r2=1.2
Index: waf-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/waf-utils.eclass,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- waf-utils.eclass 7 Dec 2010 06:48:08 -0000 1.1
+++ waf-utils.eclass 13 Jan 2011 18:43:58 -0000 1.2
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/waf-utils.eclass,v 1.1 2010/12/07 06:48:08 eva Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/waf-utils.eclass,v 1.2 2011/01/13 18:43:58 scarabeus Exp $
# @ECLASS: waf-utils.eclass
# @MAINTAINER:
@@ -8,6 +8,7 @@
#
# @CODE
# Original Author: Gilles Dartiguelongue <eva@gentoo.org>
+# Various improvements based on cmake-utils.eclass: Tomáš Chvátal <scarabeus@gentoo.org>
# @CODE
# @BLURB: common ebuild functions for waf-based packages
# @DESCRIPTION:
@@ -18,19 +19,22 @@
inherit base eutils multilib python
case ${EAPI:-0} in
- 3|2) EXPORT_FUNCTIONS pkg_setup src_configure src_compile src_install ;;
+ 4|3|2) EXPORT_FUNCTIONS pkg_setup src_configure src_compile src_install ;;
*) die "EAPI=${EAPI} is not supported" ;;
esac
-# @ECLASS-VARIABLE: DOCS
-# @DESCRIPTION:
-# Documents passed to dodoc command.
-
# @FUNCTION: waf-utils_src_configure
# @DESCRIPTION:
# General function for configuring with waf.
waf-utils_pkg_setup() {
+ debug-print-function ${FUNCNAME} "$@"
+
python_set_active_version 2
+
+ # @ECLASS-VARIABLE: WAF_BINARY
+ # @DESCRIPTION:
+ # Eclass can use different waf executable. Usually it is located in "${S}/waf".
+ : ${WAF_BINARY:="${S}/waf"}
}
# @FUNCTION: waf-utils_src_configure
@@ -39,7 +43,9 @@
waf-utils_src_configure() {
debug-print-function ${FUNCNAME} "$@"
- CCFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" "${S}"/waf \
+ echo "CCFLAGS=\"${CFLAGS}\" LINKFLAGS=\"${LDFLAGS}\" \"${WAF_BINARY}\" --prefix=/usr --libdir=/usr/$(get_libdir) $@ configure"
+
+ CCFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" "${WAF_BINARY}" \
--prefix=/usr \
--libdir=/usr/$(get_libdir) \
$@ \
@@ -53,7 +59,8 @@
debug-print-function ${FUNCNAME} "$@"
local jobs=$(echo -j1 ${MAKEOPTS} | sed -r "s/.*(-j\s*|--jobs=)([0-9]+).*/--jobs=\2/" )
- "${S}"/waf build ${jobs} || die "build failed"
+ echo "\"${WAF_BINARY}\" build ${jobs}"
+ "${WAF_BINARY}" ${jobs} || die "build failed"
}
# @FUNCTION: waf-utils_src_install
@@ -61,11 +68,11 @@
# Function for installing the package.
waf-utils_src_install() {
debug-print-function ${FUNCNAME} "$@"
- has ${EAPI:-0} 2 && ! use prefix && ED="${D}"
- "${S}"/waf --destdir="${ED}" install || die "Make install failed"
+ has ${EAPI:-0} 2 && ! use prefix && ED="${D}"
+ echo "\"${WAF_BINARY}\" --destdir=\"${ED}\" install"
+ "${WAF_BINARY}" --destdir="${ED}" install || die "Make install failed"
# Manual document installation
- [[ -n "${DOCS}" ]] && { dodoc ${DOCS} || die "dodoc failed" ; }
+ base_src_install_docs
}
-
next reply other threads:[~2011-01-13 18:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-13 18:43 Tomas Chvatal (scarabeus) [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-07-20 1:37 [gentoo-commits] gentoo-x86 commit in eclass: waf-utils.eclass Mike Frysinger (vapier)
2012-07-17 4:43 Mike Frysinger (vapier)
2011-08-09 18:53 Jeroen Roovers (jer)
2011-03-01 23:02 Jonathan Callen (abcd)
2011-01-24 14:04 Tomas Chvatal (scarabeus)
2011-01-16 8:36 Tomas Chvatal (scarabeus)
2010-12-07 6:48 Gilles Dartiguelongue (eva)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110113184358.B93D320054@flycatcher.gentoo.org \
--to=scarabeus@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox