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, 17 May 2022 15:26:29
Message-Id: 1652801120.b32f1f9b4e9d5b982fa5346d33d4a06ab807d80d.williamh@gentoo
1 commit: b32f1f9b4e9d5b982fa5346d33d4a06ab807d80d
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 17 15:25:20 2022 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Tue May 17 15:25:20 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b32f1f9b
7
8 dev-lang/go: drop 1.17.9
9
10 Bug: https://bugs.gentoo.org/843644
11 Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
12
13 dev-lang/go/Manifest | 1 -
14 dev-lang/go/go-1.17.9.ebuild | 196 -------------------------------------------
15 2 files changed, 197 deletions(-)
16
17 diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
18 index 79f3e8910c18..439b88e61dc4 100644
19 --- a/dev-lang/go/Manifest
20 +++ b/dev-lang/go/Manifest
21 @@ -1,3 +1,2 @@
22 DIST go1.17.10.src.tar.gz 22196380 BLAKE2B 548d54aa27aca78b6a5b6338a4496c7072c37a9bbcea78456d0851f562278a872fe63d102a3d68bc3c91266bf07f9f4fc0b903ba047bbf8a0e51d973b6ae2a49 SHA512 92aa95927ce244cab339dd7f2fb7e416605515d496e96618e6e45ecfa7b022ae3a178bf88338a7a9e9e1afea4c9ab5f9c35f5716409cddbab3542daefb6ba425
23 -DIST go1.17.9.src.tar.gz 22200358 BLAKE2B 50c3870bf8bbce805b402b34afadd741e061fc29880a52a1d62d9f7c147a64500729412de4afd05ad7154b12c24c1ae801e734420d74e9f77fad0645cdd9963e SHA512 70c7a6b43531c445cce13963644cc766e5d167597452a1324eacb2ee95bdd9c860ef62f13261bfc4c6baae5773f8953ce6cda9fae21eb7ac0e90bae1ca044a02
24 DIST go1.18.2.src.tar.gz 22837686 BLAKE2B 73bdbdcd7b78baacc123fbc9bb0ae603a5eb2b983192fafe7ccd35c79b526bd8f28979ba48a9fffce0a26dd1ba4d010968c01298671703b272bb0b009819b7e2 SHA512 9214cbc051cf26b49ab1bd4d8d30b060865944b831578a9ea7fcfe33f84009f77932a39f2948efbfc412b151e4734a3bc1f8332f3bea11b35a912b0e23a4118f
25
26 diff --git a/dev-lang/go/go-1.17.9.ebuild b/dev-lang/go/go-1.17.9.ebuild
27 deleted file mode 100644
28 index 7f1ce9304e51..000000000000
29 --- a/dev-lang/go/go-1.17.9.ebuild
30 +++ /dev/null
31 @@ -1,196 +0,0 @@
32 -# Copyright 1999-2022 Gentoo Authors
33 -# Distributed under the terms of the GNU General Public License v2
34 -
35 -EAPI=7
36 -
37 -export CBUILD=${CBUILD:-${CHOST}}
38 -export CTARGET=${CTARGET:-${CHOST}}
39 -
40 -MY_PV=${PV/_/}
41 -
42 -inherit toolchain-funcs
43 -
44 -case ${PV} in
45 -*9999*)
46 - EGIT_REPO_URI="https://github.com/golang/go.git"
47 - inherit git-r3
48 - ;;
49 -*)
50 - SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
51 - S="${WORKDIR}"/go
52 - case ${PV} in
53 - *_beta*|*_rc*) ;;
54 - *)
55 - KEYWORDS="-* amd64 arm arm64 ppc64 ~riscv ~s390 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
56 - ;;
57 - esac
58 -esac
59 -
60 -DESCRIPTION="A concurrent garbage collected and typesafe programming language"
61 -HOMEPAGE="https://go.dev"
62 -
63 -LICENSE="BSD"
64 -SLOT="0/${PV}"
65 -IUSE="cpu_flags_x86_sse2"
66 -
67 -BDEPEND="|| (
68 - dev-lang/go
69 - dev-lang/go-bootstrap )"
70 -
71 -# the *.syso files have writable/executable stacks
72 -QA_EXECSTACK='*.syso'
73 -
74 -# Do not complain about CFLAGS, etc, since Go doesn't use them.
75 -QA_FLAGS_IGNORED='.*'
76 -
77 -# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
78 -QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
79 -
80 -# This package triggers "unrecognized elf file(s)" notices on riscv.
81 -# https://bugs.gentoo.org/794046
82 -QA_PREBUILT='.*'
83 -
84 -# Do not strip this package. Stripping is unsupported upstream and may
85 -# fail.
86 -RESTRICT+=" strip"
87 -
88 -DOCS=(
89 -AUTHORS
90 -CONTRIBUTING.md
91 -CONTRIBUTORS
92 -PATENTS
93 -README.md
94 -)
95 -
96 -go_arch() {
97 - # By chance most portage arch names match Go
98 - local portage_arch=$(tc-arch $@)
99 - case "${portage_arch}" in
100 - x86) echo 386;;
101 - x64-*) echo amd64;;
102 - ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
103 - riscv) echo riscv64 ;;
104 - s390) echo s390x ;;
105 - *) echo "${portage_arch}";;
106 - esac
107 -}
108 -
109 -go_arm() {
110 - case "${1:-${CHOST}}" in
111 - armv5*) echo 5;;
112 - armv6*) echo 6;;
113 - armv7*) echo 7;;
114 - *)
115 - die "unknown GOARM for ${1:-${CHOST}}"
116 - ;;
117 - esac
118 -}
119 -
120 -go_os() {
121 - case "${1:-${CHOST}}" in
122 - *-linux*) echo linux;;
123 - *-darwin*) echo darwin;;
124 - *-freebsd*) echo freebsd;;
125 - *-netbsd*) echo netbsd;;
126 - *-openbsd*) echo openbsd;;
127 - *-solaris*) echo solaris;;
128 - *-cygwin*|*-interix*|*-winnt*)
129 - echo windows
130 - ;;
131 - *)
132 - die "unknown GOOS for ${1:-${CHOST}}"
133 - ;;
134 - esac
135 -}
136 -
137 -go_tuple() {
138 - echo "$(go_os $@)_$(go_arch $@)"
139 -}
140 -
141 -go_cross_compile() {
142 - [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
143 -}
144 -
145 -src_compile() {
146 - if has_version -b dev-lang/go; then
147 - export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
148 - elif has_version -b dev-lang/go-bootstrap; then
149 - export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
150 - else
151 - eerror "Go cannot be built without go or go-bootstrap installed"
152 - die "Should not be here, please report a bug"
153 - fi
154 -
155 - export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
156 - export GOROOT="${PWD}"
157 - export GOBIN="${GOROOT}/bin"
158 -
159 - # Go's build script does not use BUILD/HOST/TARGET consistently. :(
160 - export GOHOSTARCH=$(go_arch ${CBUILD})
161 - export GOHOSTOS=$(go_os ${CBUILD})
162 - export CC=$(tc-getBUILD_CC)
163 -
164 - export GOARCH=$(go_arch)
165 - export GOOS=$(go_os)
166 - export CC_FOR_TARGET=$(tc-getCC)
167 - export CXX_FOR_TARGET=$(tc-getCXX)
168 - use arm && export GOARM=$(go_arm)
169 - use x86 && export GO386=$(usex cpu_flags_x86_sse2 '' 'softfloat')
170 -
171 - cd src
172 - bash -x ./make.bash || die "build failed"
173 -}
174 -
175 -src_test() {
176 - go_cross_compile && return 0
177 -
178 - cd src
179 - PATH="${GOBIN}:${PATH}" \
180 - ./run.bash -no-rebuild || die "tests failed"
181 - cd ..
182 - rm -fr pkg/*_race || die
183 - rm -fr pkg/obj/go-build || die
184 -}
185 -
186 -src_install() {
187 - # There is a known issue which requires the source tree to be installed [1].
188 - # Once this is fixed, we can consider using the doc use flag to control
189 - # installing the doc and src directories.
190 - # The use of cp is deliberate in order to retain permissions
191 - # [1] https://golang.org/issue/2775
192 - dodir /usr/lib/go
193 - cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
194 - einstalldocs
195 -
196 - # testdata directories are not needed on the installed system
197 - rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print)
198 -
199 - local bin_path
200 - if go_cross_compile; then
201 - bin_path="bin/$(go_tuple)"
202 - else
203 - bin_path=bin
204 - fi
205 - local f x
206 - for x in ${bin_path}/*; do
207 - f=${x##*/}
208 - dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
209 - done
210 -
211 - # install the @golang-rebuild set for Portage
212 - insinto /usr/share/portage/config/sets
213 - newins "${FILESDIR}"/go-sets.conf go.conf
214 -}
215 -
216 -pkg_postinst() {
217 - [[ -z ${REPLACING_VERSIONS} ]] && return
218 - elog "After ${CATEGORY}/${PN} is updated it is recommended to rebuild"
219 - elog "all packages compiled with previous versions of ${CATEGORY}/${PN}"
220 - elog "due to the static linking nature of go."
221 - elog "If this is not done, the packages compiled with the older"
222 - elog "version of the compiler will not be updated until they are"
223 - elog "updated individually, which could mean they will have"
224 - elog "vulnerabilities."
225 - elog "Run 'emerge @golang-rebuild' to rebuild all 'go' packages"
226 - elog "See https://bugs.gentoo.org/752153 for more info"
227 -}