commit:     1124cdb5a7a985eccb1d24433e647771785b5efa
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 24 02:21:55 2020 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Jan 24 02:21:55 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1124cdb5

dev-lang/go: sync 1.13.6 with live

This syncs the following build-time changes from the live ebuild:

- use dev-lang/go-bootstrap to bootstrap the initial installation. This
  means that we will only download the relevant bootstrap archive.
  go-bootstrap can be depcleaned after the initial go installation.

- use go itself to bootstrap if it is already installed.
  This means go-bootstrap will not be downloaded as long as go is
  on the system.

- Drop the gccgo and system-bootstrap use flags.
  Bootstrapping go with gccgo had several issues, and it is no longer
  needed. Also, the system-bootstrap use flag is no longer needed since
  this behavior is the default if go is installed.

closes: https://bugs.gentoo.org/618794
closes: https://bugs.gentoo.org/664048
closes: https://bugs.gentoo.org/684652

Signed-off-by: William Hubbs <williamh <AT> gentoo.org>

 dev-lang/go/Manifest         |  9 ------
 dev-lang/go/go-1.13.6.ebuild | 69 +++++++-------------------------------------
 2 files changed, 11 insertions(+), 67 deletions(-)

diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
index 809916efed9..282aa9c5be6 100644
--- a/dev-lang/go/Manifest
+++ b/dev-lang/go/Manifest
@@ -1,22 +1,13 @@
-DIST go-darwin-amd64-bootstrap-1.13.6.tbz 119340642 BLAKE2B 
93d1d2fdd24e6a56d9583d90e64788fe28284302d1e1346a2009dcba8f80917bf113398f269922277bd066b068f62fffa146523bd57a5b7b178f0008f3c4d154
 SHA512 
1f27885d454963e88f73d3b6ef4d0167a5df6ad81c4725fb3b2be19e2c7bad13ef36ff6c100b8788fa2085285e462f0d2b3dfaf8bd67b0804a137969054cb5ae
 DIST go-darwin-amd64-bootstrap-1.8.tbz 55053831 BLAKE2B 
7d87ff36b0e13b3b3c0b8ffc4516493e1a6dde1287675b85b591c1d0a8438c9cb9c8991dc53d3c94c5ebb26830da1c7177ef1f90c250c1efeb5868020abcc660
 SHA512 
4cc24d44c84c94feafab021c0977fcea2aca8f191c6395e38fff68154b1e64efc3f94331c3e36c7b69901af58e9d53545c682f0a742d36b2d230508bd69777c4
 DIST go-freebsd-386-bootstrap-1.8.tbz 53739013 BLAKE2B 
a91e0a6b601aadc965f774ffd25a185e1f300e7194e969337f32bf9cb3056769786d92ef697271e7434d72c04d9d6780bf0fb3cb70efa83fe53cc18dc23670ec
 SHA512 
c92f849b2d92401657412cccc589042b2747e55b2f4813d674c5bc91c3f535ee60f8ed7b8cbf1320e216d22a16dade8b78bb8071982895901f2b3c304e38f478
 DIST go-freebsd-amd64-bootstrap-1.8.tbz 55103927 BLAKE2B 
30e4e4bcb43da3a170f520b47cd032a524d4c4977a9c76c4d597bb50e21a3ad2ef764dec15085d97cb5791bd483d8fac10ef5949c56b46e7580468fc9c90a78c
 SHA512 
c7d50731ff41147295ef5f3233aa1404081b47e786a300e1d0e4db8348e56bd73fe5f169fe8b807ffa37a53683e3aef16ebb6e877d802b86ff1a3d5d3a6f44cb
-DIST go-linux-386-bootstrap-1.13.6.tbz 116991833 BLAKE2B 
e15c4dd3c9bfb233f81d318591df5cb2a73e033a088cd652371f6933b8732c7d5c1292ec8110b23f85b30d5afdea97e798b264c61f5651db08c7ac903e8dcbb6
 SHA512 
114c2f670f21624f0dfefabb99b7263e2133e58c2072ce341a6ea604278e22361779f2e0d3771b7a427e979d7e34f3fc3afcd0f8297d778c3552858ce64ec0c8
 DIST go-linux-386-bootstrap-1.8.tbz 53843745 BLAKE2B 
6bbb6df7ea0f7307386590524261f9ec477e7032171020ac3ed4a09bf9c39075ba4143c466611b0ab28cc4b494dec75063ecb291d2166a82bc7601562e7e3685
 SHA512 
b456f7572d04c805a6fc756647c050460f76e5404dba41963c861c92f1600e9fedafe181a1f69132518065737a88edb4b183ec8c3ca24bc8df31279117e92606
-DIST go-linux-amd64-bootstrap-1.13.6.tbz 116924754 BLAKE2B 
3a28ded6df7e04081c727ad90ad2c8b67e1171aea8cd86b9570d65b275c2a4f1a84084d65a6c3e2efbece5594ba1aad3efc1a2fba36aa2dc68902c5c228c05e8
 SHA512 
3ade49da050d132309357a190628c3ff3a93cffa88f56e1d771f53358c825f210b6870870a96fdbc27717f1b464d904a6f605073377de2f0516cf635a1ce8241
 DIST go-linux-amd64-bootstrap-1.8.tbz 55399105 BLAKE2B 
2a0b101b9dfd9db8c62dfc12418a7b03d6a346de43f7c75a8272d05ca12c36b4844b0f631199c5944a436e50aeeb6cd591323268ecdf33ec2412283efab8c59b
 SHA512 
89d68cfe0e6ce4be690cf52a4a02b17ef2cae3538b057d4690bfd6e93727bcdc1cbc17cba3403e652bb95bffd25d44bdd4efd0014d1d2f019838bde925139f57
-DIST go-linux-arm-bootstrap-1.13.6.tbz 112324731 BLAKE2B 
18166e279b1d30f48e08007df8639775b58081805a7e5799dae14e0b357330cf69997f4a5c844bd10a9eeef44225d52f26197e07d16bb7a42fe5a6185634f4b5
 SHA512 
4d502e2231c1822dacb62cd00b435d52710b1511715385c0b3ddf9f66a446ae90e9b1628b501ba8e1d1a94ca5c28249a323da56f869e88480aa6c249ca001c6e
 DIST go-linux-arm-bootstrap-1.8.tbz 53948103 BLAKE2B 
515051e777ad273999c82f31b8a07ba61b77fbeede761a72b52c0bc3a7b55da013b5061af03a1b9634bf7b44429d7b371b89be85fb9e4f3a23d4d1a3c52bd90b
 SHA512 
98ff0dbdb2aca9e54ea5327c9d31ce389e434a887015ef8555a8e85223a9998075c5013045275fb995a877a8d247704a21d726d46df7097adc0c4aa03af4cd68
-DIST go-linux-arm64-bootstrap-1.13.6.tbz 110290994 BLAKE2B 
dc8985a305d1ef3ae683de9787333f0be3d43d5e642a3b5a315cf003311fb47e55588eb1acf816e5eb4215802832a43445ebecedfd2d680d350cb65e0ce7394f
 SHA512 
bc5f4c4554987a5df735bb96c9b8ae78624169d847ab17ea9b0e969ecaab109311892cf1985d576cd46bf271562b724c6a3796472e197a2c8bb48da0d51128a9
 DIST go-linux-arm64-bootstrap-1.8.tbz 51947002 BLAKE2B 
5899f5d304031eae96b66ed7aa21f5af13b0fdfdcd7a12095bda2eff0f5fe5610135f9370b34681e4c33f33c1e0428a2a09c1c8a581c6b170da223f57cac4607
 SHA512 
adfbe62c5594c267707078bf8afb94a793dfba004c04a1a60f96d023d96c2fc4a6a422dee93a0f3487b1f2e1e117c7c6c607b62126dd5535686aaed88f6659d9
-DIST go-linux-ppc64-bootstrap-1.13.6.tbz 110762916 BLAKE2B 
19d44da5bcd1f4832772469beed509475f9a38ab55b386490faf1b270ffd7cc13d315dfe4746b3b9ca6a324c0e6f2e0144a3146d43bd6210d0479063f8627e34
 SHA512 
2a76c6168d7ba0c7eb020a1af4eccb2a5aee510a1f8e4bb438f5ea769677724c1450209c2fc9a4ccff1084f1a091a568e667ec33a5d537539a09ece426cf82d8
 DIST go-linux-ppc64-bootstrap-1.8.tbz 52315782 BLAKE2B 
6be0a48e8bc4e5fed4d34f8aaa8dfb6ad4d513064275dd940d0f58b25d442b33ad71c11687d317448b93d9c4690f7412e5a6a4553ec5298663409416cec04fbf
 SHA512 
0aa32ac1514055ed9140b8c8330cbdbadfd9da6ad00b60d49b0685473be21e0b6510c31394678e32048f2f38d06a0d575f453c555614664eaef2bf5be6c91734
-DIST go-linux-ppc64le-bootstrap-1.13.6.tbz 110086770 BLAKE2B 
a3f2c1b840f85d7726336285a56d1850fd10f32d90341836a4124a7d181778c3a1cff1d576e4a19a4f3556e961d84fa77202891725b5237121040bdd020af339
 SHA512 
6c4bd54fafea65fbb16a3e6c57b721c10654a5f18879c164f6889a01ec6581b13b450622e83897032ab3ed43a9ff4a7edb6d30c56d41dd23991e8453c1bae359
 DIST go-linux-ppc64le-bootstrap-1.8.tbz 52211575 BLAKE2B 
7a28ec5a381369c4e9415c8360e904c2545380513afd328077c584e8af0bf6bd818aa03e5a58c350cbb98facc1c9dccb02b06adcb27233875497cf5d33265912
 SHA512 
6931d999dd0ee1ff44c4cec48acb27af061f57f87aa74802dcebab78553b46bc8ac732f07fe91e5074dbdd32c55b707994875934bfb12bb4276d71eb1d06c4ba
-DIST go-linux-s390x-bootstrap-1.13.6.tbz 115641137 BLAKE2B 
7ab94a8f7c839ee8fb58673ed5ad00a569a0bae7a13bb214098154aedb1c272837d0903c226cb87b5eb46475589ddcd56e1afafc81ddaea988ce3c3ddca686d1
 SHA512 
794b72f48634a7f7dfb41c64607d66974ef9413a68e39a3959a981e2aaf356fd2cec9e2eb0c25d1b7b3d179c0a72ce053dc9c69463bde0ec893ab472f7076204
 DIST go-linux-s390x-bootstrap-1.8.tbz 57124869 BLAKE2B 
920a176b8f4fc3a816e724324bbb30a383d599e31a0d2093d24797dbcd0e799a662a3589dbb87d2f5dd16df07c4cf8f1e444e87b540ec732746bb025dc9271f8
 SHA512 
d429cae870d66217ab2e07c74209d3031d97baa4f899b4d70ae6283a1a5b1434b037904c4cfca0b2bc798d5ba0b358c3739e000eccbc74809baf564c5686df5a
-DIST go-solaris-amd64-bootstrap-1.13.6.tbz 116214396 BLAKE2B 
3f5d6fcf2131a0944b2846eab2fc069f5d90fea1e7d98e8bd50ba5091d4b2ae01964fa71c29310fa7ff7c990ca0dd1afc83577174a46552d58d611716fedb854
 SHA512 
2d2c281c196729dd97f338fe3bd7396268c0b6fcfc8241b99a939f647201ed39929a5b0a096b9d1f7ffb20f79fd7b3cc25127d7a93f9836f6f0d1e5dbc2c6235
 DIST go-solaris-amd64-bootstrap-1.8.tbz 54926326 BLAKE2B 
0a45312f090d81ebf46fe5950cb65c059e2801394231e715e94145d1f918eb59b10472b2385e57ebd5cfb9eca0ad7290fb118436486b665520bb540970f971ab
 SHA512 
52b849e5b9a940e10de7ba3df0ebdf6e1c5d631de9581d936c9edf8f38e6bb3314acbc2b2d5202b0528fde2a359d52bc0c6f39acf9b1b614725e4b4a947ed10d
 DIST go1.12.13.src.tar.gz 21980338 BLAKE2B 
205bee35a947ccd08f36547530e3de7928f5f3970be89580ddff80f7710dd1dcf4f292c10ec93c27717ce25ce2575f7151129430b80d1fb927872f891166d8db
 SHA512 
a8210ba909c1bb26799625bbf648204dbef5a9f91af323277f76caee489f5912a08e9de686b71fe97d30c7dc171d5f4bcf8a2c2227d02353cfbb7d292c9efc22
 DIST go1.12.14.src.tar.gz 20726032 BLAKE2B 
2defecd29568974c1618ce0da42d9e28ef41904ed3f759b51c7e392ed9dea950a4984efa333e52b413fab3dac8270bb99f60e113712bfc648c4c9af0e19aba7d
 SHA512 
6cd225282fbade8bd7e96789744c7db07f223f5309358ca3768c95c34a099b44bd9ba9adc2ce293a5bbd608237ae6473b86e7bb451db395c647809fc2750dd4c

diff --git a/dev-lang/go/go-1.13.6.ebuild b/dev-lang/go/go-1.13.6.ebuild
index 7f4ad5f7af8..f7c4c78376b 100644
--- a/dev-lang/go/go-1.13.6.ebuild
+++ b/dev-lang/go/go-1.13.6.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,15 @@ 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"
 
-BDEPEND="gccgo? ( >=sys-devel/gcc-5[go] )"
+BDEPEND="|| (
+               dev-lang/go
+               dev-lang/go-bootstrap )"
 RDEPEND="!<dev-go/go-tools-0_pre20150902"
 
 # These test data objects have writable/executable stacks.
@@ -143,43 +122,17 @@ go_cross_compile()
        [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
 }
 
-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"
-}
-
-src_unpack()
+src_compile()
 {
-       if [[ ${PV} = 9999 ]]; then
-               git-r3_src_unpack
+       if has_version -b dev-lang/go; then
+               export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
+       elif has_version -b dev-lang/go-bootstrap; then
+               export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
        else
-               unpack "go${MY_PV}.src.tar.gz"
+               eerror "Go cannot be built without go or go-bootstrap installed"
+               die "Should not be here, please report a bug"
        fi
-       use gccgo || use system-bootstrap ||
-               unpack "go-$(go_os ${CBUILD})-$(go_arch 
${CBUILD})-${BOOTSTRAP_VERSION}.tbz"
-}
 
-src_compile()
-{
-       export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os ${CBUILD})-$(go_arch 
${CBUILD})-bootstrap
-       if use gccgo; then
-               mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die
-               local go_binary=$(gcc-config 
--get-bin-path)/go-$(gcc-major-version)
-               [[ -x ${go_binary} ]] || go_binary=$(
-                       find 
"${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) |
-                               sort -V | tail -n1)
-               [[ -x ${go_binary} ]] ||
-                       die "go-$(gcc-major-version): command not found"
-               ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die
-       elif use system-bootstrap; then
-               export GOROOT_BOOTSTRAP="${EPREFIX}"/usr/lib/go
-       fi
        export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
        export GOROOT="$(pwd)"
        export GOBIN="${GOROOT}/bin"

Reply via email to