Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Fri, 17 Mar 2023 22:04:50
Message-Id: 1679090658.57b9227bf4c28ce6b276f02f4f11a732456158b5.soap@gentoo
1 commit: 57b9227bf4c28ce6b276f02f4f11a732456158b5
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 17 22:04:18 2023 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 17 22:04:18 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57b9227b
7
8 golang-vcs-snapshot.eclass: remove EAPI 5
9
10 Signed-off-by: David Seifert <soap <AT> gentoo.org>
11
12 eclass/golang-vcs-snapshot.eclass | 23 ++++++++++++++---------
13 1 file changed, 14 insertions(+), 9 deletions(-)
14
15 diff --git a/eclass/golang-vcs-snapshot.eclass b/eclass/golang-vcs-snapshot.eclass
16 index 5140064a651e..9c199bbbd8c5 100644
17 --- a/eclass/golang-vcs-snapshot.eclass
18 +++ b/eclass/golang-vcs-snapshot.eclass
19 @@ -1,10 +1,10 @@
20 -# Copyright 1999-2021 Gentoo Authors
21 +# Copyright 1999-2023 Gentoo Authors
22 # Distributed under the terms of the GNU General Public License v2
23
24 # @ECLASS: golang-vcs-snapshot.eclass
25 # @MAINTAINER:
26 # William Hubbs <williamh@g.o>
27 -# @SUPPORTED_EAPIS: 5 6 7
28 +# @SUPPORTED_EAPIS: 6 7
29 # @PROVIDES: golang-base
30 # @BLURB: eclass to unpack VCS snapshot tarballs for Go software
31 # @DEPRECATED: go-module.eclass
32 @@ -44,14 +44,15 @@
33 # ${WORKDIR}/${P}/src/github.com/user/package
34 # and add the vendored tarballs to ${WORKDIR}/src/${EGO_PN}/vendor
35
36 -inherit golang-base
37 -
38 -case ${EAPI:-0} in
39 - 5|6|7) ;;
40 - *) die "${ECLASS} API in EAPI ${EAPI} not yet established."
41 +case ${EAPI} in
42 + 6|7) ;;
43 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
44 esac
45
46 -EXPORT_FUNCTIONS src_unpack
47 +if [[ -z ${_GOLANG_VCS_SNAPSHOT_ECLASS} ]]; then
48 +_GOLANG_VCS_SNAPSHOT_ECLASS=1
49 +
50 +inherit golang-base
51
52 # @ECLASS_VARIABLE: EGO_VENDOR
53 # @DESCRIPTION:
54 @@ -82,7 +83,7 @@ unset -f _golang-vcs-snapshot_set_vendor_uri
55
56 _golang-vcs-snapshot_dovendor() {
57 local VENDOR_PATH=$1 VENDORPN=$2 TARBALL=$3
58 - rm -fr "${VENDOR_PATH}/${VENDORPN}" || die
59 + rm -rf "${VENDOR_PATH}/${VENDORPN}" || die
60 mkdir -p "${VENDOR_PATH}/${VENDORPN}" || die
61 tar -C "${VENDOR_PATH}/${VENDORPN}" -x --strip-components 1\
62 -f "${DISTDIR}"/${TARBALL} || die
63 @@ -117,3 +118,7 @@ golang-vcs-snapshot_src_unpack() {
64 done
65 fi
66 }
67 +
68 +fi
69 +
70 +EXPORT_FUNCTIONS src_unpack