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: Tue, 19 Oct 2021 14:54:32
Message-Id: 1634655202.48495477c79a6be9aded2c2f3e4ccfc06aeb1265.williamh@gentoo
1 commit: 48495477c79a6be9aded2c2f3e4ccfc06aeb1265
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 19 14:51:47 2021 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 19 14:53:22 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48495477
7
8 dev-lang/go: remove old
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.3
11 Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
12
13 dev-lang/go/Manifest | 2 -
14 dev-lang/go/go-1.17.1.ebuild | 197 -------------------------------------------
15 dev-lang/go/go-1.17.ebuild | 197 -------------------------------------------
16 3 files changed, 396 deletions(-)
17
18 diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
19 index 53ffb334ccf..30acb6fee22 100644
20 --- a/dev-lang/go/Manifest
21 +++ b/dev-lang/go/Manifest
22 @@ -1,3 +1 @@
23 -DIST go1.17.1.src.tar.gz 22181735 BLAKE2B 77ce952e14c101776935c625aa39596a6b8923ca5ac264c72ed08a578f08fbbbc1825315a5dd84f9fa1412aaa7400b31e73117d5919aeb527c084173d8e11504 SHA512 23d4e003651204c5bcc5cf41437134e07a3fe3c188eb129f2d6366a7445a7919d6a7319c57483e91b3415fd28aa55df8d58eec398434f20ce6accd587925a14b
24 DIST go1.17.2.src.tar.gz 22182111 BLAKE2B 83b665af212f3e20dc9c9f4bd80ac0e1e4acb8ba6653835f6a8b990a5d6074a25ba78b783f7a4f9402b3f1916a65ddba4ad9780e4eae871719cff13f7bb9c980 SHA512 167220293e02d6994b5cdee5909cbdbe66f692619baeb6ff9ee0d56660eb39cfd9eac2ac510f113d5222dadd5858fd6276bd961365ca42b42c07af5d24d48107
25 -DIST go1.17.src.tar.gz 22178549 BLAKE2B 86cb84ff782eaee3fc0411b1f31cd985f3fdcda7b2709f3a94cba0fbe827ac13632d0476e1f67deaf06d2352c2ea3ac9217db7d170702dffff6a64beabdb0814 SHA512 bb94d69555faa103bc092ce85b73168954a553a5c72e4b38c39bd99a3eb4db679f352685e66507b0945ed12676eb2a0c51674e456f68a9a5b98c3ec6a948d35b
26
27 diff --git a/dev-lang/go/go-1.17.1.ebuild b/dev-lang/go/go-1.17.1.ebuild
28 deleted file mode 100644
29 index 4b20d98f17e..00000000000
30 --- a/dev-lang/go/go-1.17.1.ebuild
31 +++ /dev/null
32 @@ -1,197 +0,0 @@
33 -# Copyright 1999-2021 Gentoo Authors
34 -# Distributed under the terms of the GNU General Public License v2
35 -
36 -EAPI=7
37 -
38 -export CBUILD=${CBUILD:-${CHOST}}
39 -export CTARGET=${CTARGET:-${CHOST}}
40 -
41 -MY_PV=${PV/_/}
42 -
43 -inherit toolchain-funcs
44 -
45 -case ${PV} in
46 -*9999*)
47 - EGIT_REPO_URI="https://github.com/golang/go.git"
48 - inherit git-r3
49 - ;;
50 -*)
51 - SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
52 - S="${WORKDIR}"/go
53 - case ${PV} in
54 - *_beta*|*_rc*) ;;
55 - *)
56 - KEYWORDS="-* amd64 arm arm64 ppc64 ~riscv ~s390 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
57 - ;;
58 - esac
59 -esac
60 -
61 -DESCRIPTION="A concurrent garbage collected and typesafe programming language"
62 -HOMEPAGE="https://golang.org"
63 -
64 -LICENSE="BSD"
65 -SLOT="0/${PV}"
66 -IUSE="cpu_flags_x86_sse2"
67 -
68 -BDEPEND="|| (
69 - dev-lang/go
70 - dev-lang/go-bootstrap )"
71 -RDEPEND="!<dev-go/go-tools-0_pre20150902"
72 -
73 -# the *.syso files have writable/executable stacks
74 -QA_EXECSTACK='*.syso'
75 -
76 -# Do not complain about CFLAGS, etc, since Go doesn't use them.
77 -QA_FLAGS_IGNORED='.*'
78 -
79 -# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
80 -QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
81 -
82 -# This package triggers "unrecognized elf file(s)" notices on riscv.
83 -# https://bugs.gentoo.org/794046
84 -QA_PREBUILT='.*'
85 -
86 -# Do not strip this package. Stripping is unsupported upstream and may
87 -# fail.
88 -RESTRICT+=" strip"
89 -
90 -DOCS=(
91 -AUTHORS
92 -CONTRIBUTING.md
93 -CONTRIBUTORS
94 -PATENTS
95 -README.md
96 -)
97 -
98 -go_arch() {
99 - # By chance most portage arch names match Go
100 - local portage_arch=$(tc-arch $@)
101 - case "${portage_arch}" in
102 - x86) echo 386;;
103 - x64-*) echo amd64;;
104 - ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
105 - riscv) echo riscv64 ;;
106 - s390) echo s390x ;;
107 - *) echo "${portage_arch}";;
108 - esac
109 -}
110 -
111 -go_arm() {
112 - case "${1:-${CHOST}}" in
113 - armv5*) echo 5;;
114 - armv6*) echo 6;;
115 - armv7*) echo 7;;
116 - *)
117 - die "unknown GOARM for ${1:-${CHOST}}"
118 - ;;
119 - esac
120 -}
121 -
122 -go_os() {
123 - case "${1:-${CHOST}}" in
124 - *-linux*) echo linux;;
125 - *-darwin*) echo darwin;;
126 - *-freebsd*) echo freebsd;;
127 - *-netbsd*) echo netbsd;;
128 - *-openbsd*) echo openbsd;;
129 - *-solaris*) echo solaris;;
130 - *-cygwin*|*-interix*|*-winnt*)
131 - echo windows
132 - ;;
133 - *)
134 - die "unknown GOOS for ${1:-${CHOST}}"
135 - ;;
136 - esac
137 -}
138 -
139 -go_tuple() {
140 - echo "$(go_os $@)_$(go_arch $@)"
141 -}
142 -
143 -go_cross_compile() {
144 - [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
145 -}
146 -
147 -src_compile() {
148 - if has_version -b dev-lang/go; then
149 - export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
150 - elif has_version -b dev-lang/go-bootstrap; then
151 - export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
152 - else
153 - eerror "Go cannot be built without go or go-bootstrap installed"
154 - die "Should not be here, please report a bug"
155 - fi
156 -
157 - export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
158 - export GOROOT="${PWD}"
159 - export GOBIN="${GOROOT}/bin"
160 -
161 - # Go's build script does not use BUILD/HOST/TARGET consistently. :(
162 - export GOHOSTARCH=$(go_arch ${CBUILD})
163 - export GOHOSTOS=$(go_os ${CBUILD})
164 - export CC=$(tc-getBUILD_CC)
165 -
166 - export GOARCH=$(go_arch)
167 - export GOOS=$(go_os)
168 - export CC_FOR_TARGET=$(tc-getCC)
169 - export CXX_FOR_TARGET=$(tc-getCXX)
170 - use arm && export GOARM=$(go_arm)
171 - use x86 && export GO386=$(usex cpu_flags_x86_sse2 '' 'softfloat')
172 -
173 - cd src
174 - bash -x ./make.bash || die "build failed"
175 -}
176 -
177 -src_test() {
178 - go_cross_compile && return 0
179 -
180 - cd src
181 - PATH="${GOBIN}:${PATH}" \
182 - ./run.bash -no-rebuild || die "tests failed"
183 - cd ..
184 - rm -fr pkg/*_race || die
185 - rm -fr pkg/obj/go-build || die
186 -}
187 -
188 -src_install() {
189 - # There is a known issue which requires the source tree to be installed [1].
190 - # Once this is fixed, we can consider using the doc use flag to control
191 - # installing the doc and src directories.
192 - # The use of cp is deliberate in order to retain permissions
193 - # [1] https://golang.org/issue/2775
194 - dodir /usr/lib/go
195 - cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
196 - einstalldocs
197 -
198 - # testdata directories are not needed on the installed system
199 - rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print)
200 -
201 - local bin_path
202 - if go_cross_compile; then
203 - bin_path="bin/$(go_tuple)"
204 - else
205 - bin_path=bin
206 - fi
207 - local f x
208 - for x in ${bin_path}/*; do
209 - f=${x##*/}
210 - dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
211 - done
212 -
213 - # install the @golang-rebuild set for Portage
214 - insinto /usr/share/portage/config/sets
215 - newins "${FILESDIR}"/go-sets.conf go.conf
216 -}
217 -
218 -pkg_postinst() {
219 - [[ -z ${REPLACING_VERSIONS} ]] && return
220 - elog "After ${CATEGORY}/${PN} is updated it is recommended to rebuild"
221 - elog "all packages compiled with previous versions of ${CATEGORY}/${PN}"
222 - elog "due to the static linking nature of go."
223 - elog "If this is not done, the packages compiled with the older"
224 - elog "version of the compiler will not be updated until they are"
225 - elog "updated individually, which could mean they will have"
226 - elog "vulnerabilities."
227 - elog "Run 'emerge @golang-rebuild' to rebuild all 'go' packages"
228 - elog "See https://bugs.gentoo.org/752153 for more info"
229 -}
230
231 diff --git a/dev-lang/go/go-1.17.ebuild b/dev-lang/go/go-1.17.ebuild
232 deleted file mode 100644
233 index bfde2d27f4d..00000000000
234 --- a/dev-lang/go/go-1.17.ebuild
235 +++ /dev/null
236 @@ -1,197 +0,0 @@
237 -# Copyright 1999-2021 Gentoo Authors
238 -# Distributed under the terms of the GNU General Public License v2
239 -
240 -EAPI=7
241 -
242 -export CBUILD=${CBUILD:-${CHOST}}
243 -export CTARGET=${CTARGET:-${CHOST}}
244 -
245 -MY_PV=${PV/_/}
246 -
247 -inherit toolchain-funcs
248 -
249 -case ${PV} in
250 -*9999*)
251 - EGIT_REPO_URI="https://github.com/golang/go.git"
252 - inherit git-r3
253 - ;;
254 -*)
255 - SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
256 - S="${WORKDIR}"/go
257 - case ${PV} in
258 - *_beta*|*_rc*) ;;
259 - *)
260 - KEYWORDS="-* amd64 arm arm64 ppc64 ~riscv ~s390 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
261 - ;;
262 - esac
263 -esac
264 -
265 -DESCRIPTION="A concurrent garbage collected and typesafe programming language"
266 -HOMEPAGE="https://golang.org"
267 -
268 -LICENSE="BSD"
269 -SLOT="0/${PV}"
270 -IUSE="cpu_flags_x86_sse2"
271 -
272 -BDEPEND="|| (
273 - dev-lang/go
274 - dev-lang/go-bootstrap )"
275 -RDEPEND="!<dev-go/go-tools-0_pre20150902"
276 -
277 -# the *.syso files have writable/executable stacks
278 -QA_EXECSTACK='*.syso'
279 -
280 -# Do not complain about CFLAGS, etc, since Go doesn't use them.
281 -QA_FLAGS_IGNORED='.*'
282 -
283 -# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
284 -QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
285 -
286 -# This package triggers "unrecognized elf file(s)" notices on riscv.
287 -# https://bugs.gentoo.org/794046
288 -QA_PREBUILT='.*'
289 -
290 -# Do not strip this package. Stripping is unsupported upstream and may
291 -# fail.
292 -RESTRICT+=" strip"
293 -
294 -DOCS=(
295 -AUTHORS
296 -CONTRIBUTING.md
297 -CONTRIBUTORS
298 -PATENTS
299 -README.md
300 -)
301 -
302 -go_arch() {
303 - # By chance most portage arch names match Go
304 - local portage_arch=$(tc-arch $@)
305 - case "${portage_arch}" in
306 - x86) echo 386;;
307 - x64-*) echo amd64;;
308 - ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
309 - riscv) echo riscv64 ;;
310 - s390) echo s390x ;;
311 - *) echo "${portage_arch}";;
312 - esac
313 -}
314 -
315 -go_arm() {
316 - case "${1:-${CHOST}}" in
317 - armv5*) echo 5;;
318 - armv6*) echo 6;;
319 - armv7*) echo 7;;
320 - *)
321 - die "unknown GOARM for ${1:-${CHOST}}"
322 - ;;
323 - esac
324 -}
325 -
326 -go_os() {
327 - case "${1:-${CHOST}}" in
328 - *-linux*) echo linux;;
329 - *-darwin*) echo darwin;;
330 - *-freebsd*) echo freebsd;;
331 - *-netbsd*) echo netbsd;;
332 - *-openbsd*) echo openbsd;;
333 - *-solaris*) echo solaris;;
334 - *-cygwin*|*-interix*|*-winnt*)
335 - echo windows
336 - ;;
337 - *)
338 - die "unknown GOOS for ${1:-${CHOST}}"
339 - ;;
340 - esac
341 -}
342 -
343 -go_tuple() {
344 - echo "$(go_os $@)_$(go_arch $@)"
345 -}
346 -
347 -go_cross_compile() {
348 - [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
349 -}
350 -
351 -src_compile() {
352 - if has_version -b dev-lang/go; then
353 - export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
354 - elif has_version -b dev-lang/go-bootstrap; then
355 - export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
356 - else
357 - eerror "Go cannot be built without go or go-bootstrap installed"
358 - die "Should not be here, please report a bug"
359 - fi
360 -
361 - export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
362 - export GOROOT="${PWD}"
363 - export GOBIN="${GOROOT}/bin"
364 -
365 - # Go's build script does not use BUILD/HOST/TARGET consistently. :(
366 - export GOHOSTARCH=$(go_arch ${CBUILD})
367 - export GOHOSTOS=$(go_os ${CBUILD})
368 - export CC=$(tc-getBUILD_CC)
369 -
370 - export GOARCH=$(go_arch)
371 - export GOOS=$(go_os)
372 - export CC_FOR_TARGET=$(tc-getCC)
373 - export CXX_FOR_TARGET=$(tc-getCXX)
374 - use arm && export GOARM=$(go_arm)
375 - use x86 && export GO386=$(usex cpu_flags_x86_sse2 '' 'softfloat')
376 -
377 - cd src
378 - bash -x ./make.bash || die "build failed"
379 -}
380 -
381 -src_test() {
382 - go_cross_compile && return 0
383 -
384 - cd src
385 - PATH="${GOBIN}:${PATH}" \
386 - ./run.bash -no-rebuild || die "tests failed"
387 - cd ..
388 - rm -fr pkg/*_race || die
389 - rm -fr pkg/obj/go-build || die
390 -}
391 -
392 -src_install() {
393 - # There is a known issue which requires the source tree to be installed [1].
394 - # Once this is fixed, we can consider using the doc use flag to control
395 - # installing the doc and src directories.
396 - # The use of cp is deliberate in order to retain permissions
397 - # [1] https://golang.org/issue/2775
398 - dodir /usr/lib/go
399 - cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
400 - einstalldocs
401 -
402 - # testdata directories are not needed on the installed system
403 - rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print)
404 -
405 - local bin_path
406 - if go_cross_compile; then
407 - bin_path="bin/$(go_tuple)"
408 - else
409 - bin_path=bin
410 - fi
411 - local f x
412 - for x in ${bin_path}/*; do
413 - f=${x##*/}
414 - dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
415 - done
416 -
417 - # install the @golang-rebuild set for Portage
418 - insinto /usr/share/portage/config/sets
419 - newins "${FILESDIR}"/go-sets.conf go.conf
420 -}
421 -
422 -pkg_postinst() {
423 - [[ -z ${REPLACING_VERSIONS} ]] && return
424 - einfo "After ${CATEGORY}/${PN} is updated it is recommended to rebuild"
425 - einfo "all packages compiled with previous versions of ${CATEGORY}/${PN}"
426 - einfo "due to the static linking nature of go."
427 - einfo "If this is not done, the packages compiled with the older"
428 - einfo "version of the compiler will not be updated until they are"
429 - einfo "updated individually, which could mean they will have"
430 - einfo "vulnerabilities."
431 - einfo "Run 'emerge @golang-rebuild' to rebuild all 'go' packages"
432 - einfo "See https://bugs.gentoo.org/752153 for more info"
433 -}