summaryrefslogtreecommitdiff
path: root/eclass/golang-vcs-snapshot.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-03-18 00:29:05 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-03-18 00:29:05 +0000
commit467e2131896a3030032cd5b0fab2094a045bf9d0 (patch)
tree534578ca7ef61b3eb30fee861db78c0ae58e2fa6 /eclass/golang-vcs-snapshot.eclass
parent1f254b1ee917690b4f8f7738fdcfc295ee304ff7 (diff)
gentoo auto-resync : 18:03:2023 - 00:29:05
Diffstat (limited to 'eclass/golang-vcs-snapshot.eclass')
-rw-r--r--eclass/golang-vcs-snapshot.eclass23
1 files changed, 14 insertions, 9 deletions
diff --git a/eclass/golang-vcs-snapshot.eclass b/eclass/golang-vcs-snapshot.eclass
index 5140064a651e..9c199bbbd8c5 100644
--- a/eclass/golang-vcs-snapshot.eclass
+++ b/eclass/golang-vcs-snapshot.eclass
@@ -1,10 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: golang-vcs-snapshot.eclass
# @MAINTAINER:
# William Hubbs <williamh@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 6 7
# @PROVIDES: golang-base
# @BLURB: eclass to unpack VCS snapshot tarballs for Go software
# @DEPRECATED: go-module.eclass
@@ -44,14 +44,15 @@
# ${WORKDIR}/${P}/src/github.com/user/package
# and add the vendored tarballs to ${WORKDIR}/src/${EGO_PN}/vendor
-inherit golang-base
-
-case ${EAPI:-0} in
- 5|6|7) ;;
- *) die "${ECLASS} API in EAPI ${EAPI} not yet established."
+case ${EAPI} in
+ 6|7) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS src_unpack
+if [[ -z ${_GOLANG_VCS_SNAPSHOT_ECLASS} ]]; then
+_GOLANG_VCS_SNAPSHOT_ECLASS=1
+
+inherit golang-base
# @ECLASS_VARIABLE: EGO_VENDOR
# @DESCRIPTION:
@@ -82,7 +83,7 @@ unset -f _golang-vcs-snapshot_set_vendor_uri
_golang-vcs-snapshot_dovendor() {
local VENDOR_PATH=$1 VENDORPN=$2 TARBALL=$3
- rm -fr "${VENDOR_PATH}/${VENDORPN}" || die
+ rm -rf "${VENDOR_PATH}/${VENDORPN}" || die
mkdir -p "${VENDOR_PATH}/${VENDORPN}" || die
tar -C "${VENDOR_PATH}/${VENDORPN}" -x --strip-components 1\
-f "${DISTDIR}"/${TARBALL} || die
@@ -117,3 +118,7 @@ golang-vcs-snapshot_src_unpack() {
done
fi
}
+
+fi
+
+EXPORT_FUNCTIONS src_unpack