Gentoo Archives: gentoo-dev

From: Michael Orlitzky <mjo@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [PATCH 1/1] php-pear-r1.eclass: add support for EAPI=6 and clean up the EAPI check.
Date: Sun, 31 Jan 2016 02:02:28
Message-Id: 1454205724-22475-1-git-send-email-mjo@gentoo.org
1 The dev-lang/php dependency in php-pear-r1.eclass is calculated based
2 on the EAPI. In newer EAPIs, we specify the "any slot" operator to
3 avoid repoman warnings. Previously, the "any slot" operator was added
4 only for EAPI=5; this commit adds it for EAPI=6.
5
6 In addition, EAPIs 0, 1, 2, 3, and 4 are named explicitly in the case
7 statement. The default "*" case now dies with a warning that the EAPI
8 is unsupported.
9 ---
10 eclass/php-pear-r1.eclass | 19 +++++++++++--------
11 1 file changed, 11 insertions(+), 8 deletions(-)
12
13 diff --git a/eclass/php-pear-r1.eclass b/eclass/php-pear-r1.eclass
14 index 85eee28..237cf83 100644
15 --- a/eclass/php-pear-r1.eclass
16 +++ b/eclass/php-pear-r1.eclass
17 @@ -1,4 +1,4 @@
18 -# Copyright 1999-2015 Gentoo Foundation
19 +# Copyright 1999-2016 Gentoo Foundation
20 # Distributed under the terms of the GNU General Public License v2
21 # $Id$
22
23 @@ -19,14 +19,17 @@ inherit multilib
24
25 EXPORT_FUNCTIONS pkg_setup src_install
26
27 -# Silence repoman warnings
28 case "${EAPI:-0}" in
29 - 5)
30 - PHP_DEPEND="dev-lang/php:*"
31 - ;;
32 - *)
33 - PHP_DEPEND="dev-lang/php"
34 - ;;
35 + 0|1|2|3|4)
36 + PHP_DEPEND="dev-lang/php"
37 + ;;
38 + 5|6)
39 + # Repoman will complain about the missing slot in newer EAPIs.
40 + PHP_DEPEND="dev-lang/php:*"
41 + ;;
42 + *)
43 + die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
44 + ;;
45 esac
46
47 DEPEND="${PHP_DEPEND}
48 --
49 2.4.10