• [gentoo-dev] [PATCH 4/4] eclass/golang-vcs.eclass: set up compile env

    From James Le Cuirot@21:1/5 to All on Sun Nov 19 13:40:01 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)