repo/gentoo:master commit in: dev-lang/go/

"Sam James" <[email protected]>
Newsgroups gmane.linux.gentoo.cvs
Message-ID <1786753116.9d18eac6ae8feff5a330ffdb97736aeaa0712a08.sam@gentoo>
commit:     9d18eac6ae8feff5a330ffdb97736aeaa0712a08
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 15 00:03:45 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 15 00:18:36 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d18eac6

dev-lang/go: add 1.25.13

Bug: https://bugs.gentoo.org/980862
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/go/Manifest          |   1 +
 dev-lang/go/go-1.25.13.ebuild | 152 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 153 insertions(+)

diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
index 161470217fbd..b932307dc4cc 100644
--- a/dev-lang/go/Manifest
+++ b/dev-lang/go/Manifest
@@ -3,6 +3,7 @@ DIST go1.24.12.src.tar.gz 30803950 BLAKE2B b3f7d2f1392d3337e6645c4fa53e2e53c4258
 DIST go1.25.10.src.tar.gz 32000721 BLAKE2B 020336996667a6bb5fd9f3b4af8a8a2012d4c1f162301b83db65f62820945a4f927c76cfc8b5ec183b7ddb12587d74aecbdf17a0c4dd3e66ddc461e7af716919 SHA512 4a938b18d00af583d1ab8592386b8c71385997b1c8fab661549232ee84ac2f42716dc8304c38f1f462335a12048da19611bb614a7007d8201e6818a11f187487
 DIST go1.25.11.src.tar.gz 31999704 BLAKE2B 44149e7a24ebfd1941f774014f50b841ba568fababea031b7039fa23480572ddceaf56b9316e6afcac85ebe2b8dd6f47c62484378b54243a53423bd9d96316f7 SHA512 d1fa0d267ee8ba55aacbe47562c128cccabb757dc1f5c553ac0fe70eec9edc49cf66133df6f88997c752e89f9d24b77bf4b6448f73fdd7d05f8bca88951eea26
 DIST go1.25.12.src.tar.gz 32013699 BLAKE2B 772ef11f0f0d828980e47fb109bafe2098eb05bfa95bdac9d5c9fcb5f17d114e2f58f824bacf99336cb5316e095e81df2253897f774112cfac2159b2c391c70d SHA512 748341d737c3ce9eb64a0f072c70be7cf3ceab7d1033da2d88b3aea4cf0de96745cded982b6db4a47de505c14e49babf59926fa61e6a86f2e22e61625daf762a
+DIST go1.25.13.src.tar.gz 32023100 BLAKE2B 37094c66ff5d399a1d2a4b55ea9f3366219ef22b9e26b556d2d7f0cc2f7d0e413636f23b205ddb332ad3e9c9c5914a2333ae727fa8bba2d84aede99574bdc452 SHA512 a7ef774fd747359fd7490baf3a6e4f358a78c38fb56d741c5d5712d34b574d3d722e3e42042f5a6ecd4637707e6c5b159705d4de62027db3684f205e240caa71
 DIST go1.25.5.src.tar.gz 31983405 BLAKE2B b6349931e6174b1b11c00360fb7a3040a80f3d3d463894b29393a464548398bad37be685923c725eb8a3fb71d42849254319102c833418f81eca477f52579222 SHA512 97ec368521253bce610e1e3a6f10460f4a38eba440289553a40ab27afcdf2bb9b426d150ffaa3be8db50e84a00a4eb723a631ebc4f39168bc133bf7b2f1ccf66
 DIST go1.25.6.src.tar.gz 31987986 BLAKE2B f9937808018f058d0f50fd0c0c1fa8f5a0f25d983a477e158e310d46dea30e33f3e0ea3d97ab550b6e5ed8d9f3b5354e76923b539ddb16a081f42e24fd3e4cfc SHA512 214b2d82b5322d544e80d7202db9169c24e5f097338f2d0e6d34189bd5bde9e7c1656f06611062c78a156181f03956181971b346172fc14617726bfece5e61e9
 DIST go1.25.8.src.tar.gz 31991986 BLAKE2B c8a18a74a8903e53954bcc39ce804518e94bd6b2ee0b8a0cc4b5cd87f5d1760d6b1235233d2bf2804e3ec55a42cf6f5345a6fe4382e7406483915101ca107c97 SHA512 2f5c9f314d18169985a9a4b19346e00dd5d4b396c8c17bfffe5719e51f27d834cc9649d0165f7eeb7367d3b6d384f49917325a40b49ba4da65e22f2c5362c739

diff --git a/dev-lang/go/go-1.25.13.ebuild b/dev-lang/go/go-1.25.13.ebuild
new file mode 100644
index 000000000000..4fae67fcf5a9
--- /dev/null
+++ b/dev-lang/go/go-1.25.13.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+
+# See "Bootstrap" in release notes
+GO_BOOTSTRAP_MIN=1.22.12
+MY_PV=${PV/_/}
+
+inherit flag-o-matic go-env toolchain-funcs
+
+case ${PV}  in
+*9999*)
+	EGIT_REPO_URI="https://github.com/golang/go.git"
+	inherit git-r3
+	;;
+*)
+	SRC_URI="https://go.dev/dl/go${MY_PV}.src.tar.gz "
+	S="${WORKDIR}"/go
+	KEYWORDS="-* ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~x86 ~x64-macos ~x64-solaris"
+	;;
+esac
+
+DESCRIPTION="A concurrent garbage collected and typesafe programming language"
+HOMEPAGE="https://go.dev"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+IUSE="cpu_flags_x86_sse2"
+
+BDEPEND="|| (
+		>=dev-lang/go-${GO_BOOTSTRAP_MIN}
+		>=dev-lang/go-bootstrap-${GO_BOOTSTRAP_MIN} )"
+
+# the *.syso files have writable/executable stacks
+QA_EXECSTACK='*.syso'
+
+# Do not complain about CFLAGS, etc, since Go doesn't use them.
+QA_FLAGS_IGNORED='.*'
+
+# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
+QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
+
+# This package triggers "unrecognized elf file(s)" notices on riscv.
+# https://bugs.gentoo.org/794046
+QA_PREBUILT="*"
+QA_PRESTRIPPED="*.syso"
+
+# The Go data race detector (go test -race) requires an unstripped Go toolchain.
+# https://bugs.gentoo.org/961618
+RESTRICT="strip"
+
+DOCS=(
+	CONTRIBUTING.md
+	PATENTS
+	README.md
+	SECURITY.md
+)
+
+go_tuple() {
+	echo "$(go-env_goos $@)_$(go-env_goarch $@)"
+}
+
+go_cross_compile() {
+	[[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
+}
+
+PATCHES=(
+	"${FILESDIR}"/go-1.24-skip-gdb-tests.patch
+	"${FILESDIR}"/go-1.25-no-dwarf5.patch
+	"${FILESDIR}"/go-1.25-strip-top-level-const.patch
+	"${FILESDIR}"/go-never-download-newer-toolchains.patch
+)
+
+src_compile() {
+	if has_version -b ">=dev-lang/go-${GO_BOOTSTRAP_MIN}"; then
+		export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
+	elif has_version -b ">=dev-lang/go-bootstrap-${GO_BOOTSTRAP_MIN}"; then
+		export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
+	else
+		eerror "Go cannot be built without go or go-bootstrap installed"
+		die "Should not be here, please report a bug"
+	fi
+
+	if tc-is-gcc ; then
+		# XXX: Hack for checking ICE (bug #912152, gcc PR113204)
+		#
+		# For either USE=debug or an unreleased compiler, non-default
+		# checking will trigger.
+		if has_version -b "sys-devel/gcc[debug]" || [[ $(gcc-minor-version) -eq 0 ]] ; then
+			rm src/cmd/link/cgo_test.go || die
+		fi
+
+		# bug #929219
+		replace-flags -g3 -g
+		replace-flags -ggdb3 -ggdb
+	fi
+
+	# Go's build script does not use BUILD/HOST/TARGET consistently. :(
+	export GOHOSTARCH=$(go-env_goarch ${CBUILD})
+	export GOHOSTOS=$(go-env_goos ${CBUILD})
+	export CC=$(tc-getBUILD_CC)
+
+	export GOARCH=$(go-env_goarch)
+	export GOOS=$(go-env_goos)
+	export CC_FOR_TARGET=$(tc-getCC)
+	export CXX_FOR_TARGET=$(tc-getCXX)
+	use arm && export GOARM=$(go-env_goarm)
+	use x86 && export GO386=$(go-env_go386)
+
+	cd src
+	bash -x ./make.bash || die "build failed"
+}
+
+src_test() {
+	go_cross_compile && return 0
+	cd src || die
+
+	# remove bad test because of ebuild toolchain environment
+	rm -v cmd/go/testdata/script/autocgo.txt || die
+
+	PATH="${GOBIN}:${PATH}" \
+	./run.bash -no-rebuild -k || die "tests failed"
+}
+
+src_install() {
+	dodir /usr/lib/go
+	# The use of cp is deliberate in order to retain permissions
+	cp -R . "${ED}"/usr/lib/go
+	einstalldocs
+
+	# testdata directories are not needed on the installed system
+	# The other files we remove are installed by einstalldocs
+	rm -r $(find "${ED}"/usr/lib/go -iname testdata -type d -print) || die
+	rm "${ED}"/usr/lib/go/{CONTRIBUTING.md,PATENTS,README.md} || die
+	rm "${ED}"/usr/lib/go/{SECURITY.md,codereview.cfg,LICENSE} || die
+
+	local bin_path
+	if go_cross_compile; then
+		bin_path="bin/$(go_tuple)"
+	else
+		bin_path=bin
+	fi
+	local f x
+	for x in ${bin_path}/*; do
+		f=${x##*/}
+		dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
+	done
+}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.