ecm.eclass: Ban variables from kde5*eclass for stricter porting
authorAndreas Sturmlechner <asturm@gentoo.org>
Sat, 21 Dec 2019 11:26:43 +0000 (12:26 +0100)
committerAndreas Sturmlechner <asturm@gentoo.org>
Tue, 24 Dec 2019 20:43:34 +0000 (21:43 +0100)
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
eclass/ecm.eclass

index 1616df9aab57086da012e740e5e3f016ce7b32d1..40b4450c2d91756278927da1bbabc9b963f76c72 100644 (file)
@@ -310,6 +310,24 @@ DEPEND+=" ${COMMONDEPEND}"
 RDEPEND+=" ${COMMONDEPEND}"
 unset COMMONDEPEND
 
+# @FUNCTION: _ecm_banned_var
+# @INTERNAL
+# @DESCRIPTION:
+# Banned kde5*.eclass variables are banned.
+_ecm_banned_var() {
+       die "$1 is banned. use $2 instead."
+}
+
+if [[ -z ${_KDE5_ECLASS} ]] ; then
+       [[ -n ${KDE_DEBUG} ]] && _ecm_banned_var KDE_DEBUG ECM_DEBUG
+       [[ -n ${KDE_EXAMPLES} ]] && _ecm_banned_var KDE_EXAMPLES ECM_EXAMPLES
+       [[ -n ${KDE_HANDBOOK} ]] && _ecm_banned_var KDE_HANDBOOK ECM_HANDBOOK
+       [[ -n ${KDE_DOC_DIR} ]] && _ecm_banned_var KDE_DOC_DIR ECM_HANDBOOK_DIR
+       [[ -n ${KDE_PO_DIRS} ]] && _ecm_banned_var KDE_PO_DIRS ECM_PO_DIRS
+       [[ -n ${KDE_QTHELP} ]] && _ecm_banned_var KDE_QTHELP ECM_QTHELP
+       [[ -n ${KDE_TEST} ]] && _ecm_banned_var KDE_TEST ECM_TEST
+fi
+
 # @ECLASS-VARIABLE: KDE_GCC_MINIMAL
 # @DEFAULT_UNSET
 # @DESCRIPTION: