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: Sun, 27 Mar 2022 06:29:36
Message-Id: 1648362561.c7cf4bbfefa8561c12a2ef01f410b6cd9b0a283a.williamh@gentoo
1 commit: c7cf4bbfefa8561c12a2ef01f410b6cd9b0a283a
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 27 06:29:04 2022 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 27 06:29:21 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7cf4bbf
7
8 dev-lang/go: drop 1.17.7
9
10 Bug: https://bugs.gentoo.org/834635
11 Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
12
13 dev-lang/go/Manifest | 1 -
14 dev-lang/go/go-1.17.7.ebuild | 196 -------------------------------------------
15 2 files changed, 197 deletions(-)
16
17 diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
18 index c8a5791810c8..d3530485196c 100644
19 --- a/dev-lang/go/Manifest
20 +++ b/dev-lang/go/Manifest
21 @@ -1,3 +1,2 @@
22 -DIST go1.17.7.src.tar.gz 22195583 BLAKE2B 3ea226fe3089729435d9b9e09880432fef4780303705b6424da9e7ce662aadf54d9c179a5fec8152754dabbb9d53958e35d0119a497bb8f888dbf933b625ce74 SHA512 ee20a97d19e501ee2c11930548bcacfa8b1e8499bbae15659231548f4b03c13bc92bb20c4ce879f0956c02268e748c73ba56d8b140ce8f134501c33cc8b58d3c
23 DIST go1.17.8.src.tar.gz 22199282 BLAKE2B 359089402c4f67b8102689a5772f6a168938c57fc3c809681f65f95725ce0a3b528d6cdfeff0da50844f5cfdb941d427658907c30597872315b1fd68a3a61be8 SHA512 21d5c51ce62bc3b987dd5bf7c6b7e1a934fe40582bfbbe99ca80c26d41253e796a4b9d02c571f1e5ab3fd7c3950175e23b9929b0d934f421c96a6d6128c44668
24 DIST go1.18.src.tar.gz 22827832 BLAKE2B a961563352721455c9913cd71d8f56c5409e2d4edd44144f09aaba60daf353f844884db6a20943bd84f3634ef0dd330d43d27f5a65911eb4d4d877bfc71c4f40 SHA512 f10356df9099e4d027415be5c73bd2551f2f941a31feb21e1ccc03b7d8faa1844f0a639a508e990712e11ec335675e57504edb323fa1eee63e1d09b8523b3b0d
25
26 diff --git a/dev-lang/go/go-1.17.7.ebuild b/dev-lang/go/go-1.17.7.ebuild
27 deleted file mode 100644
28 index 7f1ce9304e51..000000000000
29 --- a/dev-lang/go/go-1.17.7.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 -}