summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2015-11-27 08:14:04 +0100
committerJustin Lecher <jlec@gentoo.org>2015-12-07 10:11:54 +0100
commit41b6f92f03557b432ca25181d2e5ba2a79686c68 (patch)
treeb17d679ebcd8499d971327ce409a653724f7defe /eclass/virtualx.eclass
parentdev-python/ldap3: Version Bump (diff)
downloadgentoo-41b6f92f03557b432ca25181d2e5ba2a79686c68.tar.gz
gentoo-41b6f92f03557b432ca25181d2e5ba2a79686c68.tar.bz2
gentoo-41b6f92f03557b432ca25181d2e5ba2a79686c68.zip
virtualx.eclass: Use case/esac to handle supported EAPIs
Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'eclass/virtualx.eclass')
-rw-r--r--eclass/virtualx.eclass14
1 files changed, 12 insertions, 2 deletions
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index 5d27ed984a8f..e9ff3af9b755 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -9,6 +9,17 @@
# Original author: Martin Schlemmer <azarah@gentoo.org>
# @BLURB: This eclass can be used for packages that needs a working X environment to build.
+case "${EAPI:-0}" in
+ 0|1)
+ die "virtualx.eclass: EAPI ${EAPI} is too old."
+ ;;
+ 2|3|4|5)
+ ;;
+ *)
+ die "virtualx.eclass: EAPI ${EAPI} is not supported yet."
+ ;;
+esac
+
# @ECLASS-VARIABLE: VIRTUALX_REQUIRED
# @DESCRIPTION:
# Variable specifying the dependency on xorg-server and xhost.
@@ -35,7 +46,6 @@ VIRTUALX_DEPEND="${VIRTUALX_DEPEND}
# (within virtualmake function).
: ${VIRTUALX_COMMAND:="emake"}
-has "${EAPI:-0}" 0 1 && die "virtualx eclass require EAPI=2 or newer."
case ${VIRTUALX_REQUIRED} in
manual)