diff options
author | mirror@stealer.net <mirror@stealer.net> | 2025-07-11 15:30:22 +0000 |
---|---|---|
committer | mirror@stealer.net <mirror@stealer.net> | 2025-07-11 15:30:22 +0000 |
commit | f4a78a58c2d17490233b44b9ccfb417b23535133 (patch) | |
tree | d8263518904ffdfb23245575bad1b6f239a99acd /dev-lang | |
parent | 8ea4d54b945a83018cbe03d42b1bda742630f670 (diff) |
2025-07-11 15:10:42+00:00
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/Manifest.gz | bin | 22499 -> 22496 bytes | |||
-rw-r--r-- | dev-lang/go/Manifest | 4 | ||||
-rw-r--r-- | dev-lang/go/go-1.23.11.ebuild | 161 | ||||
-rw-r--r-- | dev-lang/go/go-1.24.5.ebuild | 132 |
4 files changed, 297 insertions, 0 deletions
diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz Binary files differindex 0f46c19471bc0..45d2cd67bf1cb 100644 --- a/dev-lang/Manifest.gz +++ b/dev-lang/Manifest.gz diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest index a86776bbad02e..0d963d5b51802 100644 --- a/dev-lang/go/Manifest +++ b/dev-lang/go/Manifest @@ -4,12 +4,16 @@ AUX go-1.24-vgetrandom.patch 7917 BLAKE2B 650a7729a830327220cee9d0c7a0ae2e0523cc AUX go-never-download-newer-toolchains.patch 368 BLAKE2B 0c90f46492af80622f430b2d506b143f3b553b5276085f78f41b93fee8219745179038302462603b5b1677554d92911eb4865084d0488aaa4c71ae1abc307f71 SHA512 b5acf97ccf96c6a353fcb7bd97113c38562defd82338828124fcc72c71334feda9c4e839d2aae5b66b809bc8a692eac96396c54a478e17a7ffd8d2c68fea95e6 AUX go-sets.conf 256 BLAKE2B 670afd72a2fa961e2b3882ac48d10e9d047af7a68f47bc8c8985b2de7a84022410fb1acfe2c710f8b3804ec3b043bf18c948478cf7d31c982cff47714b309cdf SHA512 028fba72c2d82ef893416970c27cb277be15f7c5c67773c0a62cd8ce2c192813ba851339596f10a6f5394c479e67b62dd4e4520379cc03f764ed4a4ab834fba6 DIST go1.23.10.src.tar.gz 28183775 BLAKE2B 877d61cc6dce0846feb0e2b3f901be9f233d458f549afe9c547d8a279b10c483120c3224cdb2add11af1ff4fb229a1a6d362b0701cf02d8d1c12721275fc954a SHA512 20639185b05720aa8bb295c54e3eaa7cf56739763544d28ce14a6f0323bf890900d5fad13086032291fbefad4482f1442772875bbdf16a94e2286eb405c8f327 +DIST go1.23.11.src.tar.gz 28185977 BLAKE2B 7624458c815210fe9b91a7cef8ca6fa0222518d84ebae500b3b36df2af1ecece6e2eee1fcb2a5d724492ba7dfdfe07509f18cd1976ca7e40c2f5d26802f4ad02 SHA512 108b86d384de01617b7c58fba8a2c6446f6d1e8d07b720de2c49854e664c8c2660f6a3700827bf77cb7f018f78c7f3dc4f9c9f3a8fba8ca5e91cadde2df98a95 DIST go1.23.9.src.tar.gz 28182928 BLAKE2B fe1038bb32982c4b2032e4a2a9aa533e7ff648337107581b905e484ae9cbbb8bb4e6d8b5b6041f06dd9b25b47c271e9240d6b329813d7777736fc9a33538a381 SHA512 0f80680caabbf50a4f55555d0515530c55e297f38bf193a9da531e640f069719e3c7a5670b72f7629fada8162f978305ae1e4e6398369b8021cfe6dc9157254a DIST go1.24.3.src.tar.gz 30789282 BLAKE2B b9ddb484900129f2b916c224ce30b59fdd14ed396f92b8935baa775e9574c5970494d8e612b60c675f699a73683781dfa9802a4c3906f5cc112b9de8ea83154f SHA512 05d19372fb923eeea19395b4de569d2ecfec7fadf2d8236d47cd667982de51c569e9816372cb79e32166553f9bcbe68f7bc2a6ded5655809b1caf5bd941011e7 DIST go1.24.4.src.tar.gz 30788576 BLAKE2B a553d7f3ec647fb962a4bf89c131b2eb6ad5da4f9335b9e3ef417a9eeca20d81d61c4e92a48fa050d3f422affbcf371a2bcc81e23a7c1b2c408677f7bcaa1025 SHA512 b785583fc53d62094b2de793a0e3281a26d2de17897a35b378fc2d13cb912ca473c37a7bae54a50660141809d5d0a70a97663d406cf30d7f0221ecbb5ffddec6 +DIST go1.24.5.src.tar.gz 30792943 BLAKE2B 47d281c221ca87f7b668e5e44017b77c408c08543ded64c54de9515cd3759f92228983f878e39ae0d52e7bbdae4c09161381196bb7efb48e77f38694195c883e SHA512 917cd6ac83e3370227da40f8490697e8638847e9279ed1806044a173d3b52829c67c429990db92d8aadcfba6a37bfc00114c1ecec3ac387a781bb7edc8dcab22 EBUILD go-1.23.10.ebuild 4182 BLAKE2B 7277ba379d70c40e7177f5bd8402e9e65dbe5f610d36be142f49a278aa6c02d2a2291aafa2cb510d427d4450172ca9afc1e8a8f2d6a405d42baf7ca5359794b3 SHA512 27a00038375823b2add6c834f3856965050278a9a3fb4de10dde748310b44a48cc4f8c09d2301e2578dc341b601ca7060fe12451b0bc83dc3220d54eb26795a7 +EBUILD go-1.23.11.ebuild 4186 BLAKE2B dd59406985942656cfaa3b36930276bcfd08bd6857c205c0a4c71adee9819dac6009b4d7a18ed34a01ed9f417008a6f9638b615174c6ad543d9728a4e452969d SHA512 fc479fbf249103c93728d8d5e4a04656882bf1d6a4787e88805ff0293c10d2e8d2c3bcdade84a48283fe399bcec7047e222ee8356497a6aa4298148050199670 EBUILD go-1.23.9-r1.ebuild 4181 BLAKE2B 1a003518d838c380d5953b1c0c8cd5f6a7d509f08d22d41075044eff7eff1c92dec816fe9ce26319d84eb9b5da7300a426a01c0637c39aa373d31a1d63a20d1d SHA512 01a72f7ab34e282cae93133abeecdb799d08cb228cb0fa90fcb4bc30b35099ebe881f2eec51f4f039e121c264a6752f13e3a80038f48ab54d8e262dc61c1d5f7 EBUILD go-1.24.3.ebuild 3363 BLAKE2B eb353c22500b50c29b58f6d32b55a9d02417c95de0c466dd29aa0e33329088a7031c6c71cda8e9a8e13e29b4b3417eb08531e3b074cf0bfc16e72577fd5c7c9f SHA512 d75c919d92722241b7ef2116c67fd4c8c6988a9af78fc59342090b0e4d3cef9629b446e66cdd7a7bc537c6bc82c4fe818ee3e6b235a95d800025bccc60bead2c EBUILD go-1.24.4.ebuild 3364 BLAKE2B ace8d91300a388526475b2e55e188d936867e2330647fb4503a7c75f3822657a0b3513431ab651c6b0dac6003997368e32cf6791e74dde04a385b2983c1093df SHA512 f88c5ec1a318ff11c4bbcfb284223e58c95a9c1a316ab321b91d39014c36cfe31220b1c55a923daa8ec0b94cd13d213f20e3f7d86e4e68e825a043d6d0451074 +EBUILD go-1.24.5.ebuild 3368 BLAKE2B 4124a02284437def9edfe9daea363d64c96d1943713aab0449a290740cdb9f98162c5fd54890e12575fb4bf2200eedb417d369822b381b1810796902e75fec3b SHA512 1a735e35d2d3bada964a1cfe2d0ad40dec00e82c3b665d72b96f3f7a015f9b6bbd09a13f31458f14f4d3354378cc76937ed3c8843076ca32808dc72e59e146d2 EBUILD go-9999.ebuild 3325 BLAKE2B 44e91a7a333928cf9776903747221b227951d35cafee81b4df3ce8cc3fc847b21503cd34b339cdade49de5a4c810aee5a2f00698542615a42efb189b9bf26208 SHA512 f7cb4aa003edf37bfc89ebd3269e16049a1a33345d2aa779a32029c6c7fbdff3e6d051e499676dbaee0eb061fccc27de9d5e5413b8ffb676ee6a8f237955d858 MISC metadata.xml 589 BLAKE2B 341e4c0e91d73ca668c1795035e1223eed60f85c724afd989ef1f8fb69649f7f6eaaf8a5228f6c8f587ffcc40a438c47d332fbe6866839f5a0829872a983f642 SHA512 fe58ddddfbd4d0d060516cb035592a80c0f48e125bb59c95d3c6fac0c182271e2a9ec9bd055b9cc8e6cb8c449e6c483bff4a23c362f532c24255febfdefc273a diff --git a/dev-lang/go/go-1.23.11.ebuild b/dev-lang/go/go-1.23.11.ebuild new file mode 100644 index 0000000000000..8055c81cefa0c --- /dev/null +++ b/dev-lang/go/go-1.23.11.ebuild @@ -0,0 +1,161 @@ +# Copyright 1999-2025 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.20.14 +MY_PV=${PV/_/} + +inherit go-env toolchain-funcs + +case ${PV} in +*9999*) + EGIT_REPO_URI="https://github.com/golang/go.git" + inherit git-r3 + ;; +*) + SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " + S="${WORKDIR}"/go + case ${PV} in + *_beta*|*_rc*) ;; + *) + KEYWORDS="-* ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" + ;; + esac +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='.*' + +# Do not strip this package. Stripping is unsupported upstream and may +# fail. +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.24-dont-force-gold-arm.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 + + # 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 + + # https://github.com/golang/go/issues/42005 + rm cmd/link/internal/ld/fallocate_test.go || die + + PATH="${GOBIN}:${PATH}" \ + ./run.bash -no-rebuild -k || die "tests failed" + cd .. + rm -fr pkg/*_race || die + rm -fr pkg/obj/go-build || die +} + +src_install() { + dodir /usr/lib/go + # The use of cp is deliberate in order to retain permissions + cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go + einstalldocs + + insinto /usr/lib/go + doins go.env VERSION* + + # testdata directories are not needed on the installed system + rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print) + + 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 + + # install the @golang-rebuild set for Portage + insinto /usr/share/portage/config/sets + newins "${FILESDIR}"/go-sets.conf go.conf +} + +pkg_postinst() { + [[ -z ${REPLACING_VERSIONS} ]] && return + elog "After ${CATEGORY}/${PN} is updated it is recommended to rebuild" + elog "all packages compiled with previous versions of ${CATEGORY}/${PN}" + elog "due to the static linking nature of go." + elog "If this is not done, the packages compiled with the older" + elog "version of the compiler will not be updated until they are" + elog "updated individually, which could mean they will have" + elog "vulnerabilities." + elog "Run 'emerge @golang-rebuild' to rebuild all 'go' packages" + elog "See https://bugs.gentoo.org/752153 for more info" +} diff --git a/dev-lang/go/go-1.24.5.ebuild b/dev-lang/go/go-1.24.5.ebuild new file mode 100644 index 0000000000000..2be24178ea793 --- /dev/null +++ b/dev-lang/go/go-1.24.5.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2025 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 go-env toolchain-funcs + +case ${PV} in +*9999*) + EGIT_REPO_URI="https://github.com/golang/go.git" + inherit git-r3 + ;; +*) + SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " + S="${WORKDIR}"/go + KEYWORDS="-* ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux ~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='.*' + +# Do not strip this package. Stripping is unsupported upstream and may +# fail. +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.24-dont-force-gold-arm.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 + + # 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 + 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 +} |