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: Fri, 07 Aug 2020 17:15:21
Message-Id: 1596820510.a021d8bf00b7cf1a4a4cab5855ecc8c3689bae5a.williamh@gentoo
1 commit: a021d8bf00b7cf1a4a4cab5855ecc8c3689bae5a
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 7 17:12:13 2020 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 7 17:15:10 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a021d8bf
7
8 dev-lang/go: remove vulnerable versions
9
10 Bug: https://bugs.gentoo.org/736156
11 Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
12
13 dev-lang/go/Manifest | 4 -
14 dev-lang/go/go-1.13.13.ebuild | 197 ------------------------------------------
15 dev-lang/go/go-1.13.14.ebuild | 197 ------------------------------------------
16 dev-lang/go/go-1.14.5.ebuild | 188 ----------------------------------------
17 dev-lang/go/go-1.14.6.ebuild | 188 ----------------------------------------
18 5 files changed, 774 deletions(-)
19
20 diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
21 index 6efb444dc1c..f1b7177e34e 100644
22 --- a/dev-lang/go/Manifest
23 +++ b/dev-lang/go/Manifest
24 @@ -10,9 +10,5 @@ DIST go-linux-ppc64le-bootstrap-1.8.tbz 52211575 BLAKE2B 7a28ec5a381369c4e9415c8
25 DIST go-linux-s390x-bootstrap-1.8.tbz 57124869 BLAKE2B 920a176b8f4fc3a816e724324bbb30a383d599e31a0d2093d24797dbcd0e799a662a3589dbb87d2f5dd16df07c4cf8f1e444e87b540ec732746bb025dc9271f8 SHA512 d429cae870d66217ab2e07c74209d3031d97baa4f899b4d70ae6283a1a5b1434b037904c4cfca0b2bc798d5ba0b358c3739e000eccbc74809baf564c5686df5a
26 DIST go-solaris-amd64-bootstrap-1.8.tbz 54926326 BLAKE2B 0a45312f090d81ebf46fe5950cb65c059e2801394231e715e94145d1f918eb59b10472b2385e57ebd5cfb9eca0ad7290fb118436486b665520bb540970f971ab SHA512 52b849e5b9a940e10de7ba3df0ebdf6e1c5d631de9581d936c9edf8f38e6bb3314acbc2b2d5202b0528fde2a359d52bc0c6f39acf9b1b614725e4b4a947ed10d
27 DIST go1.12.17.src.tar.gz 20725913 BLAKE2B 2eef7374195302656268a42409619445dfeb3ede1f9218ae4eab195916876b97f7510cc62585a0bfdd9f86dddf8a74000032a84b29bc9891d84fc69db94f0274 SHA512 069f8f445d9d2268ebb14b2446fab34843d56283c04561636d122fd8b4c1ea0b63640a84437db7a7be71039440ffe170cd3f8025b03b0acf95f2a56fa2febec6
28 -DIST go1.13.13.src.tar.gz 21704330 BLAKE2B 462a8c7a438c5638158645d012bcf361f5033b94209ee3b89b15b066c6a92ae7b632d9fa295be2bfd2ed20398471a3e9531eccea1c67f511901f6a7f77242557 SHA512 1bee57e6b5d7154e7d93ccf33b9bd8ccacb005d3de1f0dc2272d4d431ab171707a57fe81d65ff17f6016f5c94d5bec6618c13174d43538f7c370d923958529c3
29 -DIST go1.13.14.src.tar.gz 21704891 BLAKE2B fff860b45b296359cb226f123279b3351f654336d267f8d60607fb0eb9f555e99d2e8250331510ddcf40de43235a864867af4b16db153b3f0827a3ccff045c19 SHA512 49dd28394333eaa7676fdf530d2fc18a645546c814fbe9247c9613e36529eb23634816b5c84574fea1cd9191fa86e684130e75dc70545344851c6b47c846558d
30 DIST go1.13.15.src.tar.gz 21705183 BLAKE2B eac8c6113dd6cef164cc5368732c2dce26f200e309c728ca71b4c312ace465382b8cc1dd8fb216bdf927211d6cb26c21090a9ac9c9ef2d7ac1b16c85feac0e0c SHA512 35d3e7aaef1b0fc6ab684bb7352da3a23194115331ba7d1543225c35939cafcd437f454519aac38182cb8f222723ed9a297f9da566075b5e4079be26952a21e3
31 -DIST go1.14.5.src.tar.gz 22533577 BLAKE2B 4e07fd46f977e14cf493d92a3c3e2d61c8eadf8f6e07b2de3eec7442d2ee0c736ac99f75eaaf405a48d1751144f4ae770692c3a1db9bc8e27e7c48e89fd74540 SHA512 1019b86304925fe60ebd81289349c4582e2e5932dc3ed35d9dc7b36ac293ee583ab6dcf3ae9a96f0f60274f24c295fb0662a8f4d06b717f624fa695c2b40e29c
32 -DIST go1.14.6.src.tar.gz 22534714 BLAKE2B 9dacb150108dc30fe3600c6fdc1df3cd2c36f701518f402d2ad8cd2e4ba51203176e5097adf66ac9223181197b1bea7de625933c570567d9e7dddf485bc2c204 SHA512 5c865c8272fb0dc8eab1514732b0200dbc867276512714dd30afc658a0d2afac6bd758e00c6f576d8d254e411418a52a564c895399b56cfe06c2b1785271a8fd
33 DIST go1.14.7.src.tar.gz 22534747 BLAKE2B ab43abeec9d636dd88eaa10dc210f5d11d487df35238a00548e1f56a86bdf2375e7c180ee6e1cea53591528714fa70333e3336db61eacfdeb5f51b2d5ea86a45 SHA512 3f1133c66d7795ceb6c5793db90616613244d7561abaef6b059602992c0b7a53b6b6ebbcf69add4769a58542e9dc55871bcfe3d64d4cd9f3569bd435ade86dee
34
35 diff --git a/dev-lang/go/go-1.13.13.ebuild b/dev-lang/go/go-1.13.13.ebuild
36 deleted file mode 100644
37 index 1f323d04c2e..00000000000
38 --- a/dev-lang/go/go-1.13.13.ebuild
39 +++ /dev/null
40 @@ -1,197 +0,0 @@
41 -# Copyright 1999-2020 Gentoo Authors
42 -# Distributed under the terms of the GNU General Public License v2
43 -
44 -EAPI=7
45 -
46 -export CBUILD=${CBUILD:-${CHOST}}
47 -export CTARGET=${CTARGET:-${CHOST}}
48 -
49 -MY_PV=${PV/_/}
50 -
51 -inherit toolchain-funcs
52 -
53 -case ${PV} in
54 -*9999*)
55 - EGIT_REPO_URI="https://github.com/golang/go.git"
56 - inherit git-r3
57 - ;;
58 -*)
59 - SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
60 - S="${WORKDIR}"/go
61 - case ${PV} in
62 - *_beta*|*_rc*) ;;
63 - *)
64 - KEYWORDS="-* amd64 arm arm64 ppc64 ~s390 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
65 - # The upstream tests fail under portage but pass if the build is
66 - # run according to their documentation [1].
67 - # I am restricting the tests on released versions until this is
68 - # solved.
69 - # [1] https://golang.org/issues/18442
70 - RESTRICT="test"
71 - ;;
72 - esac
73 -esac
74 -
75 -DESCRIPTION="A concurrent garbage collected and typesafe programming language"
76 -HOMEPAGE="https://golang.org"
77 -
78 -LICENSE="BSD"
79 -SLOT="0/${PV}"
80 -
81 -BDEPEND="|| (
82 - dev-lang/go
83 - dev-lang/go-bootstrap )"
84 -RDEPEND="!<dev-go/go-tools-0_pre20150902"
85 -
86 -# These test data objects have writable/executable stacks.
87 -QA_EXECSTACK="
88 - usr/lib/go/src/debug/elf/testdata/*.obj
89 - usr/lib/go/src/*.gox
90 - "
91 -
92 -# Do not complain about CFLAGS, etc, since Go doesn't use them.
93 -QA_FLAGS_IGNORED='.*'
94 -
95 -REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*"
96 -
97 -# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
98 -QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
99 -
100 -# Do not strip this package. Stripping is unsupported upstream and may
101 -# fail.
102 -RESTRICT+=" strip"
103 -
104 -DOCS=(
105 -AUTHORS
106 -CONTRIBUTING.md
107 -CONTRIBUTORS
108 -PATENTS
109 -README.md
110 -)
111 -
112 -go_arch()
113 -{
114 - # By chance most portage arch names match Go
115 - local portage_arch=$(tc-arch $@)
116 - case "${portage_arch}" in
117 - x86) echo 386;;
118 - x64-*) echo amd64;;
119 - ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
120 - s390) echo s390x ;;
121 - *) echo "${portage_arch}";;
122 - esac
123 -}
124 -
125 -go_arm()
126 -{
127 - case "${1:-${CHOST}}" in
128 - armv5*) echo 5;;
129 - armv6*) echo 6;;
130 - armv7*) echo 7;;
131 - *)
132 - die "unknown GOARM for ${1:-${CHOST}}"
133 - ;;
134 - esac
135 -}
136 -
137 -go_os()
138 -{
139 - case "${1:-${CHOST}}" in
140 - *-linux*) echo linux;;
141 - *-darwin*) echo darwin;;
142 - *-freebsd*) echo freebsd;;
143 - *-netbsd*) echo netbsd;;
144 - *-openbsd*) echo openbsd;;
145 - *-solaris*) echo solaris;;
146 - *-cygwin*|*-interix*|*-winnt*)
147 - echo windows
148 - ;;
149 - *)
150 - die "unknown GOOS for ${1:-${CHOST}}"
151 - ;;
152 - esac
153 -}
154 -
155 -go_tuple()
156 -{
157 - echo "$(go_os $@)_$(go_arch $@)"
158 -}
159 -
160 -go_cross_compile()
161 -{
162 - [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
163 -}
164 -
165 -src_compile()
166 -{
167 - if has_version -b dev-lang/go; then
168 - export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
169 - elif has_version -b dev-lang/go-bootstrap; then
170 - export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
171 - else
172 - eerror "Go cannot be built without go or go-bootstrap installed"
173 - die "Should not be here, please report a bug"
174 - fi
175 -
176 - export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
177 - export GOROOT="$(pwd)"
178 - export GOBIN="${GOROOT}/bin"
179 -
180 - # Go's build script does not use BUILD/HOST/TARGET consistently. :(
181 - export GOHOSTARCH=$(go_arch ${CBUILD})
182 - export GOHOSTOS=$(go_os ${CBUILD})
183 - export CC=$(tc-getBUILD_CC)
184 -
185 - export GOARCH=$(go_arch)
186 - export GOOS=$(go_os)
187 - export CC_FOR_TARGET=$(tc-getCC)
188 - export CXX_FOR_TARGET=$(tc-getCXX)
189 - if [[ ${ARCH} == arm ]]; then
190 - export GOARM=$(go_arm)
191 - fi
192 -
193 - cd src
194 - bash -x ./make.bash || die "build failed"
195 -}
196 -
197 -src_test()
198 -{
199 - go_cross_compile && return 0
200 -
201 - cd src
202 - PATH="${GOBIN}:${PATH}" \
203 - ./run.bash -no-rebuild || die "tests failed"
204 -}
205 -
206 -src_install()
207 -{
208 - local bin_path f x
209 -
210 - dodir /usr/lib/go
211 -
212 - # There is a known issue which requires the source tree to be installed [1].
213 - # Once this is fixed, we can consider using the doc use flag to control
214 - # installing the doc and src directories.
215 - # [1] https://golang.org/issue/2775
216 - #
217 - # deliberately use cp to retain permissions
218 - cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
219 - if go_cross_compile; then
220 - bin_path="bin/$(go_tuple)"
221 - else
222 - bin_path=bin
223 - fi
224 - for x in ${bin_path}/*; do
225 - f=${x##*/}
226 - dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
227 - done
228 - einstalldocs
229 -
230 - if [[ ${CHOST} == *-darwin* ]] ; then
231 - # fix install_name for test object (binutils_test) on Darwin, it
232 - # is never used in real circumstances
233 - local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/
234 - libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64
235 - install_name_tool -id "${libmac64}" "${D}${libmac64}"
236 - fi
237 -}
238
239 diff --git a/dev-lang/go/go-1.13.14.ebuild b/dev-lang/go/go-1.13.14.ebuild
240 deleted file mode 100644
241 index d71bff70d90..00000000000
242 --- a/dev-lang/go/go-1.13.14.ebuild
243 +++ /dev/null
244 @@ -1,197 +0,0 @@
245 -# Copyright 1999-2020 Gentoo Authors
246 -# Distributed under the terms of the GNU General Public License v2
247 -
248 -EAPI=7
249 -
250 -export CBUILD=${CBUILD:-${CHOST}}
251 -export CTARGET=${CTARGET:-${CHOST}}
252 -
253 -MY_PV=${PV/_/}
254 -
255 -inherit toolchain-funcs
256 -
257 -case ${PV} in
258 -*9999*)
259 - EGIT_REPO_URI="https://github.com/golang/go.git"
260 - inherit git-r3
261 - ;;
262 -*)
263 - SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
264 - S="${WORKDIR}"/go
265 - case ${PV} in
266 - *_beta*|*_rc*) ;;
267 - *)
268 - KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
269 - # The upstream tests fail under portage but pass if the build is
270 - # run according to their documentation [1].
271 - # I am restricting the tests on released versions until this is
272 - # solved.
273 - # [1] https://golang.org/issues/18442
274 - RESTRICT="test"
275 - ;;
276 - esac
277 -esac
278 -
279 -DESCRIPTION="A concurrent garbage collected and typesafe programming language"
280 -HOMEPAGE="https://golang.org"
281 -
282 -LICENSE="BSD"
283 -SLOT="0/${PV}"
284 -
285 -BDEPEND="|| (
286 - dev-lang/go
287 - dev-lang/go-bootstrap )"
288 -RDEPEND="!<dev-go/go-tools-0_pre20150902"
289 -
290 -# These test data objects have writable/executable stacks.
291 -QA_EXECSTACK="
292 - usr/lib/go/src/debug/elf/testdata/*.obj
293 - usr/lib/go/src/*.gox
294 - "
295 -
296 -# Do not complain about CFLAGS, etc, since Go doesn't use them.
297 -QA_FLAGS_IGNORED='.*'
298 -
299 -REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*"
300 -
301 -# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
302 -QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
303 -
304 -# Do not strip this package. Stripping is unsupported upstream and may
305 -# fail.
306 -RESTRICT+=" strip"
307 -
308 -DOCS=(
309 -AUTHORS
310 -CONTRIBUTING.md
311 -CONTRIBUTORS
312 -PATENTS
313 -README.md
314 -)
315 -
316 -go_arch()
317 -{
318 - # By chance most portage arch names match Go
319 - local portage_arch=$(tc-arch $@)
320 - case "${portage_arch}" in
321 - x86) echo 386;;
322 - x64-*) echo amd64;;
323 - ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
324 - s390) echo s390x ;;
325 - *) echo "${portage_arch}";;
326 - esac
327 -}
328 -
329 -go_arm()
330 -{
331 - case "${1:-${CHOST}}" in
332 - armv5*) echo 5;;
333 - armv6*) echo 6;;
334 - armv7*) echo 7;;
335 - *)
336 - die "unknown GOARM for ${1:-${CHOST}}"
337 - ;;
338 - esac
339 -}
340 -
341 -go_os()
342 -{
343 - case "${1:-${CHOST}}" in
344 - *-linux*) echo linux;;
345 - *-darwin*) echo darwin;;
346 - *-freebsd*) echo freebsd;;
347 - *-netbsd*) echo netbsd;;
348 - *-openbsd*) echo openbsd;;
349 - *-solaris*) echo solaris;;
350 - *-cygwin*|*-interix*|*-winnt*)
351 - echo windows
352 - ;;
353 - *)
354 - die "unknown GOOS for ${1:-${CHOST}}"
355 - ;;
356 - esac
357 -}
358 -
359 -go_tuple()
360 -{
361 - echo "$(go_os $@)_$(go_arch $@)"
362 -}
363 -
364 -go_cross_compile()
365 -{
366 - [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
367 -}
368 -
369 -src_compile()
370 -{
371 - if has_version -b dev-lang/go; then
372 - export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
373 - elif has_version -b dev-lang/go-bootstrap; then
374 - export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
375 - else
376 - eerror "Go cannot be built without go or go-bootstrap installed"
377 - die "Should not be here, please report a bug"
378 - fi
379 -
380 - export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
381 - export GOROOT="$(pwd)"
382 - export GOBIN="${GOROOT}/bin"
383 -
384 - # Go's build script does not use BUILD/HOST/TARGET consistently. :(
385 - export GOHOSTARCH=$(go_arch ${CBUILD})
386 - export GOHOSTOS=$(go_os ${CBUILD})
387 - export CC=$(tc-getBUILD_CC)
388 -
389 - export GOARCH=$(go_arch)
390 - export GOOS=$(go_os)
391 - export CC_FOR_TARGET=$(tc-getCC)
392 - export CXX_FOR_TARGET=$(tc-getCXX)
393 - if [[ ${ARCH} == arm ]]; then
394 - export GOARM=$(go_arm)
395 - fi
396 -
397 - cd src
398 - bash -x ./make.bash || die "build failed"
399 -}
400 -
401 -src_test()
402 -{
403 - go_cross_compile && return 0
404 -
405 - cd src
406 - PATH="${GOBIN}:${PATH}" \
407 - ./run.bash -no-rebuild || die "tests failed"
408 -}
409 -
410 -src_install()
411 -{
412 - local bin_path f x
413 -
414 - dodir /usr/lib/go
415 -
416 - # There is a known issue which requires the source tree to be installed [1].
417 - # Once this is fixed, we can consider using the doc use flag to control
418 - # installing the doc and src directories.
419 - # [1] https://golang.org/issue/2775
420 - #
421 - # deliberately use cp to retain permissions
422 - cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
423 - if go_cross_compile; then
424 - bin_path="bin/$(go_tuple)"
425 - else
426 - bin_path=bin
427 - fi
428 - for x in ${bin_path}/*; do
429 - f=${x##*/}
430 - dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
431 - done
432 - einstalldocs
433 -
434 - if [[ ${CHOST} == *-darwin* ]] ; then
435 - # fix install_name for test object (binutils_test) on Darwin, it
436 - # is never used in real circumstances
437 - local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/
438 - libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64
439 - install_name_tool -id "${libmac64}" "${D}${libmac64}"
440 - fi
441 -}
442
443 diff --git a/dev-lang/go/go-1.14.5.ebuild b/dev-lang/go/go-1.14.5.ebuild
444 deleted file mode 100644
445 index 178eb1504f2..00000000000
446 --- a/dev-lang/go/go-1.14.5.ebuild
447 +++ /dev/null
448 @@ -1,188 +0,0 @@
449 -# Copyright 1999-2020 Gentoo Authors
450 -# Distributed under the terms of the GNU General Public License v2
451 -
452 -EAPI=7
453 -
454 -export CBUILD=${CBUILD:-${CHOST}}
455 -export CTARGET=${CTARGET:-${CHOST}}
456 -
457 -MY_PV=${PV/_/}
458 -
459 -inherit toolchain-funcs
460 -
461 -case ${PV} in
462 -*9999*)
463 - EGIT_REPO_URI="https://github.com/golang/go.git"
464 - inherit git-r3
465 - ;;
466 -*)
467 - SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
468 - S="${WORKDIR}"/go
469 - case ${PV} in
470 - *_beta*|*_rc*) ;;
471 - *)
472 - KEYWORDS="-* amd64 arm arm64 ppc64 ~s390 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
473 - ;;
474 - esac
475 -esac
476 -
477 -DESCRIPTION="A concurrent garbage collected and typesafe programming language"
478 -HOMEPAGE="https://golang.org"
479 -
480 -LICENSE="BSD"
481 -SLOT="0/${PV}"
482 -
483 -BDEPEND="|| (
484 - dev-lang/go
485 - dev-lang/go-bootstrap )"
486 -RDEPEND="!<dev-go/go-tools-0_pre20150902"
487 -
488 -# Do not complain about CFLAGS, etc, since Go doesn't use them.
489 -QA_FLAGS_IGNORED='.*'
490 -
491 -# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
492 -QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
493 -
494 -# Do not strip this package. Stripping is unsupported upstream and may
495 -# fail.
496 -RESTRICT+=" strip"
497 -
498 -DOCS=(
499 -AUTHORS
500 -CONTRIBUTING.md
501 -CONTRIBUTORS
502 -PATENTS
503 -README.md
504 -)
505 -
506 -go_arch()
507 -{
508 - # By chance most portage arch names match Go
509 - local portage_arch=$(tc-arch $@)
510 - case "${portage_arch}" in
511 - x86) echo 386;;
512 - x64-*) echo amd64;;
513 - ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
514 - s390) echo s390x ;;
515 - *) echo "${portage_arch}";;
516 - esac
517 -}
518 -
519 -go_arm()
520 -{
521 - case "${1:-${CHOST}}" in
522 - armv5*) echo 5;;
523 - armv6*) echo 6;;
524 - armv7*) echo 7;;
525 - *)
526 - die "unknown GOARM for ${1:-${CHOST}}"
527 - ;;
528 - esac
529 -}
530 -
531 -go_os()
532 -{
533 - case "${1:-${CHOST}}" in
534 - *-linux*) echo linux;;
535 - *-darwin*) echo darwin;;
536 - *-freebsd*) echo freebsd;;
537 - *-netbsd*) echo netbsd;;
538 - *-openbsd*) echo openbsd;;
539 - *-solaris*) echo solaris;;
540 - *-cygwin*|*-interix*|*-winnt*)
541 - echo windows
542 - ;;
543 - *)
544 - die "unknown GOOS for ${1:-${CHOST}}"
545 - ;;
546 - esac
547 -}
548 -
549 -go_tuple()
550 -{
551 - echo "$(go_os $@)_$(go_arch $@)"
552 -}
553 -
554 -go_cross_compile()
555 -{
556 - [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
557 -}
558 -
559 -src_compile()
560 -{
561 - if has_version -b dev-lang/go; then
562 - export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
563 - elif has_version -b dev-lang/go-bootstrap; then
564 - export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
565 - else
566 - eerror "Go cannot be built without go or go-bootstrap installed"
567 - die "Should not be here, please report a bug"
568 - fi
569 -
570 - export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
571 - export GOROOT="$(pwd)"
572 - export GOBIN="${GOROOT}/bin"
573 -
574 - # Go's build script does not use BUILD/HOST/TARGET consistently. :(
575 - export GOHOSTARCH=$(go_arch ${CBUILD})
576 - export GOHOSTOS=$(go_os ${CBUILD})
577 - export CC=$(tc-getBUILD_CC)
578 -
579 - export GOARCH=$(go_arch)
580 - export GOOS=$(go_os)
581 - export CC_FOR_TARGET=$(tc-getCC)
582 - export CXX_FOR_TARGET=$(tc-getCXX)
583 - if [[ ${ARCH} == arm ]]; then
584 - export GOARM=$(go_arm)
585 - fi
586 -
587 - cd src
588 - bash -x ./make.bash || die "build failed"
589 -}
590 -
591 -src_test()
592 -{
593 - go_cross_compile && return 0
594 -
595 - cd src
596 - PATH="${GOBIN}:${PATH}" \
597 - ./run.bash -no-rebuild || die "tests failed"
598 - cd ..
599 - rm -fr pkg/*_race || die
600 - rm -fr pkg/obj/go-build || die
601 -}
602 -
603 -src_install()
604 -{
605 - local bin_path f x
606 -
607 - dodir /usr/lib/go
608 -
609 - # There is a known issue which requires the source tree to be installed [1].
610 - # Once this is fixed, we can consider using the doc use flag to control
611 - # installing the doc and src directories.
612 - # [1] https://golang.org/issue/2775
613 - #
614 - # deliberately use cp to retain permissions
615 - cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
616 - # testdata directories are not needed on the installed system
617 - rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print)
618 - if go_cross_compile; then
619 - bin_path="bin/$(go_tuple)"
620 - else
621 - bin_path=bin
622 - fi
623 - for x in ${bin_path}/*; do
624 - f=${x##*/}
625 - dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
626 - done
627 - einstalldocs
628 -
629 - if [[ ${CHOST} == *-darwin* ]] ; then
630 - # fix install_name for test object (binutils_test) on Darwin, it
631 - # is never used in real circumstances
632 - local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/
633 - libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64
634 - install_name_tool -id "${libmac64}" "${D}${libmac64}"
635 - fi
636 -}
637
638 diff --git a/dev-lang/go/go-1.14.6.ebuild b/dev-lang/go/go-1.14.6.ebuild
639 deleted file mode 100644
640 index fa07749bdeb..00000000000
641 --- a/dev-lang/go/go-1.14.6.ebuild
642 +++ /dev/null
643 @@ -1,188 +0,0 @@
644 -# Copyright 1999-2020 Gentoo Authors
645 -# Distributed under the terms of the GNU General Public License v2
646 -
647 -EAPI=7
648 -
649 -export CBUILD=${CBUILD:-${CHOST}}
650 -export CTARGET=${CTARGET:-${CHOST}}
651 -
652 -MY_PV=${PV/_/}
653 -
654 -inherit toolchain-funcs
655 -
656 -case ${PV} in
657 -*9999*)
658 - EGIT_REPO_URI="https://github.com/golang/go.git"
659 - inherit git-r3
660 - ;;
661 -*)
662 - SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
663 - S="${WORKDIR}"/go
664 - case ${PV} in
665 - *_beta*|*_rc*) ;;
666 - *)
667 - KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
668 - ;;
669 - esac
670 -esac
671 -
672 -DESCRIPTION="A concurrent garbage collected and typesafe programming language"
673 -HOMEPAGE="https://golang.org"
674 -
675 -LICENSE="BSD"
676 -SLOT="0/${PV}"
677 -
678 -BDEPEND="|| (
679 - dev-lang/go
680 - dev-lang/go-bootstrap )"
681 -RDEPEND="!<dev-go/go-tools-0_pre20150902"
682 -
683 -# Do not complain about CFLAGS, etc, since Go doesn't use them.
684 -QA_FLAGS_IGNORED='.*'
685 -
686 -# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
687 -QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
688 -
689 -# Do not strip this package. Stripping is unsupported upstream and may
690 -# fail.
691 -RESTRICT+=" strip"
692 -
693 -DOCS=(
694 -AUTHORS
695 -CONTRIBUTING.md
696 -CONTRIBUTORS
697 -PATENTS
698 -README.md
699 -)
700 -
701 -go_arch()
702 -{
703 - # By chance most portage arch names match Go
704 - local portage_arch=$(tc-arch $@)
705 - case "${portage_arch}" in
706 - x86) echo 386;;
707 - x64-*) echo amd64;;
708 - ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
709 - s390) echo s390x ;;
710 - *) echo "${portage_arch}";;
711 - esac
712 -}
713 -
714 -go_arm()
715 -{
716 - case "${1:-${CHOST}}" in
717 - armv5*) echo 5;;
718 - armv6*) echo 6;;
719 - armv7*) echo 7;;
720 - *)
721 - die "unknown GOARM for ${1:-${CHOST}}"
722 - ;;
723 - esac
724 -}
725 -
726 -go_os()
727 -{
728 - case "${1:-${CHOST}}" in
729 - *-linux*) echo linux;;
730 - *-darwin*) echo darwin;;
731 - *-freebsd*) echo freebsd;;
732 - *-netbsd*) echo netbsd;;
733 - *-openbsd*) echo openbsd;;
734 - *-solaris*) echo solaris;;
735 - *-cygwin*|*-interix*|*-winnt*)
736 - echo windows
737 - ;;
738 - *)
739 - die "unknown GOOS for ${1:-${CHOST}}"
740 - ;;
741 - esac
742 -}
743 -
744 -go_tuple()
745 -{
746 - echo "$(go_os $@)_$(go_arch $@)"
747 -}
748 -
749 -go_cross_compile()
750 -{
751 - [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
752 -}
753 -
754 -src_compile()
755 -{
756 - if has_version -b dev-lang/go; then
757 - export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
758 - elif has_version -b dev-lang/go-bootstrap; then
759 - export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
760 - else
761 - eerror "Go cannot be built without go or go-bootstrap installed"
762 - die "Should not be here, please report a bug"
763 - fi
764 -
765 - export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
766 - export GOROOT="$(pwd)"
767 - export GOBIN="${GOROOT}/bin"
768 -
769 - # Go's build script does not use BUILD/HOST/TARGET consistently. :(
770 - export GOHOSTARCH=$(go_arch ${CBUILD})
771 - export GOHOSTOS=$(go_os ${CBUILD})
772 - export CC=$(tc-getBUILD_CC)
773 -
774 - export GOARCH=$(go_arch)
775 - export GOOS=$(go_os)
776 - export CC_FOR_TARGET=$(tc-getCC)
777 - export CXX_FOR_TARGET=$(tc-getCXX)
778 - if [[ ${ARCH} == arm ]]; then
779 - export GOARM=$(go_arm)
780 - fi
781 -
782 - cd src
783 - bash -x ./make.bash || die "build failed"
784 -}
785 -
786 -src_test()
787 -{
788 - go_cross_compile && return 0
789 -
790 - cd src
791 - PATH="${GOBIN}:${PATH}" \
792 - ./run.bash -no-rebuild || die "tests failed"
793 - cd ..
794 - rm -fr pkg/*_race || die
795 - rm -fr pkg/obj/go-build || die
796 -}
797 -
798 -src_install()
799 -{
800 - local bin_path f x
801 -
802 - dodir /usr/lib/go
803 -
804 - # There is a known issue which requires the source tree to be installed [1].
805 - # Once this is fixed, we can consider using the doc use flag to control
806 - # installing the doc and src directories.
807 - # [1] https://golang.org/issue/2775
808 - #
809 - # deliberately use cp to retain permissions
810 - cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
811 - # testdata directories are not needed on the installed system
812 - rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print)
813 - if go_cross_compile; then
814 - bin_path="bin/$(go_tuple)"
815 - else
816 - bin_path=bin
817 - fi
818 - for x in ${bin_path}/*; do
819 - f=${x##*/}
820 - dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
821 - done
822 - einstalldocs
823 -
824 - if [[ ${CHOST} == *-darwin* ]] ; then
825 - # fix install_name for test object (binutils_test) on Darwin, it
826 - # is never used in real circumstances
827 - local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/
828 - libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64
829 - install_name_tool -id "${libmac64}" "${D}${libmac64}"
830 - fi
831 -}