commit:     79bf6dd5f617db3f1aeb13bbf3607c06673ea28a
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 21 10:26:40 2021 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Jun 23 10:21:35 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79bf6dd5

git-r3.eclass: Support EAPI 8, drop support for EAPI 4

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 eclass/git-r3.eclass | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index 9c4f2c9d778..365f21a4ed4 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -4,21 +4,15 @@
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
 # Michał Górny <mgo...@gentoo.org>
-# @SUPPORTED_EAPIS: 4 5 6 7
+# @SUPPORTED_EAPIS: 5 6 7 8
 # @BLURB: Eclass for fetching and unpacking git repositories.
 # @DESCRIPTION:
 # Third generation eclass for easing maintenance of live ebuilds using
 # git as remote repository.
 
-case "${EAPI:-0}" in
-       0|1|2|3)
-               die "Unsupported EAPI=${EAPI} (obsolete) for ${ECLASS}"
-               ;;
-       4|5|6|7)
-               ;;
-       *)
-               die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
-               ;;
+case ${EAPI:-0} in
+       5|6|7|8) ;;
+       *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
 EXPORT_FUNCTIONS src_unpack
@@ -28,7 +22,7 @@ if [[ ! ${_GIT_R3} ]]; then
 PROPERTIES+=" live"
 
 if [[ ! ${_INHERITED_BY_GIT_2} ]]; then
-       if [[ ${EAPI:-0} != [0123456] ]]; then
+       if [[ ${EAPI} != [56] ]]; then
                BDEPEND=">=dev-vcs/git-1.8.2.1[curl]"
        else
                DEPEND=">=dev-vcs/git-1.8.2.1[curl]"
@@ -612,7 +606,7 @@ git-r3_fetch() {
        local commit_date=${4:-${EGIT_COMMIT_DATE}}
 
        # support new override API for EAPI 6+
-       if ! has "${EAPI:-0}" 0 1 2 3 4 5; then
+       if [[ ${EAPI} != 5 ]]; then
                # get the name and do some more processing:
                # 1) kill .git suffix,
                # 2) underscore (remaining) non-variable characters,

Reply via email to