1 |
commit: 22d1bf94b86795fbb3a02c9934e35b042bd3580c |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 2 20:13:07 2022 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 2 20:13:07 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22d1bf94 |
7 |
|
8 |
dev-lang/go: drop 1.17.12, 1.17.13 |
9 |
|
10 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
11 |
|
12 |
dev-lang/go/Manifest | 2 - |
13 |
dev-lang/go/go-1.17.12.ebuild | 196 ------------------------------------------ |
14 |
dev-lang/go/go-1.17.13.ebuild | 196 ------------------------------------------ |
15 |
3 files changed, 394 deletions(-) |
16 |
|
17 |
diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest |
18 |
index 8f16f71f142f..f6114907e190 100644 |
19 |
--- a/dev-lang/go/Manifest |
20 |
+++ b/dev-lang/go/Manifest |
21 |
@@ -1,5 +1,3 @@ |
22 |
-DIST go1.17.12.src.tar.gz 22205674 BLAKE2B 0770f1979ba9c14779e078638b2d5f9b6af1a62939f863abadc3c84418ce639715e61ed4763674e2e2d0d95219636e59e53a0db658ae02f17e713205789fcc5a SHA512 d2bcea2a33723af5c2ae871f5c44694c69d37c74c62e81eddeaf4bfedf124feea2752997d3a359990071bf01f88942fc66b21cb092385946ad4ae9410854c8b9 |
23 |
-DIST go1.17.13.src.tar.gz 22206518 BLAKE2B b227e5197c6466e7dc4594646a6b5f7e2f5e8bc0d44b8ab45b488f5249eb64ff736fccf0e0070d6685a08361e1b3dd1a2ee7050df6395bec519a7ae7dca78630 SHA512 2820bdd679fdb5e37d4c601b26c246bab23d4e8e1b226ac37c38e90a68b693e877bff944275eb25e3296ee772e7b40ef7d71dd49cca524df4cb8e721bfb50c33 |
24 |
DIST go1.18.4.src.tar.gz 22845866 BLAKE2B 9997100ab5ae8a8ffdf4d2515d45d0bf29decf6d117d8f0079f0ec3fe63b3c5a32181e17c13de2ea656a5e8c87c1ed3f0e00945f717a306d23542bc0425d1d26 SHA512 4872956e31fa5d681021db12e876bc60a1815cf45203e75db83d6c54e9b7138766ae44bf1659db5333eba0b6097aea1990519795fffd2f124e7a78b78df1339b |
25 |
DIST go1.18.5.src.tar.gz 22847094 BLAKE2B 8edf133aa5b1fa4076db72bd7c63240db6cbd6b9b4725c2a71384ff302bee77e193bcfad6b55bfd31ee58f08fc59d9bbee5750d9227598fe402d6293863595ff SHA512 4ba69ad49b5c17963fdc39ae7f5360fa38950db39ec1fb9b52744d6a209abf177dab6bd587e7457c83a4fd265589907ec241d8b09d0eac76cf984243a14500ef |
26 |
DIST go1.19.src.tar.gz 26521849 BLAKE2B 2f985c4a9a125fa81fb6bd83e47d2382b4f256b689da1e16b53cdd83c896894d89b8601fc6263e8cb344d9e45c9b647d0d3c88fdf65bb304a352612d98e4bb7c SHA512 c4460d54957a0bcf3407ea72cd1c6b3c645ef4ef6cc0fa142a80cb43c06ca4af31d52b0ccd723c81d17a62004bc96559cad23da874a4b668b4d8b168f1da2186 |
27 |
|
28 |
diff --git a/dev-lang/go/go-1.17.12.ebuild b/dev-lang/go/go-1.17.12.ebuild |
29 |
deleted file mode 100644 |
30 |
index 7f1ce9304e51..000000000000 |
31 |
--- a/dev-lang/go/go-1.17.12.ebuild |
32 |
+++ /dev/null |
33 |
@@ -1,196 +0,0 @@ |
34 |
-# Copyright 1999-2022 Gentoo Authors |
35 |
-# Distributed under the terms of the GNU General Public License v2 |
36 |
- |
37 |
-EAPI=7 |
38 |
- |
39 |
-export CBUILD=${CBUILD:-${CHOST}} |
40 |
-export CTARGET=${CTARGET:-${CHOST}} |
41 |
- |
42 |
-MY_PV=${PV/_/} |
43 |
- |
44 |
-inherit toolchain-funcs |
45 |
- |
46 |
-case ${PV} in |
47 |
-*9999*) |
48 |
- EGIT_REPO_URI="https://github.com/golang/go.git" |
49 |
- inherit git-r3 |
50 |
- ;; |
51 |
-*) |
52 |
- SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " |
53 |
- S="${WORKDIR}"/go |
54 |
- case ${PV} in |
55 |
- *_beta*|*_rc*) ;; |
56 |
- *) |
57 |
- KEYWORDS="-* amd64 arm arm64 ppc64 ~riscv ~s390 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" |
58 |
- ;; |
59 |
- esac |
60 |
-esac |
61 |
- |
62 |
-DESCRIPTION="A concurrent garbage collected and typesafe programming language" |
63 |
-HOMEPAGE="https://go.dev" |
64 |
- |
65 |
-LICENSE="BSD" |
66 |
-SLOT="0/${PV}" |
67 |
-IUSE="cpu_flags_x86_sse2" |
68 |
- |
69 |
-BDEPEND="|| ( |
70 |
- dev-lang/go |
71 |
- dev-lang/go-bootstrap )" |
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.13.ebuild b/dev-lang/go/go-1.17.13.ebuild |
232 |
deleted file mode 100644 |
233 |
index 217891046702..000000000000 |
234 |
--- a/dev-lang/go/go-1.17.13.ebuild |
235 |
+++ /dev/null |
236 |
@@ -1,196 +0,0 @@ |
237 |
-# Copyright 1999-2022 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://go.dev" |
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 |
- |
276 |
-# the *.syso files have writable/executable stacks |
277 |
-QA_EXECSTACK='*.syso' |
278 |
- |
279 |
-# Do not complain about CFLAGS, etc, since Go doesn't use them. |
280 |
-QA_FLAGS_IGNORED='.*' |
281 |
- |
282 |
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail. |
283 |
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" |
284 |
- |
285 |
-# This package triggers "unrecognized elf file(s)" notices on riscv. |
286 |
-# https://bugs.gentoo.org/794046 |
287 |
-QA_PREBUILT='.*' |
288 |
- |
289 |
-# Do not strip this package. Stripping is unsupported upstream and may |
290 |
-# fail. |
291 |
-RESTRICT+=" strip" |
292 |
- |
293 |
-DOCS=( |
294 |
-AUTHORS |
295 |
-CONTRIBUTING.md |
296 |
-CONTRIBUTORS |
297 |
-PATENTS |
298 |
-README.md |
299 |
-) |
300 |
- |
301 |
-go_arch() { |
302 |
- # By chance most portage arch names match Go |
303 |
- local portage_arch=$(tc-arch $@) |
304 |
- case "${portage_arch}" in |
305 |
- x86) echo 386;; |
306 |
- x64-*) echo amd64;; |
307 |
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;; |
308 |
- riscv) echo riscv64 ;; |
309 |
- s390) echo s390x ;; |
310 |
- *) echo "${portage_arch}";; |
311 |
- esac |
312 |
-} |
313 |
- |
314 |
-go_arm() { |
315 |
- case "${1:-${CHOST}}" in |
316 |
- armv5*) echo 5;; |
317 |
- armv6*) echo 6;; |
318 |
- armv7*) echo 7;; |
319 |
- *) |
320 |
- die "unknown GOARM for ${1:-${CHOST}}" |
321 |
- ;; |
322 |
- esac |
323 |
-} |
324 |
- |
325 |
-go_os() { |
326 |
- case "${1:-${CHOST}}" in |
327 |
- *-linux*) echo linux;; |
328 |
- *-darwin*) echo darwin;; |
329 |
- *-freebsd*) echo freebsd;; |
330 |
- *-netbsd*) echo netbsd;; |
331 |
- *-openbsd*) echo openbsd;; |
332 |
- *-solaris*) echo solaris;; |
333 |
- *-cygwin*|*-interix*|*-winnt*) |
334 |
- echo windows |
335 |
- ;; |
336 |
- *) |
337 |
- die "unknown GOOS for ${1:-${CHOST}}" |
338 |
- ;; |
339 |
- esac |
340 |
-} |
341 |
- |
342 |
-go_tuple() { |
343 |
- echo "$(go_os $@)_$(go_arch $@)" |
344 |
-} |
345 |
- |
346 |
-go_cross_compile() { |
347 |
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] |
348 |
-} |
349 |
- |
350 |
-src_compile() { |
351 |
- if has_version -b dev-lang/go; then |
352 |
- export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go" |
353 |
- elif has_version -b dev-lang/go-bootstrap; then |
354 |
- export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap" |
355 |
- else |
356 |
- eerror "Go cannot be built without go or go-bootstrap installed" |
357 |
- die "Should not be here, please report a bug" |
358 |
- fi |
359 |
- |
360 |
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go |
361 |
- export GOROOT="${PWD}" |
362 |
- export GOBIN="${GOROOT}/bin" |
363 |
- |
364 |
- # Go's build script does not use BUILD/HOST/TARGET consistently. :( |
365 |
- export GOHOSTARCH=$(go_arch ${CBUILD}) |
366 |
- export GOHOSTOS=$(go_os ${CBUILD}) |
367 |
- export CC=$(tc-getBUILD_CC) |
368 |
- |
369 |
- export GOARCH=$(go_arch) |
370 |
- export GOOS=$(go_os) |
371 |
- export CC_FOR_TARGET=$(tc-getCC) |
372 |
- export CXX_FOR_TARGET=$(tc-getCXX) |
373 |
- use arm && export GOARM=$(go_arm) |
374 |
- use x86 && export GO386=$(usex cpu_flags_x86_sse2 '' 'softfloat') |
375 |
- |
376 |
- cd src |
377 |
- bash -x ./make.bash || die "build failed" |
378 |
-} |
379 |
- |
380 |
-src_test() { |
381 |
- go_cross_compile && return 0 |
382 |
- |
383 |
- cd src |
384 |
- PATH="${GOBIN}:${PATH}" \ |
385 |
- ./run.bash -no-rebuild || die "tests failed" |
386 |
- cd .. |
387 |
- rm -fr pkg/*_race || die |
388 |
- rm -fr pkg/obj/go-build || die |
389 |
-} |
390 |
- |
391 |
-src_install() { |
392 |
- # There is a known issue which requires the source tree to be installed [1]. |
393 |
- # Once this is fixed, we can consider using the doc use flag to control |
394 |
- # installing the doc and src directories. |
395 |
- # The use of cp is deliberate in order to retain permissions |
396 |
- # [1] https://golang.org/issue/2775 |
397 |
- dodir /usr/lib/go |
398 |
- cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go |
399 |
- einstalldocs |
400 |
- |
401 |
- # testdata directories are not needed on the installed system |
402 |
- rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print) |
403 |
- |
404 |
- local bin_path |
405 |
- if go_cross_compile; then |
406 |
- bin_path="bin/$(go_tuple)" |
407 |
- else |
408 |
- bin_path=bin |
409 |
- fi |
410 |
- local f x |
411 |
- for x in ${bin_path}/*; do |
412 |
- f=${x##*/} |
413 |
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} |
414 |
- done |
415 |
- |
416 |
- # install the @golang-rebuild set for Portage |
417 |
- insinto /usr/share/portage/config/sets |
418 |
- newins "${FILESDIR}"/go-sets.conf go.conf |
419 |
-} |
420 |
- |
421 |
-pkg_postinst() { |
422 |
- [[ -z ${REPLACING_VERSIONS} ]] && return |
423 |
- elog "After ${CATEGORY}/${PN} is updated it is recommended to rebuild" |
424 |
- elog "all packages compiled with previous versions of ${CATEGORY}/${PN}" |
425 |
- elog "due to the static linking nature of go." |
426 |
- elog "If this is not done, the packages compiled with the older" |
427 |
- elog "version of the compiler will not be updated until they are" |
428 |
- elog "updated individually, which could mean they will have" |
429 |
- elog "vulnerabilities." |
430 |
- elog "Run 'emerge @golang-rebuild' to rebuild all 'go' packages" |
431 |
- elog "See https://bugs.gentoo.org/752153 for more info" |
432 |
-} |