From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RI2fe-00012b-9B for garchives@archives.gentoo.org; Sun, 23 Oct 2011 18:21:18 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C189D21C027; Sun, 23 Oct 2011 18:21:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 69E5AE00E8 for ; Sun, 23 Oct 2011 18:20:42 +0000 (UTC) Received: from localhost.localdomain (77-253-197-42.adsl.inetia.pl [77.253.197.42]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id F3BA31B4005; Sun, 23 Oct 2011 18:20:40 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH scons-utils] Support setting common SCons arguments using myesconsargs. Date: Sun, 23 Oct 2011 20:20:37 +0200 Message-Id: <1319394037-4619-1-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 1.7.7.325.g05f6ed.dirty Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: X-Archives-Hash: 142428b233fb7a8390b616920137b6bf --- 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