Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/go/
Date: Wed, 31 Jul 2019 17:54:20
Message-Id: 1564595585.93dbdde85ba497a34e3f5673b5e3193e25d427e3.williamh@gentoo
1 commit: 93dbdde85ba497a34e3f5673b5e3193e25d427e3
2 Author: William Hubbs <william.hubbs <AT> sony <DOT> com>
3 AuthorDate: Wed Jul 31 17:52:20 2019 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 31 17:53:05 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93dbdde8
7
8 dev-lang/go: sync live
9
10 Copyright: Sony Interactive Entertainment Inc.
11 Package-Manager: Portage-2.3.69, Repoman-2.3.16
12 Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
13
14 dev-lang/go/go-9999.ebuild | 19 ++++++++++++-------
15 1 file changed, 12 insertions(+), 7 deletions(-)
16
17 diff --git a/dev-lang/go/go-9999.ebuild b/dev-lang/go/go-9999.ebuild
18 index 8c892831770..a6151a8c829 100644
19 --- a/dev-lang/go/go-9999.ebuild
20 +++ b/dev-lang/go/go-9999.ebuild
21 @@ -48,20 +48,20 @@ case ${PV} in
22 esac
23 esac
24
25 -# If gccgo is not being used to build Go, there is no way to know the
26 -# architecture or operating system of the build machine, so we need to
27 -# download all of our bootstrap archives to allow this ebuild to work
28 -# under crossdev.
29 +# If gccgo or a previously installed version of dev-lang/go is not being
30 +# used to build Go, there is no way to know the architecture or operating system
31 +# of the build machine, so we need to download all of our bootstrap
32 +# archives to allow this ebuild to work under crossdev.
33 #
34 # https://bugs.gentoo.org/671394
35 -SRC_URI+="!gccgo? ( ${BOOTSTRAP_URI} )"
36 +SRC_URI+="!gccgo? ( !system-bootstrap? ( ${BOOTSTRAP_URI} ) )"
37
38 DESCRIPTION="A concurrent garbage collected and typesafe programming language"
39 HOMEPAGE="https://golang.org"
40
41 LICENSE="BSD"
42 SLOT="0/${PV}"
43 -IUSE="gccgo"
44 +IUSE="gccgo system-bootstrap"
45
46 BDEPEND="gccgo? ( >=sys-devel/gcc-5[go] )"
47 RDEPEND="!<dev-go/go-tools-0_pre20150902"
48 @@ -151,6 +151,9 @@ pkg_pretend()
49 if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then
50 die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}"
51 fi
52 + [[ ${MERGE_TYPE} != binary ]] &&
53 + use system-bootstrap && ! has_version "dev-lang/go" &&
54 + die "dev-lang/go must be installed to use the system-bootstrap use flag"
55 }
56
57 src_unpack()
58 @@ -160,7 +163,7 @@ src_unpack()
59 else
60 unpack "go${MY_PV}.src.tar.gz"
61 fi
62 - use gccgo ||
63 + use gccgo || use system-bootstrap ||
64 unpack "go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-${BOOTSTRAP_VERSION}.tbz"
65 }
66
67 @@ -176,6 +179,8 @@ src_compile()
68 [[ -x ${go_binary} ]] ||
69 die "go-$(gcc-major-version): command not found"
70 ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die
71 + elif use system-bootstrap; then
72 + export GOROOT_BOOTSTRAP="${EPREFIX}"/usr/lib/go
73 fi
74 export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
75 export GOROOT="$(pwd)"