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: Wed, 15 Mar 2023 22:46:33
Message-Id: 1678920370.829af3058db8bd847fa14a29619b9bbf02a2a2f6.williamh@gentoo
1 commit: 829af3058db8bd847fa14a29619b9bbf02a2a2f6
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 15 22:46:10 2023 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 15 22:46:10 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=829af305
7
8 dev-lang/go: drop 1.19.5
9
10 Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
11
12 dev-lang/go/Manifest | 1 -
13 dev-lang/go/go-1.19.5.ebuild | 201 -------------------------------------------
14 2 files changed, 202 deletions(-)
15
16 diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
17 index 7fdd1c27f094..1417933049f2 100644
18 --- a/dev-lang/go/Manifest
19 +++ b/dev-lang/go/Manifest
20 @@ -1,4 +1,3 @@
21 -DIST go1.19.5.src.tar.gz 26545858 BLAKE2B da4d77fdcde28bc6e27ddbe013bed4c02cbb17db878ff0d935051daaf7277e2cdfe30d0e6917d4ec2df62ded08117815f2eb12830cef48056f56188ac5eb92fb SHA512 26754f2a4870d0a5484162b626dad5109a33c116675898c84de46155659dadeff2b3fa9ea3dd0c7da8d23c8ff0974cfe42bdd07484e6f784617de3a577b3c883
22 DIST go1.19.6.src.tar.gz 26549360 BLAKE2B cbf17c3dc744aec67b440718488e6acdcf6385bce2654584c273995bb72871642488ad3ea972c6ba07914028a778341d27904402647deab879bd1bbc08b3dd8d SHA512 f817ea6bcd83b60d9bf2ae9d0afdaa21651ac6cf5a32c260f40a691cd0ccce556ec9a483e10fa1a5dc244d6ea512407f5dae9c99ac004393b196a80284e63977
23 DIST go1.19.7.src.tar.gz 26550385 BLAKE2B 282e9e62bd78a7678cfbf18d0134a766e1aa283f9304def537c9feaf9deca406a5ffe775050b17a916143466824067bb26431fb5ae3cc42cdf7131971f474af3 SHA512 e6f0df2d381a424cf43e8ea0306a58a46a96464cff4665ca3da73f713d4f039687a6c9659cef577000b1fadca7c1a2114fac34ffb2017d6335f537ac235de823
24 DIST go1.20.1.src.tar.gz 26172675 BLAKE2B d6daccbebfe3dc014675499ad319eb9a6ae1382feaa42e7fe80d2e4a49bd7b3eccc3144f7cbd18c7c478e557d0e512eb1030d654a894929803838f192d551214 SHA512 57453419fafac8af10f4037b0162326555aab0e87cd1d246d5e977246c075a0504c23022d5c14bfcae9ca1c3250652ddd7c6fcf2209a926525e5f7d0d40ab52d
25
26 diff --git a/dev-lang/go/go-1.19.5.ebuild b/dev-lang/go/go-1.19.5.ebuild
27 deleted file mode 100644
28 index 49682294b92f..000000000000
29 --- a/dev-lang/go/go-1.19.5.ebuild
30 +++ /dev/null
31 @@ -1,201 +0,0 @@
32 -# Copyright 1999-2023 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 ~loong ~mips 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="abi_mips_o32 abi_mips_n64 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 - CONTRIBUTING.md
90 - PATENTS
91 - README.md
92 - SECURITY.md
93 -)
94 -
95 -go_arch() {
96 - # By chance most portage arch names match Go
97 - local tc_arch=$(tc-arch $@)
98 - case "${tc_arch}" in
99 - x86) echo 386;;
100 - x64-*) echo amd64;;
101 - loong) echo loong64;;
102 - mips) if use abi_mips_o32; then
103 - [[ $(tc-endian $@) = big ]] && echo mips || echo mipsle
104 - elif use abi_mips_n64; then
105 - [[ $(tc-endian $@) = big ]] && echo mips64 || echo mips64le
106 - fi ;;
107 - ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
108 - riscv) echo riscv64 ;;
109 - s390) echo s390x ;;
110 - *) echo "${tc_arch}";;
111 - esac
112 -}
113 -
114 -go_arm() {
115 - case "${1:-${CHOST}}" in
116 - armv5*) echo 5;;
117 - armv6*) echo 6;;
118 - armv7*) echo 7;;
119 - *)
120 - die "unknown GOARM for ${1:-${CHOST}}"
121 - ;;
122 - esac
123 -}
124 -
125 -go_os() {
126 - case "${1:-${CHOST}}" in
127 - *-linux*) echo linux;;
128 - *-darwin*) echo darwin;;
129 - *-freebsd*) echo freebsd;;
130 - *-netbsd*) echo netbsd;;
131 - *-openbsd*) echo openbsd;;
132 - *-solaris*) echo solaris;;
133 - *-cygwin*|*-interix*|*-winnt*)
134 - echo windows
135 - ;;
136 - *)
137 - die "unknown GOOS for ${1:-${CHOST}}"
138 - ;;
139 - esac
140 -}
141 -
142 -go_tuple() {
143 - echo "$(go_os $@)_$(go_arch $@)"
144 -}
145 -
146 -go_cross_compile() {
147 - [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
148 -}
149 -
150 -src_compile() {
151 - if has_version -b dev-lang/go; then
152 - export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
153 - elif has_version -b dev-lang/go-bootstrap; then
154 - export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
155 - else
156 - eerror "Go cannot be built without go or go-bootstrap installed"
157 - die "Should not be here, please report a bug"
158 - fi
159 -
160 - export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
161 - export GOROOT="${PWD}"
162 - export GOBIN="${GOROOT}/bin"
163 -
164 - # Go's build script does not use BUILD/HOST/TARGET consistently. :(
165 - export GOHOSTARCH=$(go_arch ${CBUILD})
166 - export GOHOSTOS=$(go_os ${CBUILD})
167 - export CC=$(tc-getBUILD_CC)
168 -
169 - export GOARCH=$(go_arch)
170 - export GOOS=$(go_os)
171 - export CC_FOR_TARGET=$(tc-getCC)
172 - export CXX_FOR_TARGET=$(tc-getCXX)
173 - use arm && export GOARM=$(go_arm)
174 - use x86 && export GO386=$(usex cpu_flags_x86_sse2 '' 'softfloat')
175 -
176 - cd src
177 - bash -x ./make.bash || die "build failed"
178 -}
179 -
180 -src_test() {
181 - go_cross_compile && return 0
182 -
183 - cd src
184 - PATH="${GOBIN}:${PATH}" \
185 - ./run.bash -no-rebuild || die "tests failed"
186 - cd ..
187 - rm -fr pkg/*_race || die
188 - rm -fr pkg/obj/go-build || die
189 -}
190 -
191 -src_install() {
192 - # There is a known issue which requires the source tree to be installed [1].
193 - # Once this is fixed, we can consider using the doc use flag to control
194 - # installing the doc and src directories.
195 - # The use of cp is deliberate in order to retain permissions
196 - # [1] https://golang.org/issue/2775
197 - dodir /usr/lib/go
198 - cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
199 - einstalldocs
200 -
201 - # testdata directories are not needed on the installed system
202 - rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print)
203 -
204 - local bin_path
205 - if go_cross_compile; then
206 - bin_path="bin/$(go_tuple)"
207 - else
208 - bin_path=bin
209 - fi
210 - local f x
211 - for x in ${bin_path}/*; do
212 - f=${x##*/}
213 - dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
214 - done
215 -
216 - # install the @golang-rebuild set for Portage
217 - insinto /usr/share/portage/config/sets
218 - newins "${FILESDIR}"/go-sets.conf go.conf
219 -}
220 -
221 -pkg_postinst() {
222 - [[ -z ${REPLACING_VERSIONS} ]] && return
223 - elog "After ${CATEGORY}/${PN} is updated it is recommended to rebuild"
224 - elog "all packages compiled with previous versions of ${CATEGORY}/${PN}"
225 - elog "due to the static linking nature of go."
226 - elog "If this is not done, the packages compiled with the older"
227 - elog "version of the compiler will not be updated until they are"
228 - elog "updated individually, which could mean they will have"
229 - elog "vulnerabilities."
230 - elog "Run 'emerge @golang-rebuild' to rebuild all 'go' packages"
231 - elog "See https://bugs.gentoo.org/752153 for more info"
232 -}