public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
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 4/4] eclass/golang-vcs.eclass: set up compile env
Date: Sun, 19 Nov 2023 12:30:47 +0000	[thread overview]
Message-ID: <20231119123410.17748-5-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'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.

Signed-off-by: Thilo Fromm <thilo.alexander@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/33539
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
---
 eclass/golang-vcs.eclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/eclass/golang-vcs.eclass b/eclass/golang-vcs.eclass
index 7558db4776cb..6f7a837bc15f 100644
--- a/eclass/golang-vcs.eclass
+++ b/eclass/golang-vcs.eclass
@@ -20,7 +20,7 @@ esac
 if [[ -z ${_GOLANG_VCS_ECLASS} ]]; then
 _GOLANG_VCS_ECLASS=1
 
-inherit estack golang-base
+inherit estack golang-base go-env
 
 PROPERTIES+=" live"
 
@@ -63,6 +63,7 @@ PROPERTIES+=" live"
 # @INTERNAL
 # @DESCRIPTION:
 # Create EGO_STORE_DIR if necessary.
+# Set compile env via go-env.
 _golang-vcs_env_setup() {
 	debug-print-function ${FUNCNAME} "$@"
 
@@ -84,6 +85,8 @@ _golang-vcs_env_setup() {
 	mkdir -p "${WORKDIR}/${P}/src" ||
 		die "${ECLASS}: unable to create ${WORKDIR}/${P}"
 	return 0
+
+	go-env_set_compile_environment
 }
 
 # @FUNCTION: _golang-vcs_fetch
-- 
2.42.1



      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 ` [gentoo-dev] [PATCH 3/4] eclass/golang-vcs-snapshot.eclass: set up compile env James Le Cuirot
2023-11-19 12:30 ` James Le Cuirot [this message]

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-5-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