From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 5E49E1384B4 for ; Sun, 29 Nov 2015 12:25:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BCDDE21C091; Sun, 29 Nov 2015 12:24:53 +0000 (UTC) Received: from hetzner3.not-your-server.de (hetzner3.not-your-server.de [144.76.31.203]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 996EC21C061 for ; Sun, 29 Nov 2015 12:24:51 +0000 (UTC) Received: from localhost (localhost [IPv6:::1]) by hetzner3.not-your-server.de (Postfix) with ESMTP id 21BC41057C7; Sun, 29 Nov 2015 13:24:50 +0100 (CET) X-Virus-Scanned: amavisd-new at not-your-server.de Received: from hetzner3.not-your-server.de ([127.0.0.1]) by localhost (hetzner3.not-your-server.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DAKdzZUu6zl8; Sun, 29 Nov 2015 13:24:49 +0100 (CET) Received: from leo.ics.kfa-juelich.de (static-2-1006.not-your-server.de [IPv6:2a01:4f8:191:22ca::2:1006]) by hetzner3.not-your-server.de (Postfix) with ESMTP id E7E8B1057BC; Sun, 29 Nov 2015 13:24:48 +0100 (CET) From: Justin Lecher To: gentoo-dev@lists.gentoo.org Cc: Justin Lecher Subject: [gentoo-dev] [PATCH 1/8] virtualx.eclass: Use case/esac to handle supported EAPIs Date: Sun, 29 Nov 2015 13:24:37 +0100 Message-Id: <1448799884-29158-2-git-send-email-jlec@gentoo.org> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1448799884-29158-1-git-send-email-jlec@gentoo.org> References: <565AE956.5060602@gentoo.org> <1448799884-29158-1-git-send-email-jlec@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: 6889427b-5a80-4357-b43b-c7960d60ae93 X-Archives-Hash: 24408831bbb9c15f9b2b28bfe4cd3d79 Signed-off-by: Justin Lecher --- 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 # @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