[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    [gentoo-dev] [PATCH 4/4] eclass/golang-vcs.eclass: set up compile env
From:       James Le Cuirot <chewi () gentoo ! org>
Date:       2023-11-19 12:30:47
Message-ID: 20231119123410.17748-5-chewi () gentoo ! org
[Download RAW message or body]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic