From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1607967-garchives=archives.gentoo.org@lists.gentoo.org> 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 C0062158041 for <garchives@archives.gentoo.org>; Wed, 6 Mar 2024 20:26:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DB3C3E29C0; Wed, 6 Mar 2024 20:26:14 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 B5000E29C0 for <gentoo-commits@lists.gentoo.org>; Wed, 6 Mar 2024 20:26:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 smtp.gentoo.org (Postfix) with ESMTPS id 9FC45335D72 for <gentoo-commits@lists.gentoo.org>; Wed, 6 Mar 2024 20:26:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EE97814D7 for <gentoo-commits@lists.gentoo.org>; Wed, 6 Mar 2024 20:26:11 +0000 (UTC) From: "William Hubbs" <williamh@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" <williamh@gentoo.org> Message-ID: <1709756767.c58e3dba67e7593f145f930e7b4fdecb218eb723.williamh@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/go/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/go/go-1.22.1.ebuild X-VCS-Directories: dev-lang/go/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: c58e3dba67e7593f145f930e7b4fdecb218eb723 X-VCS-Branch: master Date: Wed, 6 Mar 2024 20:26:11 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 7a6ecb6a-1221-4a02-8c2b-0a4f61897600 X-Archives-Hash: 80e354f6b858e89e6f476d2fbca46734 commit: c58e3dba67e7593f145f930e7b4fdecb218eb723 Author: William Hubbs <williamh <AT> gentoo <DOT> org> AuthorDate: Wed Mar 6 20:20:38 2024 +0000 Commit: William Hubbs <williamh <AT> gentoo <DOT> org> CommitDate: Wed Mar 6 20:26:07 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c58e3dba dev-lang/go: update EAPI 7 -> 8 also bootstrap with go-bootstrap instead of downloading the bootstrap binaries in this ebuild. Signed-off-by: William Hubbs <williamh <AT> gentoo.org> dev-lang/go/go-1.22.1.ebuild | 78 +++++++++++++------------------------------- 1 file changed, 22 insertions(+), 56 deletions(-) diff --git a/dev-lang/go/go-1.22.1.ebuild b/dev-lang/go/go-1.22.1.ebuild index 6b21274bfbf5..46b65d884a62 100644 --- a/dev-lang/go/go-1.22.1.ebuild +++ b/dev-lang/go/go-1.22.1.ebuild @@ -1,56 +1,24 @@ # Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +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 toolchain-funcs -# See "Bootstrap" in release notes -# GO_BV is set to the minimum version of go required to bootstrap the -# current version. -GO_BV=1.20.14 -BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist" -SRC_URI=" - !system-bootstrap? ( - amd64? ( ${BOOTSTRAP_DIST}/go-${GO_BV}-linux-amd64-bootstrap.tbz ) - arm? ( ${BOOTSTRAP_DIST}/go-${GO_BV}-linux-arm-bootstrap.tbz ) - arm64? ( ${BOOTSTRAP_DIST}/go-${GO_BV}-linux-arm64-bootstrap.tbz ) - loong? ( ${BOOTSTRAP_DIST}/go-${GO_BV}-linux-loong64-bootstrap.tbz ) - mips? ( - abi_mips_o32? ( - big-endian? ( ${BOOTSTRAP_DIST}/go-${GO_BV}-linux-mips-bootstrap.tbz ) - !big-endian? ( ${BOOTSTRAP_DIST}/go-${GO_BV}-linux-mipsle-bootstrap.tbz ) - ) - abi_mips_n64? ( - big-endian? ( ${BOOTSTRAP_DIST}/go-${GO_BV}-linux-mips64-bootstrap.tbz ) - !big-endian? ( ${BOOTSTRAP_DIST}/go-${GO_BV}-linux-mips64le-bootstrap.tbz ) - ) - ) - ppc64? ( - big-endian? ( ${BOOTSTRAP_DIST}/go-${GO_BV}-linux-ppc64-bootstrap.tbz ) - !big-endian? ( ${BOOTSTRAP_DIST}/go-${GO_BV}-linux-ppc64le-bootstrap.tbz ) - ) - riscv? ( ${BOOTSTRAP_DIST}/go-${GO_BV}-linux-riscv64-bootstrap.tbz ) - s390? ( ${BOOTSTRAP_DIST}/go-${GO_BV}-linux-s390x-bootstrap.tbz ) - x86? ( ${BOOTSTRAP_DIST}/go-${GO_BV}-linux-386-bootstrap.tbz ) - x64-macos? ( ${BOOTSTRAP_DIST}/go-${GO_BV}-darwin-amd64-bootstrap.tbz ) - arm64-macos? ( ${BOOTSTRAP_DIST}/go-${GO_BV}-darwin-arm64-bootstrap.tbz ) - x64-solaris? ( ${BOOTSTRAP_DIST}/go-${GO_BV}-solaris-amd64-bootstrap.tbz ) - ) - " - 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 " + SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " S="${WORKDIR}"/go case ${PV} in *_beta*|*_rc*) ;; @@ -65,11 +33,14 @@ HOMEPAGE="https://go.dev" LICENSE="BSD" SLOT="0/${PV}" -IUSE="abi_mips_o32 abi_mips_n64 big-endian system-bootstrap" +IUSE="abi_mips_o32 abi_mips_n64 cpu_flags_x86_sse2" RDEPEND=" arm? ( sys-devel/binutils[gold] ) arm64? ( sys-devel/binutils[gold] )" +BDEPEND="|| ( + >=dev-lang/go-${GO_BOOTSTRAP_MIN} + >=dev-lang/go-bootstrap-${GO_BOOTSTRAP_MIN} )" # the *.syso files have writable/executable stacks QA_EXECSTACK='*.syso' @@ -154,12 +125,20 @@ PATCHES=( "${FILESDIR}"/go-never-download-newer-toolchains.patch ) -src_unpack() { - default - [[ ${PV} == *9999* ]] && git-r3_src_unpack -} - 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 + + export GOROOT_FINAL="${EPREFIX}"/usr/lib/go + export GOROOT="${PWD}" + export GOBIN="${GOROOT}/bin" + # Go's build script does not use BUILD/HOST/TARGET consistently. :( export GOHOSTARCH=$(go_arch ${CBUILD}) export GOHOSTOS=$(go_os ${CBUILD}) @@ -172,19 +151,6 @@ src_compile() { use arm && export GOARM=$(go_arm) use x86 && export GO386=$(usex cpu_flags_x86_sse2 '' 'softfloat') - export GOROOT="${PWD}" - if use system-bootstrap; then - if has_version <dev-lang/go-${GO_BV}; then - eerror "You need at least dev-lang/go-${GO_BV} installed to bootstrap this version of go" - die "version of go is too old" - fi - export GOROOT_BOOTSTRAP="${EPREFIX}/usr/lib/go" - else - export GOROOT_BOOTSTRAP="${WORKDIR}/go-${GOOS}-${GOARCH}-bootstrap" - fi - export GOROOT_FINAL="${EPREFIX}"/usr/lib/go - export GOBIN="${GOROOT}/bin" - cd src bash -x ./make.bash || die "build failed" } @@ -211,7 +177,7 @@ src_install() { einstalldocs insinto /usr/lib/go - doins go.env VERSION* + 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)