From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH scons-utils] Support setting common SCons arguments using myesconsargs.
Date: Sun, 23 Oct 2011 20:20:37 +0200 [thread overview]
Message-ID: <1319394037-4619-1-git-send-email-mgorny@gentoo.org> (raw)
---
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
next reply other threads:[~2011-10-23 18:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-23 18:20 Michał Górny [this message]
2011-10-24 3:42 ` [gentoo-dev] [PATCH scons-utils] Support setting common SCons arguments using myesconsargs 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
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=1319394037-4619-1-git-send-email-mgorny@gentoo.org \
--to=mgorny@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