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