summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-01-01 13:38:11 +0100
committerMichał Górny <mgorny@gentoo.org>2016-01-08 06:14:36 +0100
commit5950a7618a2e5c801250ef648e7070bd7a3c13e7 (patch)
tree2903aca20520fdd31ca9cf80386e8c207989726c /eclass/scons-utils.eclass
parentscons-utils.eclass: Deprecate myesconsargs, and kill it in EAPI 6 (diff)
downloadgentoo-5950a7618a2e5c801250ef648e7070bd7a3c13e7.tar.gz
gentoo-5950a7618a2e5c801250ef648e7070bd7a3c13e7.tar.bz2
gentoo-5950a7618a2e5c801250ef648e7070bd7a3c13e7.zip
scons-utils.eclass: Deprecate use_scons, ban it in EAPI 6
Diffstat (limited to 'eclass/scons-utils.eclass')
-rw-r--r--eclass/scons-utils.eclass9
1 files changed, 9 insertions, 0 deletions
diff --git a/eclass/scons-utils.eclass b/eclass/scons-utils.eclass
index fdc6af3db63a..b8051b04bf81 100644
--- a/eclass/scons-utils.eclass
+++ b/eclass/scons-utils.eclass
@@ -79,11 +79,15 @@
# @ECLASS-VARIABLE: USE_SCONS_TRUE
# @DESCRIPTION:
+# DEPRECATED: use usex instead
+#
# The default value for truth in scons-use() (1 by default).
: ${USE_SCONS_TRUE:=1}
# @ECLASS-VARIABLE: USE_SCONS_FALSE
# @DESCRIPTION:
+# DEPRECATED: use usex instead
+#
# The default value for false in scons-use() (0 by default).
: ${USE_SCONS_FALSE:=0}
@@ -236,6 +240,8 @@ scons_clean_makeopts() {
# @FUNCTION: use_scons
# @USAGE: <use-flag> [var-name] [var-opt-true] [var-opt-false]
# @DESCRIPTION:
+# DEPRECATED, EAPI 0..5 ONLY: use usex instead
+#
# Output a SCons parameter with value depending on the USE flag state.
# If the USE flag is set, output <var-name>=<var-opt-true>; otherwise
# <var-name>=<var-opt-false>.
@@ -247,6 +253,9 @@ scons_clean_makeopts() {
# If <var-opt-true> and/or <var-opt-false> are omitted,
# ${USE_SCONS_TRUE} and/or ${USE_SCONS_FALSE} will be used instead.
use_scons() {
+ [[ ${EAPI} == [012345] ]] \
+ || die "${FUNCNAME} is banned in EAPI ${EAPI}, use usex instead"
+
local flag=${1}
local varname=${2:-${flag/\!/no}}
local vartrue=${3:-${USE_SCONS_TRUE}}