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: Mon, 23 Aug 2021 05:35:22
Message-Id: 1629696906.162e233bb6af458f015d183b78b14a0d22910577.williamh@gentoo
1 commit: 162e233bb6af458f015d183b78b14a0d22910577
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 23 05:34:46 2021 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 23 05:35:06 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=162e233b
7
8 dev-lang/go: remove 1.16.6
9
10 Bug: https://bugs.gentoo.org/806659
11 Package-Manager: Portage-3.0.20, Repoman-3.0.3
12 Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
13
14 dev-lang/go/Manifest | 1 -
15 dev-lang/go/go-1.16.6.ebuild | 194 -------------------------------------------
16 2 files changed, 195 deletions(-)
17
18 diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
19 index 4d5c2ff35e5..ce21718c2e2 100644
20 --- a/dev-lang/go/Manifest
21 +++ b/dev-lang/go/Manifest
22 @@ -1,3 +1,2 @@
23 -DIST go1.16.6.src.tar.gz 20923044 BLAKE2B 7a46d33f947c1d7f2c6f5e0085cba89520fdb8859fc804c8318b85d0b0e888b74ca074affcf3119c2d80157485e8f679e37390cbd58c644b38948f7d15428b7b SHA512 82634763dce636c9e9cba1bbf74a669e8b88e6df095e80672f295edb82cc1fc4b8ffde91a1f56c3470f2c4d9ee0404f65146d7478b645890623f6c463513a61f
24 DIST go1.16.7.src.tar.gz 20922206 BLAKE2B 65e53684f66975313caf4661a7c52b178dde8b32ac40f98fe8164fe035c835e1407ef442d41c7cbf907d5093703e440d0e62c398f8ed541bad074b537f6dd6ff SHA512 1aab6f3dcbae71ebfa29a1d9a46613a3aa48de01cee82b48842d92abbb4ee57db019a4d47a3f12af9553c8e2a982e90114a06ee187f908f7c29245d9786b9186
25 DIST go1.17.src.tar.gz 22178549 BLAKE2B 86cb84ff782eaee3fc0411b1f31cd985f3fdcda7b2709f3a94cba0fbe827ac13632d0476e1f67deaf06d2352c2ea3ac9217db7d170702dffff6a64beabdb0814 SHA512 bb94d69555faa103bc092ce85b73168954a553a5c72e4b38c39bd99a3eb4db679f352685e66507b0945ed12676eb2a0c51674e456f68a9a5b98c3ec6a948d35b
26
27 diff --git a/dev-lang/go/go-1.16.6.ebuild b/dev-lang/go/go-1.16.6.ebuild
28 deleted file mode 100644
29 index e24025473dc..00000000000
30 --- a/dev-lang/go/go-1.16.6.ebuild
31 +++ /dev/null
32 @@ -1,194 +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 -# Do not complain about CFLAGS, etc, since Go doesn't use them.
74 -QA_FLAGS_IGNORED='.*'
75 -
76 -# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
77 -QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
78 -
79 -# This package triggers "unrecognized elf file(s)" notices on riscv.
80 -# https://bugs.gentoo.org/794046
81 -QA_PREBUILT='.*'
82 -
83 -# Do not strip this package. Stripping is unsupported upstream and may
84 -# fail.
85 -RESTRICT+=" strip"
86 -
87 -DOCS=(
88 -AUTHORS
89 -CONTRIBUTING.md
90 -CONTRIBUTORS
91 -PATENTS
92 -README.md
93 -)
94 -
95 -go_arch() {
96 - # By chance most portage arch names match Go
97 - local portage_arch=$(tc-arch $@)
98 - case "${portage_arch}" in
99 - x86) echo 386;;
100 - x64-*) echo amd64;;
101 - ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
102 - riscv) echo riscv64 ;;
103 - s390) echo s390x ;;
104 - *) echo "${portage_arch}";;
105 - esac
106 -}
107 -
108 -go_arm() {
109 - case "${1:-${CHOST}}" in
110 - armv5*) echo 5;;
111 - armv6*) echo 6;;
112 - armv7*) echo 7;;
113 - *)
114 - die "unknown GOARM for ${1:-${CHOST}}"
115 - ;;
116 - esac
117 -}
118 -
119 -go_os() {
120 - case "${1:-${CHOST}}" in
121 - *-linux*) echo linux;;
122 - *-darwin*) echo darwin;;
123 - *-freebsd*) echo freebsd;;
124 - *-netbsd*) echo netbsd;;
125 - *-openbsd*) echo openbsd;;
126 - *-solaris*) echo solaris;;
127 - *-cygwin*|*-interix*|*-winnt*)
128 - echo windows
129 - ;;
130 - *)
131 - die "unknown GOOS for ${1:-${CHOST}}"
132 - ;;
133 - esac
134 -}
135 -
136 -go_tuple() {
137 - echo "$(go_os $@)_$(go_arch $@)"
138 -}
139 -
140 -go_cross_compile() {
141 - [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
142 -}
143 -
144 -src_compile() {
145 - if has_version -b dev-lang/go; then
146 - export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
147 - elif has_version -b dev-lang/go-bootstrap; then
148 - export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
149 - else
150 - eerror "Go cannot be built without go or go-bootstrap installed"
151 - die "Should not be here, please report a bug"
152 - fi
153 -
154 - export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
155 - export GOROOT="${PWD}"
156 - export GOBIN="${GOROOT}/bin"
157 -
158 - # Go's build script does not use BUILD/HOST/TARGET consistently. :(
159 - export GOHOSTARCH=$(go_arch ${CBUILD})
160 - export GOHOSTOS=$(go_os ${CBUILD})
161 - export CC=$(tc-getBUILD_CC)
162 -
163 - export GOARCH=$(go_arch)
164 - export GOOS=$(go_os)
165 - export CC_FOR_TARGET=$(tc-getCC)
166 - export CXX_FOR_TARGET=$(tc-getCXX)
167 - use arm && export GOARM=$(go_arm)
168 - use x86 && export GO386=$(usex cpu_flags_x86_sse2 '' 'softfloat')
169 -
170 - cd src
171 - bash -x ./make.bash || die "build failed"
172 -}
173 -
174 -src_test() {
175 - go_cross_compile && return 0
176 -
177 - cd src
178 - PATH="${GOBIN}:${PATH}" \
179 - ./run.bash -no-rebuild || die "tests failed"
180 - cd ..
181 - rm -fr pkg/*_race || die
182 - rm -fr pkg/obj/go-build || die
183 -}
184 -
185 -src_install() {
186 - # There is a known issue which requires the source tree to be installed [1].
187 - # Once this is fixed, we can consider using the doc use flag to control
188 - # installing the doc and src directories.
189 - # The use of cp is deliberate in order to retain permissions
190 - # [1] https://golang.org/issue/2775
191 - dodir /usr/lib/go
192 - cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
193 - einstalldocs
194 -
195 - # testdata directories are not needed on the installed system
196 - rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print)
197 -
198 - local bin_path
199 - if go_cross_compile; then
200 - bin_path="bin/$(go_tuple)"
201 - else
202 - bin_path=bin
203 - fi
204 - local f x
205 - for x in ${bin_path}/*; do
206 - f=${x##*/}
207 - dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
208 - done
209 -
210 - # install the @golang-rebuild set for Portage
211 - insinto /usr/share/portage/config/sets
212 - newins "${FILESDIR}"/go-sets.conf go.conf
213 -}
214 -
215 -pkg_postinst() {
216 - [[ -z ${REPLACING_VERSIONS} ]] && return
217 - einfo "After ${CATEGORY}/${PN} is updated it is recommended to rebuild"
218 - einfo "all packages compiled with previous versions of ${CATEGORY}/${PN}"
219 - einfo "due to the static linking nature of go."
220 - einfo "If this is not done, the packages compiled with the older"
221 - einfo "version of the compiler will not be updated until they are"
222 - einfo "updated individually, which could mean they will have"
223 - einfo "vulnerabilities."
224 - einfo "Run 'emerge @golang-rebuild' to rebuild all 'go' packages"
225 - einfo "See https://bugs.gentoo.org/752153 for more info"
226 -}