Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 684652
Collapse All | Expand All

(-)a/dev-lang/go/go-9999.ebuild (-5 lines)
Lines 145-154 go_cross_compile() Link Here
145
145
146
pkg_pretend()
146
pkg_pretend()
147
{
147
{
148
	# make.bash does not understand cross-compiling a cross-compiler
149
	if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then
150
		die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}"
151
	fi
152
	[[ ${MERGE_TYPE} != binary ]] &&
148
	[[ ${MERGE_TYPE} != binary ]] &&
153
		use system-bootstrap && ! has_version -b "dev-lang/go" &&
149
		use system-bootstrap && ! has_version -b "dev-lang/go" &&
154
		die "dev-lang/go must be installed to use the system-bootstrap use flag"
150
		die "dev-lang/go must be installed to use the system-bootstrap use flag"
155
--
156
dev-lang/go-bootstrap/Manifest                |  9 +++++
151
dev-lang/go-bootstrap/Manifest                |  9 +++++
157
.../go-bootstrap/go-bootstrap-1.13.6.ebuild   | 35 +++++++++++++++++++
152
.../go-bootstrap/go-bootstrap-1.13.6.ebuild   | 35 +++++++++++++++++++
158
dev-lang/go-bootstrap/metadata.xml            |  8 +++++
153
dev-lang/go-bootstrap/metadata.xml            |  8 +++++
159
3 files changed, 52 insertions(+)
154
3 files changed, 52 insertions(+)
160
create mode 100644 dev-lang/go-bootstrap/Manifest
155
create mode 100644 dev-lang/go-bootstrap/Manifest
161
create mode 100644 dev-lang/go-bootstrap/go-bootstrap-1.13.6.ebuild
156
create mode 100644 dev-lang/go-bootstrap/go-bootstrap-1.13.6.ebuild
162
create mode 100644 dev-lang/go-bootstrap/metadata.xml
157
create mode 100644 dev-lang/go-bootstrap/metadata.xml
(-)a/dev-lang/go-bootstrap/Manifest (+9 lines)
Line 0 Link Here
1
DIST go-darwin-amd64-bootstrap-1.13.6.tbz 119340642 BLAKE2B 93d1d2fdd24e6a56d9583d90e64788fe28284302d1e1346a2009dcba8f80917bf113398f269922277bd066b068f62fffa146523bd57a5b7b178f0008f3c4d154 SHA512 1f27885d454963e88f73d3b6ef4d0167a5df6ad81c4725fb3b2be19e2c7bad13ef36ff6c100b8788fa2085285e462f0d2b3dfaf8bd67b0804a137969054cb5ae
2
DIST go-linux-386-bootstrap-1.13.6.tbz 116991833 BLAKE2B e15c4dd3c9bfb233f81d318591df5cb2a73e033a088cd652371f6933b8732c7d5c1292ec8110b23f85b30d5afdea97e798b264c61f5651db08c7ac903e8dcbb6 SHA512 114c2f670f21624f0dfefabb99b7263e2133e58c2072ce341a6ea604278e22361779f2e0d3771b7a427e979d7e34f3fc3afcd0f8297d778c3552858ce64ec0c8
3
DIST go-linux-amd64-bootstrap-1.13.6.tbz 116924754 BLAKE2B 3a28ded6df7e04081c727ad90ad2c8b67e1171aea8cd86b9570d65b275c2a4f1a84084d65a6c3e2efbece5594ba1aad3efc1a2fba36aa2dc68902c5c228c05e8 SHA512 3ade49da050d132309357a190628c3ff3a93cffa88f56e1d771f53358c825f210b6870870a96fdbc27717f1b464d904a6f605073377de2f0516cf635a1ce8241
4
DIST go-linux-arm-bootstrap-1.13.6.tbz 112324731 BLAKE2B 18166e279b1d30f48e08007df8639775b58081805a7e5799dae14e0b357330cf69997f4a5c844bd10a9eeef44225d52f26197e07d16bb7a42fe5a6185634f4b5 SHA512 4d502e2231c1822dacb62cd00b435d52710b1511715385c0b3ddf9f66a446ae90e9b1628b501ba8e1d1a94ca5c28249a323da56f869e88480aa6c249ca001c6e
5
DIST go-linux-arm64-bootstrap-1.13.6.tbz 110290994 BLAKE2B dc8985a305d1ef3ae683de9787333f0be3d43d5e642a3b5a315cf003311fb47e55588eb1acf816e5eb4215802832a43445ebecedfd2d680d350cb65e0ce7394f SHA512 bc5f4c4554987a5df735bb96c9b8ae78624169d847ab17ea9b0e969ecaab109311892cf1985d576cd46bf271562b724c6a3796472e197a2c8bb48da0d51128a9
6
DIST go-linux-ppc64-bootstrap-1.13.6.tbz 110762916 BLAKE2B 19d44da5bcd1f4832772469beed509475f9a38ab55b386490faf1b270ffd7cc13d315dfe4746b3b9ca6a324c0e6f2e0144a3146d43bd6210d0479063f8627e34 SHA512 2a76c6168d7ba0c7eb020a1af4eccb2a5aee510a1f8e4bb438f5ea769677724c1450209c2fc9a4ccff1084f1a091a568e667ec33a5d537539a09ece426cf82d8
7
DIST go-linux-ppc64le-bootstrap-1.13.6.tbz 110086770 BLAKE2B a3f2c1b840f85d7726336285a56d1850fd10f32d90341836a4124a7d181778c3a1cff1d576e4a19a4f3556e961d84fa77202891725b5237121040bdd020af339 SHA512 6c4bd54fafea65fbb16a3e6c57b721c10654a5f18879c164f6889a01ec6581b13b450622e83897032ab3ed43a9ff4a7edb6d30c56d41dd23991e8453c1bae359
8
DIST go-linux-s390x-bootstrap-1.13.6.tbz 115641137 BLAKE2B 7ab94a8f7c839ee8fb58673ed5ad00a569a0bae7a13bb214098154aedb1c272837d0903c226cb87b5eb46475589ddcd56e1afafc81ddaea988ce3c3ddca686d1 SHA512 794b72f48634a7f7dfb41c64607d66974ef9413a68e39a3959a981e2aaf356fd2cec9e2eb0c25d1b7b3d179c0a72ce053dc9c69463bde0ec893ab472f7076204
9
DIST go-solaris-amd64-bootstrap-1.13.6.tbz 116214396 BLAKE2B 3f5d6fcf2131a0944b2846eab2fc069f5d90fea1e7d98e8bd50ba5091d4b2ae01964fa71c29310fa7ff7c990ca0dd1afc83577174a46552d58d611716fedb854 SHA512 2d2c281c196729dd97f338fe3bd7396268c0b6fcfc8241b99a939f647201ed39929a5b0a096b9d1f7ffb20f79fd7b3cc25127d7a93f9836f6f0d1e5dbc2c6235
(-)a/dev-lang/go-bootstrap/go-bootstrap-1.13.6.ebuild (+35 lines)
Line 0 Link Here
1
# Copyright 2020 Gentoo Authors
2
# Distributed under the terms of the GNU General Public License v2
3
4
EAPI=7
5
6
DESCRIPTION="Go bootstrap"
7
HOMEPAGE="https://golang.org"
8
BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist"
9
SRC_URI="
10
	amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-bootstrap-${PV}.tbz )
11
	arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-bootstrap-${PV}.tbz )
12
	arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-bootstrap-${PV}.tbz )
13
	ppc64? (
14
		big-endian? ( ${BOOTSTRAP_DIST}/go-linux-ppc64-bootstrap-${PV}.tbz )
15
		!big-endian? ( ${BOOTSTRAP_DIST}/go-linux-ppc64le-bootstrap-${PV}.tbz )
16
	)
17
	s390? ( ${BOOTSTRAP_DIST}/go-linux-s390x-bootstrap-${PV}.tbz )
18
	x86? ( ${BOOTSTRAP_DIST}/go-linux-386-bootstrap-${PV}.tbz )
19
	x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-bootstrap-${PV}.tbz )
20
	x64-solaris? ( ${BOOTSTRAP_DIST}/go-solaris-amd64-bootstrap-${PV}.tbz )
21
"
22
23
LICENSE="BSD"
24
SLOT="0"
25
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
26
IUSE="big-endian"
27
RESTRICT="strip"
28
QA_PREBUILT="*"
29
30
S="${WORKDIR}"
31
32
src_install() {
33
	dodir /usr/lib
34
	mv "${WORKDIR}"/go-*-bootstrap "${ED}/usr/lib/go-bootstrap" || die
35
}
(-)a/dev-lang/go-bootstrap/metadata.xml (-1 / +8 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3
<pkgmetadata>
4
	<maintainer type="person">
5
		<email>williamh@gentoo.org</email>
6
		<name>William Hubbs</name>
7
	</maintainer>
8
</pkgmetadata>
0
dev-lang/go-bootstrap
9
dev-lang/go-bootstrap
1
--
2
dev-lang/go/go-9999.ebuild | 52 +++++++++++---------------------------
10
dev-lang/go/go-9999.ebuild | 52 +++++++++++---------------------------
3
1 file changed, 15 insertions(+), 37 deletions(-)
11
1 file changed, 15 insertions(+), 37 deletions(-)
(-)a/dev-lang/go/go-9999.ebuild (-37 / +15 lines)
Lines 1-4 Link Here
1
# Copyright 1999-2019 Gentoo Authors
1
# Copyright 1999-2020 Gentoo Authors
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
3
4
EAPI=7
4
EAPI=7
Lines 10-29 MY_PV=${PV/_/} Link Here
10
10
11
inherit toolchain-funcs
11
inherit toolchain-funcs
12
12
13
BOOTSTRAP_VERSION="bootstrap-1.13.6"
14
BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist"
15
BOOTSTRAP_URI="
16
	${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz
17
	${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz
18
	${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz
19
	${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz
20
	${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz
21
	${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz
22
	${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz
23
	${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz
24
	${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz
25
"
26
27
case ${PV}  in
13
case ${PV}  in
28
*9999*)
14
*9999*)
29
	EGIT_REPO_URI="https://github.com/golang/go.git"
15
	EGIT_REPO_URI="https://github.com/golang/go.git"
Lines 46-67 case ${PV} in Link Here
46
	esac
32
	esac
47
esac
33
esac
48
34
49
# If gccgo or a previously installed version of dev-lang/go is not being
50
# used to build Go, there is no way to know the architecture or operating system
51
# of the build machine, so we need to download all of our bootstrap
52
# archives to allow this ebuild to work under crossdev.
53
#
54
# https://bugs.gentoo.org/671394
55
SRC_URI+="!gccgo? ( !system-bootstrap? ( ${BOOTSTRAP_URI} ) )"
56
57
DESCRIPTION="A concurrent garbage collected and typesafe programming language"
35
DESCRIPTION="A concurrent garbage collected and typesafe programming language"
58
HOMEPAGE="https://golang.org"
36
HOMEPAGE="https://golang.org"
59
37
60
LICENSE="BSD"
38
LICENSE="BSD"
61
SLOT="0/${PV}"
39
SLOT="0/${PV}"
62
IUSE="gccgo system-bootstrap"
40
IUSE="gccgo"
63
41
64
BDEPEND="gccgo? ( >=sys-devel/gcc-5[go] )"
42
BDEPEND="gccgo? ( >=sys-devel/gcc-5[go(-)] )
43
	!gccgo? ( || (
44
		dev-lang/go
45
		dev-lang/go-bootstrap
46
	) )"
65
RDEPEND="!<dev-go/go-tools-0_pre20150902"
47
RDEPEND="!<dev-go/go-tools-0_pre20150902"
66
48
67
# These test data objects have writable/executable stacks.
49
# These test data objects have writable/executable stacks.
Lines 143-155 go_cross_compile() Link Here
143
	[[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
125
	[[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
144
}
126
}
145
127
146
pkg_pretend()
147
{
148
	[[ ${MERGE_TYPE} != binary ]] &&
149
		use system-bootstrap && ! has_version -b "dev-lang/go" &&
150
		die "dev-lang/go must be installed to use the system-bootstrap use flag"
151
}
152
153
src_unpack()
128
src_unpack()
154
{
129
{
155
	if [[ ${PV} = 9999 ]]; then
130
	if [[ ${PV} = 9999 ]]; then
Lines 157-170 src_unpack() Link Here
157
	else
132
	else
158
		unpack "go${MY_PV}.src.tar.gz"
133
		unpack "go${MY_PV}.src.tar.gz"
159
	fi
134
	fi
160
	use gccgo || use system-bootstrap ||
161
		unpack "go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-${BOOTSTRAP_VERSION}.tbz"
162
}
135
}
163
136
164
src_compile()
137
src_compile()
165
{
138
{
166
	export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-bootstrap
167
	if use gccgo; then
139
	if use gccgo; then
140
		export GOROOT_BOOTSTRAP="${WORKDIR}/go-bootstrap"
168
		mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die
141
		mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die
169
		local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version)
142
		local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version)
170
		[[ -x ${go_binary} ]] || go_binary=$(
143
		[[ -x ${go_binary} ]] || go_binary=$(
Lines 173-181 src_compile() Link Here
173
		[[ -x ${go_binary} ]] ||
146
		[[ -x ${go_binary} ]] ||
174
			die "go-$(gcc-major-version): command not found"
147
			die "go-$(gcc-major-version): command not found"
175
		ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die
148
		ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die
176
	elif use system-bootstrap; then
149
	elif has_version -b dev-lang/go; then
177
		export GOROOT_BOOTSTRAP="${EPREFIX}"/usr/lib/go
150
		:
151
	elif has_version -b dev-lang/go-bootstrap; then
152
		export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
153
	else
154
		die "Should not be here, please report a bug"
178
	fi
155
	fi
156
179
	export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
157
	export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
180
	export GOROOT="$(pwd)"
158
	export GOROOT="$(pwd)"
181
	export GOBIN="${GOROOT}/bin"
159
	export GOBIN="${GOROOT}/bin"

Return to bug 684652