public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH scons-utils] Support setting common SCons arguments using myesconsargs.
@ 2011-10-23 18:20 Michał Górny
  2011-10-24  3:42 ` Nathan Phillip Brink
  0 siblings, 1 reply; 5+ messages in thread
From: Michał Górny @ 2011-10-23 18:20 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

---
 scons-utils.eclass |   33 +++++++++++++++++++++++++--------
 1 files changed, 25 insertions(+), 8 deletions(-)

diff --git a/scons-utils.eclass b/scons-utils.eclass
index a87b6e6..16fda7a 100644
--- a/scons-utils.eclass
+++ b/scons-utils.eclass
@@ -14,11 +14,21 @@
 # @CODE
 # inherit scons-utils toolchain-funcs
 #
+# EAPI=4
+#
+# src_configure() {
+# 	myesconsargs=(
+# 		CC="$(tc-getCC)"
+#		$(use_scons nls ENABLE_NLS)
+# 	)
+# }
+#
 # src_compile() {
-# 	tc-export CC CXX
-# 	escons \
-# 		$(use_scons nls ENABLE_NLS) \
-# 		|| die
+# 	escons
+# }
+#
+# src_install() {
+# 	escons install
 # }
 # @CODE
 
@@ -29,6 +39,12 @@
 # @DESCRIPTION:
 # The minimal version of SCons required for the build to work.
 
+# @ECLASS-VARIABLE: myesconsargs
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# List of package-specific options to pass to all SCons calls. Supposed to be
+# set in src_configure().
+
 # @ECLASS-VARIABLE: SCONSOPTS
 # @DEFAULT_UNSET
 # @DESCRIPTION:
@@ -73,16 +89,17 @@ fi
 # @FUNCTION: escons
 # @USAGE: [scons-arg] ...
 # @DESCRIPTION:
-# Call scons, passing the supplied arguments, ${MAKEOPTS} and
-# ${EXTRA_ESCONS}. Similar to emake. Like emake, this function does die
-# on failure in EAPI 4 (unless called nonfatal).
+# Call scons, passing the supplied arguments, ${myesconsargs[@]},
+# filtered ${MAKEOPTS}, ${EXTRA_ESCONS}. Similar to emake. Like emake,
+# this function does die on failure in EAPI 4 (unless called nonfatal).
 escons() {
 	local ret
 
 	debug-print-function ${FUNCNAME} "${@}"
 
 	# if SCONSOPTS are _unset_, use cleaned MAKEOPTS
-	set -- scons ${SCONSOPTS-$(scons_clean_makeopts)} ${EXTRA_ESCONS} "${@}"
+	set -- scons ${SCONSOPTS-$(scons_clean_makeopts)} ${EXTRA_ESCONS} \
+		"${myesconsargs[@]}" "${@}"
 	echo "${@}" >&2
 	"${@}"
 	ret=${?}
-- 
1.7.7.325.g05f6ed.dirty




^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-10-25 16:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-23 18:20 [gentoo-dev] [PATCH scons-utils] Support setting common SCons arguments using myesconsargs Michał Górny
2011-10-24  3:42 ` Nathan Phillip Brink
2011-10-24  7:46   ` Michał Górny
2011-10-25  5:57     ` Mike Frysinger
2011-10-25 16:37       ` Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox