From: James Le Cuirot <chewi@gentoo.org>
To: gentoo-dev <gentoo-dev@lists.gentoo.org>
Cc: Thilo Fromm <thilo.alexander@gmail.com>,
James Le Cuirot <chewi@gentoo.org>
Subject: [gentoo-dev] [PATCH 3/4] eclass/golang-vcs-snapshot.eclass: set up compile env
Date: Sun, 19 Nov 2023 12:30:46 +0000 [thread overview]
Message-ID: <20231119123410.17748-4-chewi@gentoo.org> (raw)
In-Reply-To: <20231119123410.17748-1-chewi@gentoo.org>
From: Thilo Fromm <thilo.alexander@gmail.com>
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@gmail.com>
Signed-off-by: James Le Cuirot <chewi@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
--
2.42.1
next prev parent reply other threads:[~2023-11-19 12:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-19 12:30 [gentoo-dev] [PATCH V2 0/4] eclass/go-env.eclass: add helper to enable cross compiling James Le Cuirot
2023-11-19 12:30 ` [gentoo-dev] [PATCH 1/4] eclass/go-env.eclass: add helper to set compile env James Le Cuirot
2023-11-19 12:30 ` [gentoo-dev] [PATCH 2/4] eclass/go-module.eclass: export compile env in src_unpack James Le Cuirot
2023-11-19 12:30 ` James Le Cuirot [this message]
2023-11-19 12:30 ` [gentoo-dev] [PATCH 4/4] eclass/golang-vcs.eclass: set up compile env James Le Cuirot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231119123410.17748-4-chewi@gentoo.org \
--to=chewi@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
--cc=thilo.alexander@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox