From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A481615823F for ; Sun, 19 Nov 2023 12:35:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A26F82BC05C; Sun, 19 Nov 2023 12:34:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 62EDD2BC059 for ; Sun, 19 Nov 2023 12:34:34 +0000 (UTC) From: James Le Cuirot To: gentoo-dev Cc: Thilo Fromm , James Le Cuirot Subject: [gentoo-dev] [PATCH 3/4] eclass/golang-vcs-snapshot.eclass: set up compile env Date: Sun, 19 Nov 2023 12:30:46 +0000 Message-ID: <20231119123410.17748-4-chewi@gentoo.org> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231119123410.17748-1-chewi@gentoo.org> References: <20231119123410.17748-1-chewi@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 51bec955-287e-47ce-b79a-ae49637a907f X-Archives-Hash: 2720ebb423d89c2ca384ea369b2bc429 From: Thilo Fromm 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 Signed-off-by: James Le Cuirot --- 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