commit: e398c855e3475c1fb5f3ac6a6e0553116dac83f8 Author: Thilo Fromm <thilo.alexander <AT> gmail <DOT> com> AuthorDate: Wed Nov 8 07:36:23 2023 +0000 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> CommitDate: Mon Nov 20 23:25:25 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e398c855
eclass/go-module.eclass: export compile env in src_unpack This change calls go-env_set_compile_environment in go-module'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 go-module. Signed-off-by: Thilo Fromm <thilo.alexander <AT> gmail.com> Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> eclass/go-module.eclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass index 6c58d7f26f07..701d36e012e2 100644 --- a/eclass/go-module.eclass +++ b/eclass/go-module.eclass @@ -68,7 +68,7 @@ esac if [[ -z ${_GO_MODULE_ECLASS} ]]; then _GO_MODULE_ECLASS=1 -inherit multiprocessing toolchain-funcs +inherit multiprocessing toolchain-funcs go-env if [[ ! ${GO_OPTIONAL} ]]; then BDEPEND=">=dev-lang/go-1.18" @@ -363,6 +363,7 @@ go-module_setup_proxy() { # local go proxy. This mode is deprecated. # 2. Otherwise, if EGO_VENDOR is set, bail out, as this functionality was removed. # 3. Otherwise, call 'ego mod verify' and then do a normal unpack. +# Set compile env via go-env. go-module_src_unpack() { if use amd64 || use arm || use arm64 || ( use ppc64 && [[ $(tc-endian) == "little" ]] ) || use s390 || use x86; then @@ -386,6 +387,8 @@ go-module_src_unpack() { ${nf} ego mod verify fi fi + + go-env_set_compile_environment } # @FUNCTION: _go-module_src_unpack_gosum