1 |
commit: 10ef3cc28c1427c0e822714cbb693f2bd2e806cd |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 2 21:00:29 2018 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 2 21:01:44 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10ef3cc2 |
7 |
|
8 |
dev-lang/go: remove 1.9 |
9 |
|
10 |
Package-Manager: Portage-2.3.49, Repoman-2.3.11 |
11 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
12 |
|
13 |
dev-lang/go/Manifest | 2 - |
14 |
dev-lang/go/go-1.9.6.ebuild | 228 -------------------------------------------- |
15 |
dev-lang/go/go-1.9.7.ebuild | 228 -------------------------------------------- |
16 |
3 files changed, 458 deletions(-) |
17 |
|
18 |
diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest |
19 |
index f5dff19392c..6b982a3eb97 100644 |
20 |
--- a/dev-lang/go/Manifest |
21 |
+++ b/dev-lang/go/Manifest |
22 |
@@ -14,5 +14,3 @@ DIST go1.10.3.src.tar.gz 18323736 BLAKE2B f07ea774378eb25e28fc29ce6d8d7ed84227d4 |
23 |
DIST go1.10.4.src.tar.gz 18331174 BLAKE2B e16998d81d286f132894fefd31f4139f757b7da3dfc829c389e41ef770bed22b3c9ae7bcf190fb4c83da16cf8e8c34681cfdc5bbc786f9036710e821c9bbd483 SHA512 ead2c06d903670ff4530748aa2fa6a1140fdf32cf3b8d74cd7d6e046af73c79fd5f98d2188062e6845e5c0513c080ed7079a210720c30338cb8730b95aede9f5 |
24 |
DIST go1.11.1.src.tar.gz 21097206 BLAKE2B 12303f57a92ec64badffea9e98a0361f48b844d423f3ed454ba4bfdd367425e7b318de1cf9b3e7835585f6dbb01f5c07bfb43adbfcc90a590b35984752ef8d3c SHA512 9c19f40b24f2180563705511a5692932c0db3585939053e6d78eea1f394902d37f05b0386f0e7d0c0266178de7e9bd7b003324ed232ce2e5050c9faafafdd979 |
25 |
DIST go1.11.src.tar.gz 21091932 BLAKE2B 029b1c43b6244ab320b24fccca2bac693a0df0f975da2880a24e85fafbd7d6c836f63c609f1df44fb3eacc1c66c3d147858b7a2b9c0c370bb8fdbc8614b35713 SHA512 2758b7924b4b8cffc30b56fbf039b8e23d1a3c42506ed4997bd64531ba742e2c60e95d1fa70cae2ccda45d1959fadccfd2404af87d962530e4b1d3556c4aaf43 |
26 |
-DIST go1.9.6.src.tar.gz 16397247 BLAKE2B 36c9077177bd7bbe9b40c422c5faf7aa83fdd8a2360051cb026346a9fea35297d892d6c677962c498ea8531c1748d58a55bbb1db7c1cf323a1d65c0b9b8573fd SHA512 f7863a4fe586414c91465a6a82a47097b2593384688a7c68ad3e9981559047b4faf2c134104ad09a64125576dac557809884d9f125d91108dd51746620a368a2 |
27 |
-DIST go1.9.7.src.tar.gz 16401688 BLAKE2B f6fa7b7171595f6bb2b1860c10a34c386b781504b772a37b60ccd613850f916a463bdb1e2bf299c3d8e78e38cbdf0b59e1ee8dfc3597ef888450efb3eb6afc49 SHA512 1ed3375870223a73c9cf94839bfd8894b92f44f9a3ba3b2bec1e9cd8d2212519344c8afcb87a516d6ad3e1ccdc74d9dba225a222bdc5e60f6d73cb474d5f7664 |
28 |
|
29 |
diff --git a/dev-lang/go/go-1.9.6.ebuild b/dev-lang/go/go-1.9.6.ebuild |
30 |
deleted file mode 100644 |
31 |
index 503bf3c4a12..00000000000 |
32 |
--- a/dev-lang/go/go-1.9.6.ebuild |
33 |
+++ /dev/null |
34 |
@@ -1,228 +0,0 @@ |
35 |
-# Copyright 1999-2018 Gentoo Foundation |
36 |
-# Distributed under the terms of the GNU General Public License v2 |
37 |
- |
38 |
-EAPI=6 |
39 |
- |
40 |
-export CBUILD=${CBUILD:-${CHOST}} |
41 |
-export CTARGET=${CTARGET:-${CHOST}} |
42 |
- |
43 |
-MY_PV=${PV/_/} |
44 |
- |
45 |
-inherit toolchain-funcs |
46 |
- |
47 |
-BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist" |
48 |
-BOOTSTRAP_VERSION="bootstrap-1.8" |
49 |
-BOOTSTRAP_URI=" |
50 |
-amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz ) |
51 |
-arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz ) |
52 |
-arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz ) |
53 |
-ppc64? ( |
54 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz |
55 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz |
56 |
-) |
57 |
-s390? ( ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz ) |
58 |
-x86? ( ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz ) |
59 |
-amd64-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz ) |
60 |
-x86-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz ) |
61 |
-x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz ) |
62 |
-x64-solaris? ( ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz ) |
63 |
-" |
64 |
- |
65 |
-case ${PV} in |
66 |
-*9999*) |
67 |
- EGIT_REPO_URI="https://github.com/golang/go.git" |
68 |
- inherit git-r3 |
69 |
- ;; |
70 |
-*) |
71 |
- SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " |
72 |
- S="${WORKDIR}"/go |
73 |
- case ${PV} in |
74 |
- *_beta*|*_rc*) ;; |
75 |
- *) |
76 |
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris" |
77 |
- # The upstream tests fail under portage but pass if the build is |
78 |
- # run according to their documentation [1]. |
79 |
- # I am restricting the tests on released versions until this is |
80 |
- # solved. |
81 |
- # [1] https://golang.org/issues/18442 |
82 |
- RESTRICT="test" |
83 |
- ;; |
84 |
- esac |
85 |
-esac |
86 |
-SRC_URI+="!gccgo? ( ${BOOTSTRAP_URI} )" |
87 |
- |
88 |
-DESCRIPTION="A concurrent garbage collected and typesafe programming language" |
89 |
-HOMEPAGE="https://golang.org" |
90 |
- |
91 |
-LICENSE="BSD" |
92 |
-SLOT="0/${PV}" |
93 |
-IUSE="gccgo" |
94 |
- |
95 |
-DEPEND="gccgo? ( >=sys-devel/gcc-5[go] )" |
96 |
-RDEPEND="!<dev-go/go-tools-0_pre20150902" |
97 |
- |
98 |
-# These test data objects have writable/executable stacks. |
99 |
-QA_EXECSTACK=" |
100 |
- usr/lib/go/src/debug/elf/testdata/*.obj |
101 |
- usr/lib/go/src/go/internal/gccgoimporter/testdata/escapeinfo.gox |
102 |
- usr/lib/go/src/go/internal/gccgoimporter/testdata/unicode.gox |
103 |
- usr/lib/go/src/go/internal/gccgoimporter/testdata/time.gox |
104 |
- " |
105 |
- |
106 |
-# Do not complain about CFLAGS, etc, since Go doesn't use them. |
107 |
-QA_FLAGS_IGNORED='.*' |
108 |
- |
109 |
-REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*" |
110 |
- |
111 |
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail. |
112 |
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" |
113 |
- |
114 |
-# Do not strip this package. Stripping is unsupported upstream and may |
115 |
-# fail. |
116 |
-RESTRICT+=" strip" |
117 |
- |
118 |
-DOCS=( |
119 |
-AUTHORS |
120 |
-CONTRIBUTING.md |
121 |
-CONTRIBUTORS |
122 |
-PATENTS |
123 |
-README.md |
124 |
-) |
125 |
- |
126 |
-go_arch() |
127 |
-{ |
128 |
- # By chance most portage arch names match Go |
129 |
- local portage_arch=$(tc-arch $@) |
130 |
- case "${portage_arch}" in |
131 |
- x86) echo 386;; |
132 |
- x64-*) echo amd64;; |
133 |
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;; |
134 |
- s390) echo s390x ;; |
135 |
- *) echo "${portage_arch}";; |
136 |
- esac |
137 |
-} |
138 |
- |
139 |
-go_arm() |
140 |
-{ |
141 |
- case "${1:-${CHOST}}" in |
142 |
- armv5*) echo 5;; |
143 |
- armv6*) echo 6;; |
144 |
- armv7*) echo 7;; |
145 |
- *) |
146 |
- die "unknown GOARM for ${1:-${CHOST}}" |
147 |
- ;; |
148 |
- esac |
149 |
-} |
150 |
- |
151 |
-go_os() |
152 |
-{ |
153 |
- case "${1:-${CHOST}}" in |
154 |
- *-linux*) echo linux;; |
155 |
- *-darwin*) echo darwin;; |
156 |
- *-freebsd*) echo freebsd;; |
157 |
- *-netbsd*) echo netbsd;; |
158 |
- *-openbsd*) echo openbsd;; |
159 |
- *-solaris*) echo solaris;; |
160 |
- *-cygwin*|*-interix*|*-winnt*) |
161 |
- echo windows |
162 |
- ;; |
163 |
- *) |
164 |
- die "unknown GOOS for ${1:-${CHOST}}" |
165 |
- ;; |
166 |
- esac |
167 |
-} |
168 |
- |
169 |
-go_tuple() |
170 |
-{ |
171 |
- echo "$(go_os $@)_$(go_arch $@)" |
172 |
-} |
173 |
- |
174 |
-go_cross_compile() |
175 |
-{ |
176 |
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] |
177 |
-} |
178 |
- |
179 |
-pkg_pretend() |
180 |
-{ |
181 |
- # make.bash does not understand cross-compiling a cross-compiler |
182 |
- if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then |
183 |
- die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}" |
184 |
- fi |
185 |
-} |
186 |
- |
187 |
-src_unpack() |
188 |
-{ |
189 |
- if [[ ${PV} = 9999 ]]; then |
190 |
- git-r3_src_unpack |
191 |
- fi |
192 |
- default |
193 |
-} |
194 |
- |
195 |
-src_compile() |
196 |
-{ |
197 |
- export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os)-$(go_arch)-bootstrap |
198 |
- if use gccgo; then |
199 |
- mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die |
200 |
- local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version) |
201 |
- [[ -x ${go_binary} ]] || go_binary=$( |
202 |
- find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) | |
203 |
- sort -V | tail -n1) |
204 |
- [[ -x ${go_binary} ]] || |
205 |
- die "go-$(gcc-major-version): command not found" |
206 |
- ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die |
207 |
- fi |
208 |
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go |
209 |
- export GOROOT="$(pwd)" |
210 |
- export GOBIN="${GOROOT}/bin" |
211 |
- |
212 |
- # Go's build script does not use BUILD/HOST/TARGET consistently. :( |
213 |
- export GOHOSTARCH=$(go_arch ${CBUILD}) |
214 |
- export GOHOSTOS=$(go_os ${CBUILD}) |
215 |
- export CC=$(tc-getBUILD_CC) |
216 |
- |
217 |
- export GOARCH=$(go_arch) |
218 |
- export GOOS=$(go_os) |
219 |
- export CC_FOR_TARGET=$(tc-getCC) |
220 |
- export CXX_FOR_TARGET=$(tc-getCXX) |
221 |
- if [[ ${ARCH} == arm ]]; then |
222 |
- export GOARM=$(go_arm) |
223 |
- fi |
224 |
- einfo "GOROOT_BOOTSTRAP is ${GOROOT_BOOTSTRAP}" |
225 |
- |
226 |
- cd src |
227 |
- ./make.bash || die "build failed" |
228 |
-} |
229 |
- |
230 |
-src_test() |
231 |
-{ |
232 |
- go_cross_compile && return 0 |
233 |
- |
234 |
- cd src |
235 |
- PATH="${GOBIN}:${PATH}" \ |
236 |
- ./run.bash -no-rebuild || die "tests failed" |
237 |
-} |
238 |
- |
239 |
-src_install() |
240 |
-{ |
241 |
- local bin_path f x |
242 |
- |
243 |
- dodir /usr/lib/go |
244 |
- |
245 |
- # There is a known issue which requires the source tree to be installed [1]. |
246 |
- # Once this is fixed, we can consider using the doc use flag to control |
247 |
- # installing the doc and src directories. |
248 |
- # [1] https://golang.org/issue/2775 |
249 |
- # |
250 |
- # deliberately use cp to retain permissions |
251 |
- cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go |
252 |
- if go_cross_compile; then |
253 |
- bin_path="bin/$(go_tuple)" |
254 |
- else |
255 |
- bin_path=bin |
256 |
- fi |
257 |
- for x in ${bin_path}/*; do |
258 |
- f=${x##*/} |
259 |
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} |
260 |
- done |
261 |
- einstalldocs |
262 |
-} |
263 |
|
264 |
diff --git a/dev-lang/go/go-1.9.7.ebuild b/dev-lang/go/go-1.9.7.ebuild |
265 |
deleted file mode 100644 |
266 |
index a5edf13b59d..00000000000 |
267 |
--- a/dev-lang/go/go-1.9.7.ebuild |
268 |
+++ /dev/null |
269 |
@@ -1,228 +0,0 @@ |
270 |
-# Copyright 1999-2018 Gentoo Foundation |
271 |
-# Distributed under the terms of the GNU General Public License v2 |
272 |
- |
273 |
-EAPI=6 |
274 |
- |
275 |
-export CBUILD=${CBUILD:-${CHOST}} |
276 |
-export CTARGET=${CTARGET:-${CHOST}} |
277 |
- |
278 |
-MY_PV=${PV/_/} |
279 |
- |
280 |
-inherit toolchain-funcs |
281 |
- |
282 |
-BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist" |
283 |
-BOOTSTRAP_VERSION="bootstrap-1.8" |
284 |
-BOOTSTRAP_URI=" |
285 |
-amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz ) |
286 |
-arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz ) |
287 |
-arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz ) |
288 |
-ppc64? ( |
289 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz |
290 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz |
291 |
-) |
292 |
-s390? ( ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz ) |
293 |
-x86? ( ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz ) |
294 |
-amd64-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz ) |
295 |
-x86-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz ) |
296 |
-x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz ) |
297 |
-x64-solaris? ( ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz ) |
298 |
-" |
299 |
- |
300 |
-case ${PV} in |
301 |
-*9999*) |
302 |
- EGIT_REPO_URI="https://github.com/golang/go.git" |
303 |
- inherit git-r3 |
304 |
- ;; |
305 |
-*) |
306 |
- SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " |
307 |
- S="${WORKDIR}"/go |
308 |
- case ${PV} in |
309 |
- *_beta*|*_rc*) ;; |
310 |
- *) |
311 |
- KEYWORDS="-* amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris" |
312 |
- # The upstream tests fail under portage but pass if the build is |
313 |
- # run according to their documentation [1]. |
314 |
- # I am restricting the tests on released versions until this is |
315 |
- # solved. |
316 |
- # [1] https://golang.org/issues/18442 |
317 |
- RESTRICT="test" |
318 |
- ;; |
319 |
- esac |
320 |
-esac |
321 |
-SRC_URI+="!gccgo? ( ${BOOTSTRAP_URI} )" |
322 |
- |
323 |
-DESCRIPTION="A concurrent garbage collected and typesafe programming language" |
324 |
-HOMEPAGE="https://golang.org" |
325 |
- |
326 |
-LICENSE="BSD" |
327 |
-SLOT="0/${PV}" |
328 |
-IUSE="gccgo" |
329 |
- |
330 |
-DEPEND="gccgo? ( >=sys-devel/gcc-5[go] )" |
331 |
-RDEPEND="!<dev-go/go-tools-0_pre20150902" |
332 |
- |
333 |
-# These test data objects have writable/executable stacks. |
334 |
-QA_EXECSTACK=" |
335 |
- usr/lib/go/src/debug/elf/testdata/*.obj |
336 |
- usr/lib/go/src/go/internal/gccgoimporter/testdata/escapeinfo.gox |
337 |
- usr/lib/go/src/go/internal/gccgoimporter/testdata/unicode.gox |
338 |
- usr/lib/go/src/go/internal/gccgoimporter/testdata/time.gox |
339 |
- " |
340 |
- |
341 |
-# Do not complain about CFLAGS, etc, since Go doesn't use them. |
342 |
-QA_FLAGS_IGNORED='.*' |
343 |
- |
344 |
-REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*" |
345 |
- |
346 |
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail. |
347 |
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" |
348 |
- |
349 |
-# Do not strip this package. Stripping is unsupported upstream and may |
350 |
-# fail. |
351 |
-RESTRICT+=" strip" |
352 |
- |
353 |
-DOCS=( |
354 |
-AUTHORS |
355 |
-CONTRIBUTING.md |
356 |
-CONTRIBUTORS |
357 |
-PATENTS |
358 |
-README.md |
359 |
-) |
360 |
- |
361 |
-go_arch() |
362 |
-{ |
363 |
- # By chance most portage arch names match Go |
364 |
- local portage_arch=$(tc-arch $@) |
365 |
- case "${portage_arch}" in |
366 |
- x86) echo 386;; |
367 |
- x64-*) echo amd64;; |
368 |
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;; |
369 |
- s390) echo s390x ;; |
370 |
- *) echo "${portage_arch}";; |
371 |
- esac |
372 |
-} |
373 |
- |
374 |
-go_arm() |
375 |
-{ |
376 |
- case "${1:-${CHOST}}" in |
377 |
- armv5*) echo 5;; |
378 |
- armv6*) echo 6;; |
379 |
- armv7*) echo 7;; |
380 |
- *) |
381 |
- die "unknown GOARM for ${1:-${CHOST}}" |
382 |
- ;; |
383 |
- esac |
384 |
-} |
385 |
- |
386 |
-go_os() |
387 |
-{ |
388 |
- case "${1:-${CHOST}}" in |
389 |
- *-linux*) echo linux;; |
390 |
- *-darwin*) echo darwin;; |
391 |
- *-freebsd*) echo freebsd;; |
392 |
- *-netbsd*) echo netbsd;; |
393 |
- *-openbsd*) echo openbsd;; |
394 |
- *-solaris*) echo solaris;; |
395 |
- *-cygwin*|*-interix*|*-winnt*) |
396 |
- echo windows |
397 |
- ;; |
398 |
- *) |
399 |
- die "unknown GOOS for ${1:-${CHOST}}" |
400 |
- ;; |
401 |
- esac |
402 |
-} |
403 |
- |
404 |
-go_tuple() |
405 |
-{ |
406 |
- echo "$(go_os $@)_$(go_arch $@)" |
407 |
-} |
408 |
- |
409 |
-go_cross_compile() |
410 |
-{ |
411 |
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] |
412 |
-} |
413 |
- |
414 |
-pkg_pretend() |
415 |
-{ |
416 |
- # make.bash does not understand cross-compiling a cross-compiler |
417 |
- if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then |
418 |
- die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}" |
419 |
- fi |
420 |
-} |
421 |
- |
422 |
-src_unpack() |
423 |
-{ |
424 |
- if [[ ${PV} = 9999 ]]; then |
425 |
- git-r3_src_unpack |
426 |
- fi |
427 |
- default |
428 |
-} |
429 |
- |
430 |
-src_compile() |
431 |
-{ |
432 |
- export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os)-$(go_arch)-bootstrap |
433 |
- if use gccgo; then |
434 |
- mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die |
435 |
- local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version) |
436 |
- [[ -x ${go_binary} ]] || go_binary=$( |
437 |
- find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) | |
438 |
- sort -V | tail -n1) |
439 |
- [[ -x ${go_binary} ]] || |
440 |
- die "go-$(gcc-major-version): command not found" |
441 |
- ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die |
442 |
- fi |
443 |
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go |
444 |
- export GOROOT="$(pwd)" |
445 |
- export GOBIN="${GOROOT}/bin" |
446 |
- |
447 |
- # Go's build script does not use BUILD/HOST/TARGET consistently. :( |
448 |
- export GOHOSTARCH=$(go_arch ${CBUILD}) |
449 |
- export GOHOSTOS=$(go_os ${CBUILD}) |
450 |
- export CC=$(tc-getBUILD_CC) |
451 |
- |
452 |
- export GOARCH=$(go_arch) |
453 |
- export GOOS=$(go_os) |
454 |
- export CC_FOR_TARGET=$(tc-getCC) |
455 |
- export CXX_FOR_TARGET=$(tc-getCXX) |
456 |
- if [[ ${ARCH} == arm ]]; then |
457 |
- export GOARM=$(go_arm) |
458 |
- fi |
459 |
- einfo "GOROOT_BOOTSTRAP is ${GOROOT_BOOTSTRAP}" |
460 |
- |
461 |
- cd src |
462 |
- ./make.bash || die "build failed" |
463 |
-} |
464 |
- |
465 |
-src_test() |
466 |
-{ |
467 |
- go_cross_compile && return 0 |
468 |
- |
469 |
- cd src |
470 |
- PATH="${GOBIN}:${PATH}" \ |
471 |
- ./run.bash -no-rebuild || die "tests failed" |
472 |
-} |
473 |
- |
474 |
-src_install() |
475 |
-{ |
476 |
- local bin_path f x |
477 |
- |
478 |
- dodir /usr/lib/go |
479 |
- |
480 |
- # There is a known issue which requires the source tree to be installed [1]. |
481 |
- # Once this is fixed, we can consider using the doc use flag to control |
482 |
- # installing the doc and src directories. |
483 |
- # [1] https://golang.org/issue/2775 |
484 |
- # |
485 |
- # deliberately use cp to retain permissions |
486 |
- cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go |
487 |
- if go_cross_compile; then |
488 |
- bin_path="bin/$(go_tuple)" |
489 |
- else |
490 |
- bin_path=bin |
491 |
- fi |
492 |
- for x in ${bin_path}/*; do |
493 |
- f=${x##*/} |
494 |
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} |
495 |
- done |
496 |
- einstalldocs |
497 |
-} |