[prev in list] [next in list] [prev in thread] [next in thread]
List: gentoo-dev
Subject: [gentoo-dev] [PATCH 1/8] virtualx.eclass: Use case/esac to handle supported EAPIs
From: Justin Lecher <jlec () gentoo ! org>
Date: 2015-11-29 12:24:37
Message-ID: 1448799884-29158-2-git-send-email-jlec () gentoo ! org
[Download RAW message or body]
Signed-off-by: Justin Lecher <jlec@gentoo.org>
---
eclass/virtualx.eclass | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index 5d27ed9..e9ff3af 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)
--
2.6.3
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic