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