1 |
mgorny 11/10/30 14:30:24 |
2 |
|
3 |
Modified: scons-utils.eclass |
4 |
Log: |
5 |
Support setting common SCons arguments using myesconsargs. |
6 |
|
7 |
Revision Changes Path |
8 |
1.8 eclass/scons-utils.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/scons-utils.eclass?rev=1.8&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/scons-utils.eclass?rev=1.8&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/scons-utils.eclass?r1=1.7&r2=1.8 |
13 |
|
14 |
Index: scons-utils.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/scons-utils.eclass,v |
17 |
retrieving revision 1.7 |
18 |
retrieving revision 1.8 |
19 |
diff -u -r1.7 -r1.8 |
20 |
--- scons-utils.eclass 30 Oct 2011 14:29:54 -0000 1.7 |
21 |
+++ scons-utils.eclass 30 Oct 2011 14:30:24 -0000 1.8 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2010 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/scons-utils.eclass,v 1.7 2011/10/30 14:29:54 mgorny Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/scons-utils.eclass,v 1.8 2011/10/30 14:30:24 mgorny Exp $ |
27 |
|
28 |
# @ECLASS: scons-utils.eclass |
29 |
# @MAINTAINER: |
30 |
@@ -14,11 +14,21 @@ |
31 |
# @CODE |
32 |
# inherit scons-utils toolchain-funcs |
33 |
# |
34 |
+# EAPI=4 |
35 |
+# |
36 |
+# src_configure() { |
37 |
+# myesconsargs=( |
38 |
+# CC="$(tc-getCC)" |
39 |
+# $(use_scons nls ENABLE_NLS) |
40 |
+# ) |
41 |
+# } |
42 |
+# |
43 |
# src_compile() { |
44 |
-# tc-export CC CXX |
45 |
-# escons \ |
46 |
-# $(use_scons nls ENABLE_NLS) \ |
47 |
-# || die |
48 |
+# escons |
49 |
+# } |
50 |
+# |
51 |
+# src_install() { |
52 |
+# escons install |
53 |
# } |
54 |
# @CODE |
55 |
|
56 |
@@ -29,6 +39,12 @@ |
57 |
# @DESCRIPTION: |
58 |
# The minimal version of SCons required for the build to work. |
59 |
|
60 |
+# @VARIABLE: myesconsargs |
61 |
+# @DEFAULT_UNSET |
62 |
+# @DESCRIPTION: |
63 |
+# List of package-specific options to pass to all SCons calls. Supposed to be |
64 |
+# set in src_configure(). |
65 |
+ |
66 |
# @ECLASS-VARIABLE: SCONSOPTS |
67 |
# @DEFAULT_UNSET |
68 |
# @DESCRIPTION: |
69 |
@@ -73,16 +89,17 @@ |
70 |
# @FUNCTION: escons |
71 |
# @USAGE: [scons-arg] ... |
72 |
# @DESCRIPTION: |
73 |
-# Call scons, passing the supplied arguments, ${MAKEOPTS} and |
74 |
-# ${EXTRA_ESCONS}. Similar to emake. Like emake, this function does die |
75 |
-# on failure in EAPI 4 (unless called nonfatal). |
76 |
+# Call scons, passing the supplied arguments, ${myesconsargs[@]}, |
77 |
+# filtered ${MAKEOPTS}, ${EXTRA_ESCONS}. Similar to emake. Like emake, |
78 |
+# this function does die on failure in EAPI 4 (unless called nonfatal). |
79 |
escons() { |
80 |
local ret |
81 |
|
82 |
debug-print-function ${FUNCNAME} "${@}" |
83 |
|
84 |
# if SCONSOPTS are _unset_, use cleaned MAKEOPTS |
85 |
- set -- scons ${SCONSOPTS-$(scons_clean_makeopts)} ${EXTRA_ESCONS} "${@}" |
86 |
+ set -- scons ${SCONSOPTS-$(scons_clean_makeopts)} ${EXTRA_ESCONS} \ |
87 |
+ "${myesconsargs[@]}" "${@}" |
88 |
echo "${@}" >&2 |
89 |
"${@}" |
90 |
ret=${?} |