commit: 069fa0125f971af844000efa820a8940ceb2d497
Author: Thilo Fromm <thilo.alexander <AT> gmail <DOT> com>
AuthorDate: Wed Nov 8 07:39:22 2023 +0000
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Mon Nov 20 23:25:29 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=069fa012
eclass/golang-vcs-snapshot.eclass: set up compile env
This change calls go-env_set_compile_environment in
golang-vcs-snapshot's src_unpack to set up a sane compile environment
early in the go build process. This un-breaks cross compiling of all
golang ebuilds that inherit golang-vcs-snapshot.
Signed-off-by: Thilo Fromm <thilo.alexander <AT> gmail.com>
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
eclass/golang-vcs-snapshot.eclass | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/eclass/golang-vcs-snapshot.eclass
b/eclass/golang-vcs-snapshot.eclass
index 9c199bbbd8c5..d34b8a6e913d 100644
--- a/eclass/golang-vcs-snapshot.eclass
+++ b/eclass/golang-vcs-snapshot.eclass
@@ -52,7 +52,7 @@ esac
if [[ -z ${_GOLANG_VCS_SNAPSHOT_ECLASS} ]]; then
_GOLANG_VCS_SNAPSHOT_ECLASS=1
-inherit golang-base
+inherit golang-base go-env
# @ECLASS_VARIABLE: EGO_VENDOR
# @DESCRIPTION:
@@ -92,6 +92,7 @@ _golang-vcs-snapshot_dovendor() {
# @FUNCTION: golang-vcs-snapshot_src_unpack
# @DESCRIPTION:
# Extract the first archive from ${A} to the appropriate location for GOPATH.
+# Set compile env via go-env.
golang-vcs-snapshot_src_unpack() {
local lib vendor_path x
ego_pn_check
@@ -117,6 +118,8 @@ golang-vcs-snapshot_src_unpack() {
fi
done
fi
+
+ go-env_set_compile_environment
}
fi