This deduplicates some helper functions.
Signed-off-by: James Le Cuirot <
chewi@gentoo.org>
---
dev-lang/go/go-1.22.5.ebuild | 65 +++++-------------------------------
dev-lang/go/go-9999.ebuild | 65 +++++-------------------------------
2 files changed, 18 insertions(+), 112 deletions(-)
diff --git a/dev-lang/go/go-1.22.5.ebuild b/dev-lang/go/go-1.22.5.ebuild
index fc36a2d33ae98..b16e86ae904f0 100644
--- a/dev-lang/go/go-1.22.5.ebuild
+++ b/dev-lang/go/go-1.22.5.ebuild
@@ -10,7 +10,7 @@ export CTARGET=${CTARGET:-${CHOST}}
GO_BOOTSTRAP_MIN=1.20.14
MY_PV=${PV/_/}
-inherit toolchain-funcs
+inherit go-env toolchain-funcs
case ${PV} in
*9999*)
@@ -33,7 +33,7 @@ HOMEPAGE="
https://go.dev"
LICENSE="BSD"
SLOT="0/${PV}"
-IUSE="abi_mips_o32 abi_mips_n64 cpu_flags_x86_sse2"
+IUSE="cpu_flags_x86_sse2"
RDEPEND="
arm? ( sys-devel/binutils[gold] )
@@ -66,55 +66,8 @@ DOCS=(
SECURITY.md
)
-go_arch() {
- # By chance most portage arch names match Go
- local tc_arch=$(tc-arch $@)
- case "${tc_arch}" in
- x86) echo 386;;
- x64-*) echo amd64;;
- loong) echo loo