From c63d1aeb1acd26d352fd93ec0ae819c8ace794d0 Mon Sep 17 00:00:00 2001 From: Justin Lecher Date: Sat, 6 Jan 2018 13:23:20 +0000 Subject: eclass: Drop EAPI 2 & 3 support in virtaulx.eclass Signed-off-by: Justin Lecher --- eclass/virtualx.eclass | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) (limited to 'eclass/virtualx.eclass') diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass index d66149b70bae..38e629eef4fe 100644 --- a/eclass/virtualx.eclass +++ b/eclass/virtualx.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # @ECLASS: virtualx.eclass @@ -11,17 +11,17 @@ if [[ ! ${_VIRTUAL_X} ]]; then case "${EAPI:-0}" in - 0|1) + 0|1|2|3) die "virtualx.eclass: EAPI ${EAPI} is too old." ;; - 2|3|4|5|6) + 4|5|6) ;; *) die "virtualx.eclass: EAPI ${EAPI} is not supported yet." ;; esac -[[ ${EAPI} == [2345] ]] && inherit eutils +[[ ${EAPI} == [45] ]] && inherit eutils # @ECLASS-VARIABLE: VIRTUALX_REQUIRED # @DESCRIPTION: @@ -57,7 +57,7 @@ case ${VIRTUALX_REQUIRED} in RDEPEND="" ;; optional|tests) - [[ ${EAPI} == [2345] ]] \ + [[ ${EAPI} == [45] ]] \ || die 'Values "optional" and "tests" for VIRTUALX_REQUIRED are banned in EAPI > 5' # deprecated section YAY. eqawarn "VIRTUALX_REQUIRED=optional and VIRTUALX_REQUIRED=tests are deprecated." @@ -90,12 +90,12 @@ esac virtualmake() { debug-print-function ${FUNCNAME} "$@" - [[ ${EAPI} == [2345] ]] \ + [[ ${EAPI} == [45] ]] \ || die "${FUNCNAME} is unsupported in EAPI > 5, please use virtx" # backcompat for maketype if [[ -n ${maketype} ]]; then - [[ ${EAPI} == [2345] ]] || die "maketype is banned in EAPI > 5" + [[ ${EAPI} == [45] ]] || die "maketype is banned in EAPI > 5" eqawarn "ebuild is exporting \$maketype=${maketype}" eqawarn "Ebuild should be migrated to use 'virtx command' instead." VIRTUALX_COMMAND=${maketype} @@ -205,13 +205,8 @@ virtx() { # Do not break on error, but setup $retval, as we need # to kill Xvfb debug-print "${FUNCNAME}: $@" - if has "${EAPI}" 2 3; then - "$@" - retval=$? - else - nonfatal "$@" - retval=$? - fi + nonfatal "$@" + retval=$? # Now kill Xvfb kill $(cat /tmp/.X${XDISPLAY}-lock) @@ -229,7 +224,7 @@ virtx() { Xmake() { debug-print-function ${FUNCNAME} "$@" - [[ ${EAPI} == [2345] ]] \ + [[ ${EAPI} == [45] ]] \ || die "${FUNCNAME} is unsupported in EAPI > 5, please use 'virtx emake -j1 ....'" eqawarn "you should not execute make directly" @@ -243,7 +238,7 @@ Xmake() { Xemake() { debug-print-function ${FUNCNAME} "$@" - [[ ${EAPI} == [2345] ]] \ + [[ ${EAPI} == [45] ]] \ || die "${FUNCNAME} is unsupported in EAPI > 5, please use 'virtx emake ....'" VIRTUALX_COMMAND="emake" virtualmake "$@" @@ -255,7 +250,7 @@ Xemake() { Xeconf() { debug-print-function ${FUNCNAME} "$@" - [[ ${EAPI} == [2345] ]] \ + [[ ${EAPI} == [45] ]] \ || die "${FUNCNAME} is unsupported in EAPI > 5, please use 'virtx econf ....'" VIRTUALX_COMMAND="econf" virtualmake "$@" -- cgit v1.2.3-65-gdbad