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, 18 Sep 2019 23:23:01
Message-Id: 1568848005.505ee98b16eabfec2d870c0c9e13a1ba13c490f3.williamh@gentoo
1 commit: 505ee98b16eabfec2d870c0c9e13a1ba13c490f3
2 Author: William Hubbs <william.hubbs <AT> sony <DOT> com>
3 AuthorDate: Wed Sep 18 23:04:55 2019 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 18 23:06:45 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=505ee98b
7
8 dev-lang/go: remove old version
9
10 Copyright: Sony Interactive Entertainment Inc.
11 Package-Manager: Portage-2.3.69, Repoman-2.3.16
12 Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
13
14 dev-lang/go/Manifest | 1 -
15 dev-lang/go/go-1.12.8.ebuild | 246 -------------------------------------------
16 2 files changed, 247 deletions(-)
17
18 diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
19 index ff133b11987..48ebf9d5824 100644
20 --- a/dev-lang/go/Manifest
21 +++ b/dev-lang/go/Manifest
22 @@ -9,6 +9,5 @@ DIST go-linux-ppc64-bootstrap-1.8.tbz 52315782 BLAKE2B 6be0a48e8bc4e5fed4d34f8aa
23 DIST go-linux-ppc64le-bootstrap-1.8.tbz 52211575 BLAKE2B 7a28ec5a381369c4e9415c8360e904c2545380513afd328077c584e8af0bf6bd818aa03e5a58c350cbb98facc1c9dccb02b06adcb27233875497cf5d33265912 SHA512 6931d999dd0ee1ff44c4cec48acb27af061f57f87aa74802dcebab78553b46bc8ac732f07fe91e5074dbdd32c55b707994875934bfb12bb4276d71eb1d06c4ba
24 DIST go-linux-s390x-bootstrap-1.8.tbz 57124869 BLAKE2B 920a176b8f4fc3a816e724324bbb30a383d599e31a0d2093d24797dbcd0e799a662a3589dbb87d2f5dd16df07c4cf8f1e444e87b540ec732746bb025dc9271f8 SHA512 d429cae870d66217ab2e07c74209d3031d97baa4f899b4d70ae6283a1a5b1434b037904c4cfca0b2bc798d5ba0b358c3739e000eccbc74809baf564c5686df5a
25 DIST go-solaris-amd64-bootstrap-1.8.tbz 54926326 BLAKE2B 0a45312f090d81ebf46fe5950cb65c059e2801394231e715e94145d1f918eb59b10472b2385e57ebd5cfb9eca0ad7290fb118436486b665520bb540970f971ab SHA512 52b849e5b9a940e10de7ba3df0ebdf6e1c5d631de9581d936c9edf8f38e6bb3314acbc2b2d5202b0528fde2a359d52bc0c6f39acf9b1b614725e4b4a947ed10d
26 -DIST go1.12.8.src.tar.gz 21978756 BLAKE2B 65258c101d729bbd82f69ba4286ba8e64f9d3128be97243374d442dfcc4033f1238bb57530a34dc0142f55cc8f2692efab65452286c4769f24e8aa3a4a80abd1 SHA512 193a9b08752aa2479c19f5b56fdfe2296c7e6097e0c583290f0fce754ac7571e2ff345f66b69774d8e22f2caa147a3dc15658148017b09e5e7f49fd4569373d4
27 DIST go1.12.9.src.tar.gz 21979950 BLAKE2B dca7e3afcabd513c4b8193e93c0a1ed1a2326dccfce9b909d97b3731fffbe7e26712ab164645e06a316baa949b1e0b14a2fea8d23e6f90fd5b72afa0d15b432b SHA512 57041e7fb767f528aa9fc2592d205d3a7c120c73f92dc8d91f17f816e12aa6152c8421b333081800a5f50b1bb656f203a25faf8ed92c69a6ec164ce0a5619c13
28 DIST go1.13.src.tar.gz 21621948 BLAKE2B dff6024287c0805ec735cb40aef4ffd872bdc17df6e0d531be3d16806292edde2a63299fe7b9b3c97a79f6f864ab0f95962a0cd2e1a0ba0216b3f4bc59bf4bcf SHA512 c6346b1ab256cb743dd98625d8b16cdcc1365b186e039e99747d6c18041045daa065f6bdce17cca0a9800be2dbb34e90adf5518d5295693f80435c02fe5b2cd8
29
30 diff --git a/dev-lang/go/go-1.12.8.ebuild b/dev-lang/go/go-1.12.8.ebuild
31 deleted file mode 100644
32 index daee1d59a92..00000000000
33 --- a/dev-lang/go/go-1.12.8.ebuild
34 +++ /dev/null
35 @@ -1,246 +0,0 @@
36 -# Copyright 1999-2019 Gentoo Authors
37 -# Distributed under the terms of the GNU General Public License v2
38 -
39 -EAPI=7
40 -
41 -export CBUILD=${CBUILD:-${CHOST}}
42 -export CTARGET=${CTARGET:-${CHOST}}
43 -
44 -MY_PV=${PV/_/}
45 -
46 -inherit toolchain-funcs
47 -
48 -BOOTSTRAP_VERSION="bootstrap-1.8"
49 -BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist"
50 -BOOTSTRAP_URI="
51 - ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz
52 - ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz
53 - ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz
54 - ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz
55 - ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz
56 - ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz
57 - ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz
58 - ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz
59 - ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz
60 - ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz
61 - ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz
62 -"
63 -
64 -case ${PV} in
65 -*9999*)
66 - EGIT_REPO_URI="https://github.com/golang/go.git"
67 - inherit git-r3
68 - ;;
69 -*)
70 - SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
71 - S="${WORKDIR}"/go
72 - case ${PV} in
73 - *_beta*|*_rc*) ;;
74 - *)
75 - KEYWORDS="-* amd64 arm ~arm64 ~ppc64 ~s390 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
76 - # The upstream tests fail under portage but pass if the build is
77 - # run according to their documentation [1].
78 - # I am restricting the tests on released versions until this is
79 - # solved.
80 - # [1] https://golang.org/issues/18442
81 - RESTRICT="test"
82 - ;;
83 - esac
84 -esac
85 -
86 -# If gccgo or a previously installed version of dev-lang/go is not being
87 -# used to build Go, there is no way to know the architecture or operating system
88 -# of the build machine, so we need to download all of our bootstrap
89 -# archives to allow this ebuild to work under crossdev.
90 -#
91 -# https://bugs.gentoo.org/671394
92 -SRC_URI+="!gccgo? ( !system-bootstrap? ( ${BOOTSTRAP_URI} ) )"
93 -
94 -DESCRIPTION="A concurrent garbage collected and typesafe programming language"
95 -HOMEPAGE="https://golang.org"
96 -
97 -LICENSE="BSD"
98 -SLOT="0/${PV}"
99 -IUSE="gccgo system-bootstrap"
100 -
101 -BDEPEND="gccgo? ( >=sys-devel/gcc-5[go] )"
102 -RDEPEND="!<dev-go/go-tools-0_pre20150902"
103 -
104 -# These test data objects have writable/executable stacks.
105 -QA_EXECSTACK="
106 - usr/lib/go/src/debug/elf/testdata/*.obj
107 - usr/lib/go/src/*.gox
108 - "
109 -
110 -# Do not complain about CFLAGS, etc, since Go doesn't use them.
111 -QA_FLAGS_IGNORED='.*'
112 -
113 -REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*"
114 -
115 -# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
116 -QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
117 -
118 -# Do not strip this package. Stripping is unsupported upstream and may
119 -# fail.
120 -RESTRICT+=" strip"
121 -
122 -DOCS=(
123 -AUTHORS
124 -CONTRIBUTING.md
125 -CONTRIBUTORS
126 -PATENTS
127 -README.md
128 -)
129 -
130 -go_arch()
131 -{
132 - # By chance most portage arch names match Go
133 - local portage_arch=$(tc-arch $@)
134 - case "${portage_arch}" in
135 - x86) echo 386;;
136 - x64-*) echo amd64;;
137 - ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
138 - s390) echo s390x ;;
139 - *) echo "${portage_arch}";;
140 - esac
141 -}
142 -
143 -go_arm()
144 -{
145 - case "${1:-${CHOST}}" in
146 - armv5*) echo 5;;
147 - armv6*) echo 6;;
148 - armv7*) echo 7;;
149 - *)
150 - die "unknown GOARM for ${1:-${CHOST}}"
151 - ;;
152 - esac
153 -}
154 -
155 -go_os()
156 -{
157 - case "${1:-${CHOST}}" in
158 - *-linux*) echo linux;;
159 - *-darwin*) echo darwin;;
160 - *-freebsd*) echo freebsd;;
161 - *-netbsd*) echo netbsd;;
162 - *-openbsd*) echo openbsd;;
163 - *-solaris*) echo solaris;;
164 - *-cygwin*|*-interix*|*-winnt*)
165 - echo windows
166 - ;;
167 - *)
168 - die "unknown GOOS for ${1:-${CHOST}}"
169 - ;;
170 - esac
171 -}
172 -
173 -go_tuple()
174 -{
175 - echo "$(go_os $@)_$(go_arch $@)"
176 -}
177 -
178 -go_cross_compile()
179 -{
180 - [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
181 -}
182 -
183 -pkg_pretend()
184 -{
185 - # make.bash does not understand cross-compiling a cross-compiler
186 - if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then
187 - die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}"
188 - fi
189 - [[ ${MERGE_TYPE} != binary ]] &&
190 - use system-bootstrap && ! has_version "dev-lang/go" &&
191 - die "dev-lang/go must be installed to use the system-bootstrap use flag"
192 -}
193 -
194 -src_unpack()
195 -{
196 - if [[ ${PV} = 9999 ]]; then
197 - git-r3_src_unpack
198 - else
199 - unpack "go${MY_PV}.src.tar.gz"
200 - fi
201 - use gccgo || use system-bootstrap ||
202 - unpack "go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-${BOOTSTRAP_VERSION}.tbz"
203 -}
204 -
205 -src_compile()
206 -{
207 - export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-bootstrap
208 - if use gccgo; then
209 - mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die
210 - local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version)
211 - [[ -x ${go_binary} ]] || go_binary=$(
212 - find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) |
213 - sort -V | tail -n1)
214 - [[ -x ${go_binary} ]] ||
215 - die "go-$(gcc-major-version): command not found"
216 - ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die
217 - elif use system-bootstrap; then
218 - export GOROOT_BOOTSTRAP="${EPREFIX}"/usr/lib/go
219 - fi
220 - export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
221 - export GOROOT="$(pwd)"
222 - export GOBIN="${GOROOT}/bin"
223 -
224 - # Go's build script does not use BUILD/HOST/TARGET consistently. :(
225 - export GOHOSTARCH=$(go_arch ${CBUILD})
226 - export GOHOSTOS=$(go_os ${CBUILD})
227 - export CC=$(tc-getBUILD_CC)
228 -
229 - export GOARCH=$(go_arch)
230 - export GOOS=$(go_os)
231 - export CC_FOR_TARGET=$(tc-getCC)
232 - export CXX_FOR_TARGET=$(tc-getCXX)
233 - if [[ ${ARCH} == arm ]]; then
234 - export GOARM=$(go_arm)
235 - fi
236 -
237 - cd src
238 - ./make.bash || die "build failed"
239 -}
240 -
241 -src_test()
242 -{
243 - go_cross_compile && return 0
244 -
245 - cd src
246 - PATH="${GOBIN}:${PATH}" \
247 - ./run.bash -no-rebuild || die "tests failed"
248 -}
249 -
250 -src_install()
251 -{
252 - local bin_path f x
253 -
254 - dodir /usr/lib/go
255 -
256 - # There is a known issue which requires the source tree to be installed [1].
257 - # Once this is fixed, we can consider using the doc use flag to control
258 - # installing the doc and src directories.
259 - # [1] https://golang.org/issue/2775
260 - #
261 - # deliberately use cp to retain permissions
262 - cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
263 - if go_cross_compile; then
264 - bin_path="bin/$(go_tuple)"
265 - else
266 - bin_path=bin
267 - fi
268 - for x in ${bin_path}/*; do
269 - f=${x##*/}
270 - dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
271 - done
272 - einstalldocs
273 -
274 - if [[ ${CHOST} == *-darwin* ]] ; then
275 - # fix install_name for test object (binutils_test) on Darwin, it
276 - # is never used in real circumstances
277 - local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/
278 - libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64
279 - install_name_tool -id "${libmac64}" "${D}${libmac64}"
280 - fi
281 -}