dev-lang/go: add 1.25.14

See-also: https://github.com/golang/go/issues?q=milestone%3AGo1.25.14+label%3ACherryPickApproved
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
This commit is contained in:
Arthur Zamarin
2026-08-19 22:46:58 +03:00
parent 5106663f3e
commit cfcd408a99
2 changed files with 153 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ DIST go1.25.10.src.tar.gz 32000721 BLAKE2B 020336996667a6bb5fd9f3b4af8a8a2012d4c
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.14.src.tar.gz 32023791 BLAKE2B a81ea6111598162d5b87077d23da67bf5ad587bba40bf24cfef0722a5d87177d8fdb824397d21fb31fb0de0aff694590fbca2a1e917fa3e9fab0ea85aca5c810 SHA512 89cf61d27fc5fa179a821feb4fbd0c55bb8340cdab2adcaa95b52ccf4f5d855034f3acff0e2c1c9e9eaed8c833c5139a04144fa92324755abba13502b07184ac
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

View File

@@ -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
}