From a54e3b164a126a786d09cc0e768f2ada676b033b Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Wed, 22 Jan 2020 16:24:35 -0500 Subject: [PATCH 1/3] dev-lang/go: drop useless CTARGET check Go is always capable of cross-compiling to any supported target. Signed-off-by: Mike Gilbert --- dev-lang/go/go-9999.ebuild | 4 ---- 1 file changed, 4 deletions(-) diff --git a/dev-lang/go/go-9999.ebuild b/dev-lang/go/go-9999.ebuild index 7f4ad5f7af809..7516b365dbdbd 100644 --- a/dev-lang/go/go-9999.ebuild +++ b/dev-lang/go/go-9999.ebuild @@ -145,10 +145,6 @@ go_cross_compile() pkg_pretend() { - # make.bash does not understand cross-compiling a cross-compiler - if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then - die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}" - fi [[ ${MERGE_TYPE} != binary ]] && use system-bootstrap && ! has_version -b "dev-lang/go" && die "dev-lang/go must be installed to use the system-bootstrap use flag" From a221f1896edd631e861e6bedeeb594f37124fed0 Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Wed, 22 Jan 2020 20:36:26 -0500 Subject: [PATCH 2/3] dev-lang/go-bootstrap: new package This package is only referenced from BDEPEND in dev-lang/go so the ARCH USE flags will always correspond to CBUILD. This allows us to reduce the number of tarballs that must be fetched for bootstrap. Once dev-lang/go is intstalled, this package may be depcleaned. Package-Manager: Portage-2.3.84_p2, Repoman-2.3.20_p24 Signed-off-by: Mike Gilbert --- dev-lang/go-bootstrap/Manifest | 9 +++++ .../go-bootstrap/go-bootstrap-1.13.6.ebuild | 35 +++++++++++++++++++ dev-lang/go-bootstrap/metadata.xml | 8 +++++ 3 files changed, 52 insertions(+) create mode 100644 dev-lang/go-bootstrap/Manifest create mode 100644 dev-lang/go-bootstrap/go-bootstrap-1.13.6.ebuild create mode 100644 dev-lang/go-bootstrap/metadata.xml diff --git a/dev-lang/go-bootstrap/Manifest b/dev-lang/go-bootstrap/Manifest new file mode 100644 index 0000000000000..2c91e51b2892e --- /dev/null +++ b/dev-lang/go-bootstrap/Manifest @@ -0,0 +1,9 @@ +DIST go-darwin-amd64-bootstrap-1.13.6.tbz 119340642 BLAKE2B 93d1d2fdd24e6a56d9583d90e64788fe28284302d1e1346a2009dcba8f80917bf113398f269922277bd066b068f62fffa146523bd57a5b7b178f0008f3c4d154 SHA512 1f27885d454963e88f73d3b6ef4d0167a5df6ad81c4725fb3b2be19e2c7bad13ef36ff6c100b8788fa2085285e462f0d2b3dfaf8bd67b0804a137969054cb5ae +DIST go-linux-386-bootstrap-1.13.6.tbz 116991833 BLAKE2B e15c4dd3c9bfb233f81d318591df5cb2a73e033a088cd652371f6933b8732c7d5c1292ec8110b23f85b30d5afdea97e798b264c61f5651db08c7ac903e8dcbb6 SHA512 114c2f670f21624f0dfefabb99b7263e2133e58c2072ce341a6ea604278e22361779f2e0d3771b7a427e979d7e34f3fc3afcd0f8297d778c3552858ce64ec0c8 +DIST go-linux-amd64-bootstrap-1.13.6.tbz 116924754 BLAKE2B 3a28ded6df7e04081c727ad90ad2c8b67e1171aea8cd86b9570d65b275c2a4f1a84084d65a6c3e2efbece5594ba1aad3efc1a2fba36aa2dc68902c5c228c05e8 SHA512 3ade49da050d132309357a190628c3ff3a93cffa88f56e1d771f53358c825f210b6870870a96fdbc27717f1b464d904a6f605073377de2f0516cf635a1ce8241 +DIST go-linux-arm-bootstrap-1.13.6.tbz 112324731 BLAKE2B 18166e279b1d30f48e08007df8639775b58081805a7e5799dae14e0b357330cf69997f4a5c844bd10a9eeef44225d52f26197e07d16bb7a42fe5a6185634f4b5 SHA512 4d502e2231c1822dacb62cd00b435d52710b1511715385c0b3ddf9f66a446ae90e9b1628b501ba8e1d1a94ca5c28249a323da56f869e88480aa6c249ca001c6e +DIST go-linux-arm64-bootstrap-1.13.6.tbz 110290994 BLAKE2B dc8985a305d1ef3ae683de9787333f0be3d43d5e642a3b5a315cf003311fb47e55588eb1acf816e5eb4215802832a43445ebecedfd2d680d350cb65e0ce7394f SHA512 bc5f4c4554987a5df735bb96c9b8ae78624169d847ab17ea9b0e969ecaab109311892cf1985d576cd46bf271562b724c6a3796472e197a2c8bb48da0d51128a9 +DIST go-linux-ppc64-bootstrap-1.13.6.tbz 110762916 BLAKE2B 19d44da5bcd1f4832772469beed509475f9a38ab55b386490faf1b270ffd7cc13d315dfe4746b3b9ca6a324c0e6f2e0144a3146d43bd6210d0479063f8627e34 SHA512 2a76c6168d7ba0c7eb020a1af4eccb2a5aee510a1f8e4bb438f5ea769677724c1450209c2fc9a4ccff1084f1a091a568e667ec33a5d537539a09ece426cf82d8 +DIST go-linux-ppc64le-bootstrap-1.13.6.tbz 110086770 BLAKE2B a3f2c1b840f85d7726336285a56d1850fd10f32d90341836a4124a7d181778c3a1cff1d576e4a19a4f3556e961d84fa77202891725b5237121040bdd020af339 SHA512 6c4bd54fafea65fbb16a3e6c57b721c10654a5f18879c164f6889a01ec6581b13b450622e83897032ab3ed43a9ff4a7edb6d30c56d41dd23991e8453c1bae359 +DIST go-linux-s390x-bootstrap-1.13.6.tbz 115641137 BLAKE2B 7ab94a8f7c839ee8fb58673ed5ad00a569a0bae7a13bb214098154aedb1c272837d0903c226cb87b5eb46475589ddcd56e1afafc81ddaea988ce3c3ddca686d1 SHA512 794b72f48634a7f7dfb41c64607d66974ef9413a68e39a3959a981e2aaf356fd2cec9e2eb0c25d1b7b3d179c0a72ce053dc9c69463bde0ec893ab472f7076204 +DIST go-solaris-amd64-bootstrap-1.13.6.tbz 116214396 BLAKE2B 3f5d6fcf2131a0944b2846eab2fc069f5d90fea1e7d98e8bd50ba5091d4b2ae01964fa71c29310fa7ff7c990ca0dd1afc83577174a46552d58d611716fedb854 SHA512 2d2c281c196729dd97f338fe3bd7396268c0b6fcfc8241b99a939f647201ed39929a5b0a096b9d1f7ffb20f79fd7b3cc25127d7a93f9836f6f0d1e5dbc2c6235 diff --git a/dev-lang/go-bootstrap/go-bootstrap-1.13.6.ebuild b/dev-lang/go-bootstrap/go-bootstrap-1.13.6.ebuild new file mode 100644 index 0000000000000..bab301f70297e --- /dev/null +++ b/dev-lang/go-bootstrap/go-bootstrap-1.13.6.ebuild @@ -0,0 +1,35 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Go bootstrap" +HOMEPAGE="https://golang.org" +BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist" +SRC_URI=" + amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-bootstrap-${PV}.tbz ) + arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-bootstrap-${PV}.tbz ) + arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-bootstrap-${PV}.tbz ) + ppc64? ( + big-endian? ( ${BOOTSTRAP_DIST}/go-linux-ppc64-bootstrap-${PV}.tbz ) + !big-endian? ( ${BOOTSTRAP_DIST}/go-linux-ppc64le-bootstrap-${PV}.tbz ) + ) + s390? ( ${BOOTSTRAP_DIST}/go-linux-s390x-bootstrap-${PV}.tbz ) + x86? ( ${BOOTSTRAP_DIST}/go-linux-386-bootstrap-${PV}.tbz ) + x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-bootstrap-${PV}.tbz ) + x64-solaris? ( ${BOOTSTRAP_DIST}/go-solaris-amd64-bootstrap-${PV}.tbz ) +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" +IUSE="big-endian" +RESTRICT="strip" +QA_PREBUILT="*" + +S="${WORKDIR}" + +src_install() { + dodir /usr/lib + mv "${WORKDIR}"/go-*-bootstrap "${ED}/usr/lib/go-bootstrap" || die +} diff --git a/dev-lang/go-bootstrap/metadata.xml b/dev-lang/go-bootstrap/metadata.xml new file mode 100644 index 0000000000000..c36c37139fadf --- /dev/null +++ b/dev-lang/go-bootstrap/metadata.xml @@ -0,0 +1,8 @@ + + + + + williamh@gentoo.org + William Hubbs + + From 5048f84eefed984b164b2699a97297ea0b1f8be8 Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Wed, 22 Jan 2020 21:29:56 -0500 Subject: [PATCH 3/3] dev-lang/go: rework bootstrap logic to use dev-lang/go-bootstrap This eliminates the need for the system-bootstrap USE flag. Once dev-lang/go is installed, dev-lang/go-bootstrap can be depcleaned and future builds will automatically use dev-lang/go. Package-Manager: Portage-2.3.84_p2, Repoman-2.3.20_p24 Signed-off-by: Mike Gilbert --- dev-lang/go/go-9999.ebuild | 52 +++++++++++--------------------------- 1 file changed, 15 insertions(+), 37 deletions(-) diff --git a/dev-lang/go/go-9999.ebuild b/dev-lang/go/go-9999.ebuild index 7516b365dbdbd..1de1247e5058f 100644 --- a/dev-lang/go/go-9999.ebuild +++ b/dev-lang/go/go-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -10,20 +10,6 @@ MY_PV=${PV/_/} inherit toolchain-funcs -BOOTSTRAP_VERSION="bootstrap-1.13.6" -BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist" -BOOTSTRAP_URI=" - ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz - ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz - ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz - ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz - ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz - ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz - ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz - ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz - ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz -" - case ${PV} in *9999*) EGIT_REPO_URI="https://github.com/golang/go.git" @@ -46,22 +32,18 @@ case ${PV} in esac esac -# If gccgo or a previously installed version of dev-lang/go is not being -# used to build Go, there is no way to know the architecture or operating system -# of the build machine, so we need to download all of our bootstrap -# archives to allow this ebuild to work under crossdev. -# -# https://bugs.gentoo.org/671394 -SRC_URI+="!gccgo? ( !system-bootstrap? ( ${BOOTSTRAP_URI} ) )" - DESCRIPTION="A concurrent garbage collected and typesafe programming language" HOMEPAGE="https://golang.org" LICENSE="BSD" SLOT="0/${PV}" -IUSE="gccgo system-bootstrap" +IUSE="gccgo" -BDEPEND="gccgo? ( >=sys-devel/gcc-5[go] )" +BDEPEND="gccgo? ( >=sys-devel/gcc-5[go(-)] ) + !gccgo? ( || ( + dev-lang/go + dev-lang/go-bootstrap + ) )" RDEPEND="!