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: Sat, 31 Mar 2018 18:51:56
Message-Id: 1522522275.9c3a4fa49ed30691a1d19bf33b78c0fe7658df57.williamh@gentoo
1 commit: 9c3a4fa49ed30691a1d19bf33b78c0fe7658df57
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Sat Mar 31 18:50:23 2018 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 31 18:51:15 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c3a4fa4
7
8 dev-lang/go: remove vulnerable versions for bug #647250
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 dev-lang/go/Manifest | 3 -
13 dev-lang/go/go-1.9.1.ebuild | 227 --------------------------------------------
14 dev-lang/go/go-1.9.2.ebuild | 227 --------------------------------------------
15 dev-lang/go/go-1.9.3.ebuild | 227 --------------------------------------------
16 4 files changed, 684 deletions(-)
17
18 diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
19 index 35a76b7ee58..d778c19ca45 100644
20 --- a/dev-lang/go/Manifest
21 +++ b/dev-lang/go/Manifest
22 @@ -11,7 +11,4 @@ DIST go-linux-s390x-bootstrap-1.8.tbz 57124869 BLAKE2B 920a176b8f4fc3a816e724324
23 DIST go-solaris-amd64-bootstrap-1.8.tbz 54926326 BLAKE2B 0a45312f090d81ebf46fe5950cb65c059e2801394231e715e94145d1f918eb59b10472b2385e57ebd5cfb9eca0ad7290fb118436486b665520bb540970f971ab SHA512 52b849e5b9a940e10de7ba3df0ebdf6e1c5d631de9581d936c9edf8f38e6bb3314acbc2b2d5202b0528fde2a359d52bc0c6f39acf9b1b614725e4b4a947ed10d
24 DIST go1.10.1.src.tar.gz 18305765 BLAKE2B 61b8db22c50b9a4653244dc18267f405607755932d84ea2c475338a9f4a5421da2bb8cc808dbd166aa35c3c8778180bf47d6e51ebe303bc62e582516919058f9 SHA512 13f6b0643a4f92eeca04444b9fa10de38fc3427daea9aa3227cf9a5738ffee1a3f2e355ba5faf711b8506f7de118bdcd3b9064b65407a22613523e29ffd73415
25 DIST go1.10.src.tar.gz 18300467 BLAKE2B 2058c450fb72f008464381443d180902b9a0bb11691d112d16bcc1a3f5177bfc39d15ed4532c0d85997398b2f07e40c1f9fedf46f1d0e08c636af1e44bd8ef10 SHA512 59f089e1ffb2d3aba5ada329d4f0d1181c3c4f01fa64f19d0b753f8a989cb59cf290ad88d215cadc18ef99aba8518e44c9bc258c07eaffc834c55e4a37bd4651
26 -DIST go1.9.1.src.tar.gz 16377700 BLAKE2B 63558227bdbff43da788c43e082e54dfa0210e53de650b3e2a4ab09c55a9937a0d1fee66be8263653c2d8be774611f2485c7e673b8a5fbc7f7c0adc5fd4fdc1f SHA512 3c5d11089a54c61acd1a4fad9618ddb2058cc783a54564407ee50e37c864deaadfd5effeab623080c136a599096f448aae091ef41d0afca1abfcdb98adf4a793
27 -DIST go1.9.2.src.tar.gz 16383591 BLAKE2B 3ad9d0e7b6b817a4eab7ffcca30ba86a0e50e68ed028b11f54b8813f4b1a9a0598c79d501c733e7fbf77831c8f7df681692f9aa6b860b16a6288dcab59d40226 SHA512 1034098575c317eeaf648629690a4dea0c479a69c3b80d9917f6b96c8781ce79c0f29859f667dc4e07d47a44972aa09bd0163a458f897cf45f9d09eb03e4abb5
28 -DIST go1.9.3.src.tar.gz 16385451 BLAKE2B 0d16eba4d411a5ddb1915a305725e9762874568abb048cc5c8939e82481d7d530902d532b62c8fe10fe7e31465617171d17cb5aaf3ee51aa29b9a66837bf6874 SHA512 31c564af58b78c648c9bece8fa2ed3334feb80316b07b16f6286319e26d317da90d1af0464c3a2f776a3da72d31b22b063dbc620b93114bf142a11e8a625e527
29 DIST go1.9.4.src.tar.gz 16392325 BLAKE2B c5a503e8c539f31a1bbef9c6d89263b7214fb433476830c205153aa07ee0debc273eb004dddd662f81cc6cd2d4d949af654a4f4db1c890530feadc90ce05e630 SHA512 1a7c830e07507ff7b89025adfb5c713444d97301f8ad47ef2564722c1e28186e946350f07e22777fbdd6f2f589c334eb01dfd589e97cb8a86f73669547badb0b
30
31 diff --git a/dev-lang/go/go-1.9.1.ebuild b/dev-lang/go/go-1.9.1.ebuild
32 deleted file mode 100644
33 index 6b538a0be4e..00000000000
34 --- a/dev-lang/go/go-1.9.1.ebuild
35 +++ /dev/null
36 @@ -1,227 +0,0 @@
37 -# Copyright 1999-2017 Gentoo Foundation
38 -# Distributed under the terms of the GNU General Public License v2
39 -
40 -EAPI=6
41 -
42 -export CBUILD=${CBUILD:-${CHOST}}
43 -export CTARGET=${CTARGET:-${CHOST}}
44 -
45 -MY_PV=${PV/_/}
46 -
47 -inherit toolchain-funcs
48 -
49 -BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist"
50 -BOOTSTRAP_VERSION="bootstrap-1.8"
51 -BOOTSTRAP_URI="
52 -amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz )
53 -arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz )
54 -arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz )
55 -ppc64? (
56 - ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz
57 - ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz
58 -)
59 -s390? ( ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz )
60 -x86? ( ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz )
61 -amd64-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz )
62 -x86-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz )
63 -x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz )
64 -x64-solaris? ( ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz )
65 -"
66 -
67 -case ${PV} in
68 -*9999*)
69 - EGIT_REPO_URI="https://github.com/golang/go.git"
70 - inherit git-r3
71 - ;;
72 -*)
73 - SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
74 - S="${WORKDIR}"/go
75 - case ${PV} in
76 - *_beta*|*_rc*) ;;
77 - *)
78 - KEYWORDS="-* amd64 arm ~arm64 ~ppc64 x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris"
79 - # The upstream tests fail under portage but pass if the build is
80 - # run according to their documentation [1].
81 - # I am restricting the tests on released versions until this is
82 - # solved.
83 - # [1] https://golang.org/issues/18442
84 - RESTRICT="test"
85 - ;;
86 - esac
87 -esac
88 -SRC_URI+="!gccgo? ( ${BOOTSTRAP_URI} )"
89 -
90 -DESCRIPTION="A concurrent garbage collected and typesafe programming language"
91 -HOMEPAGE="https://golang.org"
92 -
93 -LICENSE="BSD"
94 -SLOT="0/${PV}"
95 -IUSE="gccgo"
96 -
97 -DEPEND="gccgo? ( >=sys-devel/gcc-5[go] )"
98 -RDEPEND="!<dev-go/go-tools-0_pre20150902"
99 -
100 -# These test data objects have writable/executable stacks.
101 -QA_EXECSTACK="
102 - usr/lib/go/src/debug/elf/testdata/*.obj
103 - usr/lib/go/src/go/internal/gccgoimporter/testdata/unicode.gox
104 - usr/lib/go/src/go/internal/gccgoimporter/testdata/time.gox
105 - "
106 -
107 -# Do not complain about CFLAGS, etc, since Go doesn't use them.
108 -QA_FLAGS_IGNORED='.*'
109 -
110 -REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*"
111 -
112 -# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
113 -QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
114 -
115 -# Do not strip this package. Stripping is unsupported upstream and may
116 -# fail.
117 -RESTRICT+=" strip"
118 -
119 -DOCS=(
120 -AUTHORS
121 -CONTRIBUTING.md
122 -CONTRIBUTORS
123 -PATENTS
124 -README.md
125 -)
126 -
127 -go_arch()
128 -{
129 - # By chance most portage arch names match Go
130 - local portage_arch=$(tc-arch $@)
131 - case "${portage_arch}" in
132 - x86) echo 386;;
133 - x64-*) echo amd64;;
134 - ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
135 - s390) echo s390x ;;
136 - *) echo "${portage_arch}";;
137 - esac
138 -}
139 -
140 -go_arm()
141 -{
142 - case "${1:-${CHOST}}" in
143 - armv5*) echo 5;;
144 - armv6*) echo 6;;
145 - armv7*) echo 7;;
146 - *)
147 - die "unknown GOARM for ${1:-${CHOST}}"
148 - ;;
149 - esac
150 -}
151 -
152 -go_os()
153 -{
154 - case "${1:-${CHOST}}" in
155 - *-linux*) echo linux;;
156 - *-darwin*) echo darwin;;
157 - *-freebsd*) echo freebsd;;
158 - *-netbsd*) echo netbsd;;
159 - *-openbsd*) echo openbsd;;
160 - *-solaris*) echo solaris;;
161 - *-cygwin*|*-interix*|*-winnt*)
162 - echo windows
163 - ;;
164 - *)
165 - die "unknown GOOS for ${1:-${CHOST}}"
166 - ;;
167 - esac
168 -}
169 -
170 -go_tuple()
171 -{
172 - echo "$(go_os $@)_$(go_arch $@)"
173 -}
174 -
175 -go_cross_compile()
176 -{
177 - [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
178 -}
179 -
180 -pkg_pretend()
181 -{
182 - # make.bash does not understand cross-compiling a cross-compiler
183 - if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then
184 - die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}"
185 - fi
186 -}
187 -
188 -src_unpack()
189 -{
190 - if [[ ${PV} = 9999 ]]; then
191 - git-r3_src_unpack
192 - fi
193 - default
194 -}
195 -
196 -src_compile()
197 -{
198 - export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os)-$(go_arch)-bootstrap
199 - if use gccgo; then
200 - mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die
201 - local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version)
202 - [[ -x ${go_binary} ]] || go_binary=$(
203 - find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) |
204 - sort -V | tail -n1)
205 - [[ -x ${go_binary} ]] ||
206 - die "go-$(gcc-major-version): command not found"
207 - ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die
208 - fi
209 - export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
210 - export GOROOT="$(pwd)"
211 - export GOBIN="${GOROOT}/bin"
212 -
213 - # Go's build script does not use BUILD/HOST/TARGET consistently. :(
214 - export GOHOSTARCH=$(go_arch ${CBUILD})
215 - export GOHOSTOS=$(go_os ${CBUILD})
216 - export CC=$(tc-getBUILD_CC)
217 -
218 - export GOARCH=$(go_arch)
219 - export GOOS=$(go_os)
220 - export CC_FOR_TARGET=$(tc-getCC)
221 - export CXX_FOR_TARGET=$(tc-getCXX)
222 - if [[ ${ARCH} == arm ]]; then
223 - export GOARM=$(go_arm)
224 - fi
225 - einfo "GOROOT_BOOTSTRAP is ${GOROOT_BOOTSTRAP}"
226 -
227 - cd src
228 - ./make.bash || die "build failed"
229 -}
230 -
231 -src_test()
232 -{
233 - go_cross_compile && return 0
234 -
235 - cd src
236 - PATH="${GOBIN}:${PATH}" \
237 - ./run.bash -no-rebuild || die "tests failed"
238 -}
239 -
240 -src_install()
241 -{
242 - local bin_path f x
243 -
244 - dodir /usr/lib/go
245 -
246 - # There is a known issue which requires the source tree to be installed [1].
247 - # Once this is fixed, we can consider using the doc use flag to control
248 - # installing the doc and src directories.
249 - # [1] https://golang.org/issue/2775
250 - #
251 - # deliberately use cp to retain permissions
252 - cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
253 - if go_cross_compile; then
254 - bin_path="bin/$(go_tuple)"
255 - else
256 - bin_path=bin
257 - fi
258 - for x in ${bin_path}/*; do
259 - f=${x##*/}
260 - dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
261 - done
262 - einstalldocs
263 -}
264
265 diff --git a/dev-lang/go/go-1.9.2.ebuild b/dev-lang/go/go-1.9.2.ebuild
266 deleted file mode 100644
267 index 3d97b87631e..00000000000
268 --- a/dev-lang/go/go-1.9.2.ebuild
269 +++ /dev/null
270 @@ -1,227 +0,0 @@
271 -# Copyright 1999-2018 Gentoo Foundation
272 -# Distributed under the terms of the GNU General Public License v2
273 -
274 -EAPI=6
275 -
276 -export CBUILD=${CBUILD:-${CHOST}}
277 -export CTARGET=${CTARGET:-${CHOST}}
278 -
279 -MY_PV=${PV/_/}
280 -
281 -inherit toolchain-funcs
282 -
283 -BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist"
284 -BOOTSTRAP_VERSION="bootstrap-1.8"
285 -BOOTSTRAP_URI="
286 -amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz )
287 -arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz )
288 -arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz )
289 -ppc64? (
290 - ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz
291 - ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz
292 -)
293 -s390? ( ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz )
294 -x86? ( ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz )
295 -amd64-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz )
296 -x86-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz )
297 -x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz )
298 -x64-solaris? ( ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz )
299 -"
300 -
301 -case ${PV} in
302 -*9999*)
303 - EGIT_REPO_URI="https://github.com/golang/go.git"
304 - inherit git-r3
305 - ;;
306 -*)
307 - SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
308 - S="${WORKDIR}"/go
309 - case ${PV} in
310 - *_beta*|*_rc*) ;;
311 - *)
312 - KEYWORDS="-* amd64 arm ~arm64 ~ppc64 x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris"
313 - # The upstream tests fail under portage but pass if the build is
314 - # run according to their documentation [1].
315 - # I am restricting the tests on released versions until this is
316 - # solved.
317 - # [1] https://golang.org/issues/18442
318 - RESTRICT="test"
319 - ;;
320 - esac
321 -esac
322 -SRC_URI+="!gccgo? ( ${BOOTSTRAP_URI} )"
323 -
324 -DESCRIPTION="A concurrent garbage collected and typesafe programming language"
325 -HOMEPAGE="https://golang.org"
326 -
327 -LICENSE="BSD"
328 -SLOT="0/${PV}"
329 -IUSE="gccgo"
330 -
331 -DEPEND="gccgo? ( >=sys-devel/gcc-5[go] )"
332 -RDEPEND="!<dev-go/go-tools-0_pre20150902"
333 -
334 -# These test data objects have writable/executable stacks.
335 -QA_EXECSTACK="
336 - usr/lib/go/src/debug/elf/testdata/*.obj
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 -}
498
499 diff --git a/dev-lang/go/go-1.9.3.ebuild b/dev-lang/go/go-1.9.3.ebuild
500 deleted file mode 100644
501 index 480b7faabc2..00000000000
502 --- a/dev-lang/go/go-1.9.3.ebuild
503 +++ /dev/null
504 @@ -1,227 +0,0 @@
505 -# Copyright 1999-2018 Gentoo Foundation
506 -# Distributed under the terms of the GNU General Public License v2
507 -
508 -EAPI=6
509 -
510 -export CBUILD=${CBUILD:-${CHOST}}
511 -export CTARGET=${CTARGET:-${CHOST}}
512 -
513 -MY_PV=${PV/_/}
514 -
515 -inherit toolchain-funcs
516 -
517 -BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist"
518 -BOOTSTRAP_VERSION="bootstrap-1.8"
519 -BOOTSTRAP_URI="
520 -amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz )
521 -arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz )
522 -arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz )
523 -ppc64? (
524 - ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz
525 - ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz
526 -)
527 -s390? ( ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz )
528 -x86? ( ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz )
529 -amd64-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz )
530 -x86-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz )
531 -x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz )
532 -x64-solaris? ( ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz )
533 -"
534 -
535 -case ${PV} in
536 -*9999*)
537 - EGIT_REPO_URI="https://github.com/golang/go.git"
538 - inherit git-r3
539 - ;;
540 -*)
541 - SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
542 - S="${WORKDIR}"/go
543 - case ${PV} in
544 - *_beta*|*_rc*) ;;
545 - *)
546 - KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris"
547 - # The upstream tests fail under portage but pass if the build is
548 - # run according to their documentation [1].
549 - # I am restricting the tests on released versions until this is
550 - # solved.
551 - # [1] https://golang.org/issues/18442
552 - RESTRICT="test"
553 - ;;
554 - esac
555 -esac
556 -SRC_URI+="!gccgo? ( ${BOOTSTRAP_URI} )"
557 -
558 -DESCRIPTION="A concurrent garbage collected and typesafe programming language"
559 -HOMEPAGE="https://golang.org"
560 -
561 -LICENSE="BSD"
562 -SLOT="0/${PV}"
563 -IUSE="gccgo"
564 -
565 -DEPEND="gccgo? ( >=sys-devel/gcc-5[go] )"
566 -RDEPEND="!<dev-go/go-tools-0_pre20150902"
567 -
568 -# These test data objects have writable/executable stacks.
569 -QA_EXECSTACK="
570 - usr/lib/go/src/debug/elf/testdata/*.obj
571 - usr/lib/go/src/go/internal/gccgoimporter/testdata/unicode.gox
572 - usr/lib/go/src/go/internal/gccgoimporter/testdata/time.gox
573 - "
574 -
575 -# Do not complain about CFLAGS, etc, since Go doesn't use them.
576 -QA_FLAGS_IGNORED='.*'
577 -
578 -REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*"
579 -
580 -# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
581 -QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
582 -
583 -# Do not strip this package. Stripping is unsupported upstream and may
584 -# fail.
585 -RESTRICT+=" strip"
586 -
587 -DOCS=(
588 -AUTHORS
589 -CONTRIBUTING.md
590 -CONTRIBUTORS
591 -PATENTS
592 -README.md
593 -)
594 -
595 -go_arch()
596 -{
597 - # By chance most portage arch names match Go
598 - local portage_arch=$(tc-arch $@)
599 - case "${portage_arch}" in
600 - x86) echo 386;;
601 - x64-*) echo amd64;;
602 - ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
603 - s390) echo s390x ;;
604 - *) echo "${portage_arch}";;
605 - esac
606 -}
607 -
608 -go_arm()
609 -{
610 - case "${1:-${CHOST}}" in
611 - armv5*) echo 5;;
612 - armv6*) echo 6;;
613 - armv7*) echo 7;;
614 - *)
615 - die "unknown GOARM for ${1:-${CHOST}}"
616 - ;;
617 - esac
618 -}
619 -
620 -go_os()
621 -{
622 - case "${1:-${CHOST}}" in
623 - *-linux*) echo linux;;
624 - *-darwin*) echo darwin;;
625 - *-freebsd*) echo freebsd;;
626 - *-netbsd*) echo netbsd;;
627 - *-openbsd*) echo openbsd;;
628 - *-solaris*) echo solaris;;
629 - *-cygwin*|*-interix*|*-winnt*)
630 - echo windows
631 - ;;
632 - *)
633 - die "unknown GOOS for ${1:-${CHOST}}"
634 - ;;
635 - esac
636 -}
637 -
638 -go_tuple()
639 -{
640 - echo "$(go_os $@)_$(go_arch $@)"
641 -}
642 -
643 -go_cross_compile()
644 -{
645 - [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
646 -}
647 -
648 -pkg_pretend()
649 -{
650 - # make.bash does not understand cross-compiling a cross-compiler
651 - if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then
652 - die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}"
653 - fi
654 -}
655 -
656 -src_unpack()
657 -{
658 - if [[ ${PV} = 9999 ]]; then
659 - git-r3_src_unpack
660 - fi
661 - default
662 -}
663 -
664 -src_compile()
665 -{
666 - export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os)-$(go_arch)-bootstrap
667 - if use gccgo; then
668 - mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die
669 - local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version)
670 - [[ -x ${go_binary} ]] || go_binary=$(
671 - find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) |
672 - sort -V | tail -n1)
673 - [[ -x ${go_binary} ]] ||
674 - die "go-$(gcc-major-version): command not found"
675 - ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die
676 - fi
677 - export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
678 - export GOROOT="$(pwd)"
679 - export GOBIN="${GOROOT}/bin"
680 -
681 - # Go's build script does not use BUILD/HOST/TARGET consistently. :(
682 - export GOHOSTARCH=$(go_arch ${CBUILD})
683 - export GOHOSTOS=$(go_os ${CBUILD})
684 - export CC=$(tc-getBUILD_CC)
685 -
686 - export GOARCH=$(go_arch)
687 - export GOOS=$(go_os)
688 - export CC_FOR_TARGET=$(tc-getCC)
689 - export CXX_FOR_TARGET=$(tc-getCXX)
690 - if [[ ${ARCH} == arm ]]; then
691 - export GOARM=$(go_arm)
692 - fi
693 - einfo "GOROOT_BOOTSTRAP is ${GOROOT_BOOTSTRAP}"
694 -
695 - cd src
696 - ./make.bash || die "build failed"
697 -}
698 -
699 -src_test()
700 -{
701 - go_cross_compile && return 0
702 -
703 - cd src
704 - PATH="${GOBIN}:${PATH}" \
705 - ./run.bash -no-rebuild || die "tests failed"
706 -}
707 -
708 -src_install()
709 -{
710 - local bin_path f x
711 -
712 - dodir /usr/lib/go
713 -
714 - # There is a known issue which requires the source tree to be installed [1].
715 - # Once this is fixed, we can consider using the doc use flag to control
716 - # installing the doc and src directories.
717 - # [1] https://golang.org/issue/2775
718 - #
719 - # deliberately use cp to retain permissions
720 - cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
721 - if go_cross_compile; then
722 - bin_path="bin/$(go_tuple)"
723 - else
724 - bin_path=bin
725 - fi
726 - for x in ${bin_path}/*; do
727 - f=${x##*/}
728 - dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
729 - done
730 - einstalldocs
731 -}