1 |
commit: 56a7e2b91235d3a86078f6efb5350f5045cafb92 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon May 27 18:21:33 2019 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 27 18:23:17 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56a7e2b9 |
7 |
|
8 |
dev-lang/go: remove old versions |
9 |
|
10 |
Package-Manager: Portage-2.3.66, Repoman-2.3.12 |
11 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
12 |
|
13 |
dev-lang/go/Manifest | 8 -- |
14 |
dev-lang/go/go-1.11.6.ebuild | 238 ----------------------------------------- |
15 |
dev-lang/go/go-1.11.7.ebuild | 238 ----------------------------------------- |
16 |
dev-lang/go/go-1.11.8.ebuild | 238 ----------------------------------------- |
17 |
dev-lang/go/go-1.11.9.ebuild | 246 ------------------------------------------- |
18 |
dev-lang/go/go-1.12.1.ebuild | 238 ----------------------------------------- |
19 |
dev-lang/go/go-1.12.2.ebuild | 238 ----------------------------------------- |
20 |
dev-lang/go/go-1.12.3.ebuild | 238 ----------------------------------------- |
21 |
dev-lang/go/go-1.12.4.ebuild | 246 ------------------------------------------- |
22 |
9 files changed, 1928 deletions(-) |
23 |
|
24 |
diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest |
25 |
index 358cc720094..ffc1f94337e 100644 |
26 |
--- a/dev-lang/go/Manifest |
27 |
+++ b/dev-lang/go/Manifest |
28 |
@@ -10,12 +10,4 @@ DIST go-linux-ppc64le-bootstrap-1.8.tbz 52211575 BLAKE2B 7a28ec5a381369c4e9415c8 |
29 |
DIST go-linux-s390x-bootstrap-1.8.tbz 57124869 BLAKE2B 920a176b8f4fc3a816e724324bbb30a383d599e31a0d2093d24797dbcd0e799a662a3589dbb87d2f5dd16df07c4cf8f1e444e87b540ec732746bb025dc9271f8 SHA512 d429cae870d66217ab2e07c74209d3031d97baa4f899b4d70ae6283a1a5b1434b037904c4cfca0b2bc798d5ba0b358c3739e000eccbc74809baf564c5686df5a |
30 |
DIST go-solaris-amd64-bootstrap-1.8.tbz 54926326 BLAKE2B 0a45312f090d81ebf46fe5950cb65c059e2801394231e715e94145d1f918eb59b10472b2385e57ebd5cfb9eca0ad7290fb118436486b665520bb540970f971ab SHA512 52b849e5b9a940e10de7ba3df0ebdf6e1c5d631de9581d936c9edf8f38e6bb3314acbc2b2d5202b0528fde2a359d52bc0c6f39acf9b1b614725e4b4a947ed10d |
31 |
DIST go1.11.10.src.tar.gz 21113259 BLAKE2B 2dc704ea092fb4f4bb6c379ecb5104eb9dc5657750fb046810f210f38191d494c926e7a3661f67ea09c3d4090676485ba346daaa6dfe9eebbf3d69acbacea3b8 SHA512 8fab3b96d1c47b8f75b135da9d1a104c485098f6f42041b69336216a57cfd49c0785c8cfa7b016020ded5f0aadd279d7a76feeca33038321a4930139aee28cc8 |
32 |
-DIST go1.11.6.src.tar.gz 21113406 BLAKE2B e7372e9bf6190295176c66a328b3e31f9201776f16f1165136e24bdaf5c514d7895dd5880514fa054ee958ed5ff96814de9a555e47b3f6dddd388d1e57c0d05f SHA512 bc29df69a08a4e9e703de72b5eda5f2d63b78f18f3e7a1173eae5c6dd767f29f1b865a2fc3f692e15277df2d45e74ee17875b275eb3fc50aac2b88082e618bf5 |
33 |
-DIST go1.11.7.src.tar.gz 21113223 BLAKE2B e58a947a43e8dbabbe6d4dc1384239b01160e4d9cc88ed866c8d6e5a0ef66dd89203b9fb95c14c5fcc50ad47f75b17440cf1df34cb793a435d7744e630845307 SHA512 26bc2a3ab51ebe1179cd83897dae6ca17f30126189bf2c0b60060a25f3f22e72bcda383055825a9151948f074a103a177ab5550f5c2d088448bdf5455448061e |
34 |
-DIST go1.11.8.src.tar.gz 21113433 BLAKE2B 272ef36664a180640f14afba18d2f715d5a335134b33cea449d14fd3b568c2322bbbac7aab254987fbd7dcf3d486dc8b1f62f14577ae2e57b21de1720d0f29a7 SHA512 00b57b0ebbbf53f4de718bf40e5dfdaf57cafa9932917d22e9723b5a33a62d335013ab49753d98f8fe30c71daca95c7addd921825fe0c3885942b342773050cc |
35 |
-DIST go1.11.9.src.tar.gz 21113156 BLAKE2B 330ff9456dbffd3254187ea37a1801b9abacbec2033e9afefbf09d0554e640de68861aedb0229199ac81211316c080a7a98bad641a13bc7f106e2a3f0c7e8a05 SHA512 97593b382ae49388dfc1178dd2438888dc24fba27d3267fd772ecbe10c35f44b1cd3a0987219cca3dd38dcc23ce2c9669fd7da26cc2e5719e2ce77650f877156 |
36 |
-DIST go1.12.1.src.tar.gz 21963082 BLAKE2B fd9c0ca19e6bd285c52034a88df1a58f96b957483362fac2e0c0f2a9dddde0543e7569d76fb93eff473774d152db361bfe9bdd354d80412c71ee5c4162010346 SHA512 b3fdfb874e6e0e0b50458085724fbd8e8b9be212df3f777b97db340aa3b80f32ee08d646a57a8a7d52ff6f19657d884dd25018c866c6173473aafa20a58f1975 |
37 |
-DIST go1.12.2.src.tar.gz 21965624 BLAKE2B 9f4fbe62b37ccaf62517b2e5df3e1ada0155b7cb79067c2a74100df6d96ba89b0e372b5f1b1037b0cf98ea9f52623de00055793d011e5e39e92773a0cd87e41d SHA512 f7b8ffe8d3de7b456ba595deece5b092db8645e95d901826c33428af0151731921437222dcb5d52c9d937da4ebeb3192c30aa17052aa88c9e425e96cac2d79bb |
38 |
-DIST go1.12.3.src.tar.gz 21965718 BLAKE2B 226b1028eb47cee8ccc0b72130a098a65211cf0e54030fe626b6b9cf1c16993e0a9677a443c07abd997e0f2bfbc1711c703a40869ae1ecbb8b8dfa0fbf31c0b2 SHA512 bd33e958f2e8550da14afc0576928d00d2b8ecac569ddcf3551e44a342ce78ad3934e36109cbe6c15d31c55448ccc092f6e1fbf82685d6702402ab67106a1424 |
39 |
-DIST go1.12.4.src.tar.gz 21965966 BLAKE2B 6a6d2712769d9195795ca14a7c33a4e025c572317c0a9118f4f610c56f907e0eec99d2ecca37cc6e2005a42b842080d93895d4dfed206f23db32f3b848c9c57f SHA512 45ced5fc23a2786a652dbe66de7bbc039efaba29d884d797d6d0a6eaffb61dfb897905f0733ce74704f8760b1fdedb9963e26c1d9d8dee4a4676e74da5df8792 |
40 |
DIST go1.12.5.src.tar.gz 21971348 BLAKE2B 7de8db4a6c4cd9e1883fbf28357fe99ad9f43f3e015b2063347b1961df128760b720c0dd5549997c7080e6cf0036406430419d4bf033323f26017d3629ad6067 SHA512 ce64105ff71615f9d235cc7c8656b6409fc40cc90d15a28d355fadd9072d2eab842af379dd8bba0f1181715753143e4a07491e0f9e5f8df806327d7c95a34fae |
41 |
|
42 |
diff --git a/dev-lang/go/go-1.11.6.ebuild b/dev-lang/go/go-1.11.6.ebuild |
43 |
deleted file mode 100644 |
44 |
index 292a2af5619..00000000000 |
45 |
--- a/dev-lang/go/go-1.11.6.ebuild |
46 |
+++ /dev/null |
47 |
@@ -1,238 +0,0 @@ |
48 |
-# Copyright 1999-2019 Gentoo Authors |
49 |
-# Distributed under the terms of the GNU General Public License v2 |
50 |
- |
51 |
-EAPI=7 |
52 |
- |
53 |
-export CBUILD=${CBUILD:-${CHOST}} |
54 |
-export CTARGET=${CTARGET:-${CHOST}} |
55 |
- |
56 |
-MY_PV=${PV/_/} |
57 |
- |
58 |
-inherit toolchain-funcs |
59 |
- |
60 |
-BOOTSTRAP_VERSION="bootstrap-1.8" |
61 |
-BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist" |
62 |
-BOOTSTRAP_URI=" |
63 |
- ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz |
64 |
- ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz |
65 |
- ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz |
66 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz |
67 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz |
68 |
- ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz |
69 |
- ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz |
70 |
- ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz |
71 |
- ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz |
72 |
- ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz |
73 |
- ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz |
74 |
-" |
75 |
- |
76 |
-case ${PV} in |
77 |
-*9999*) |
78 |
- EGIT_REPO_URI="https://github.com/golang/go.git" |
79 |
- inherit git-r3 |
80 |
- ;; |
81 |
-*) |
82 |
- SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " |
83 |
- S="${WORKDIR}"/go |
84 |
- case ${PV} in |
85 |
- *_beta*|*_rc*) ;; |
86 |
- *) |
87 |
- KEYWORDS="-* amd64 arm ~arm64 ~ppc64 ~s390 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x64-macos ~x64-solaris" |
88 |
- # The upstream tests fail under portage but pass if the build is |
89 |
- # run according to their documentation [1]. |
90 |
- # I am restricting the tests on released versions until this is |
91 |
- # solved. |
92 |
- # [1] https://golang.org/issues/18442 |
93 |
- RESTRICT="test" |
94 |
- ;; |
95 |
- esac |
96 |
-esac |
97 |
- |
98 |
-# If gccgo is not being used to build Go, there is no way to know the |
99 |
-# architecture or operating system of the build machine, so we need to |
100 |
-# download all of our bootstrap archives to allow this ebuild to work |
101 |
-# under crossdev. |
102 |
-# |
103 |
-# https://bugs.gentoo.org/671394 |
104 |
-SRC_URI+="!gccgo? ( ${BOOTSTRAP_URI} )" |
105 |
- |
106 |
-DESCRIPTION="A concurrent garbage collected and typesafe programming language" |
107 |
-HOMEPAGE="https://golang.org" |
108 |
- |
109 |
-LICENSE="BSD" |
110 |
-SLOT="0/${PV}" |
111 |
-IUSE="gccgo" |
112 |
- |
113 |
-BDEPEND="gccgo? ( >=sys-devel/gcc-5[go] )" |
114 |
-RDEPEND="!<dev-go/go-tools-0_pre20150902" |
115 |
- |
116 |
-# These test data objects have writable/executable stacks. |
117 |
-QA_EXECSTACK=" |
118 |
- usr/lib/go/src/debug/elf/testdata/*.obj |
119 |
- usr/lib/go/src/*.gox |
120 |
- " |
121 |
- |
122 |
-# Do not complain about CFLAGS, etc, since Go doesn't use them. |
123 |
-QA_FLAGS_IGNORED='.*' |
124 |
- |
125 |
-REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*" |
126 |
- |
127 |
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail. |
128 |
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" |
129 |
- |
130 |
-# Do not strip this package. Stripping is unsupported upstream and may |
131 |
-# fail. |
132 |
-RESTRICT+=" strip" |
133 |
- |
134 |
-DOCS=( |
135 |
-AUTHORS |
136 |
-CONTRIBUTING.md |
137 |
-CONTRIBUTORS |
138 |
-PATENTS |
139 |
-README.md |
140 |
-) |
141 |
- |
142 |
-go_arch() |
143 |
-{ |
144 |
- # By chance most portage arch names match Go |
145 |
- local portage_arch=$(tc-arch $@) |
146 |
- case "${portage_arch}" in |
147 |
- x86) echo 386;; |
148 |
- x64-*) echo amd64;; |
149 |
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;; |
150 |
- s390) echo s390x ;; |
151 |
- *) echo "${portage_arch}";; |
152 |
- esac |
153 |
-} |
154 |
- |
155 |
-go_arm() |
156 |
-{ |
157 |
- case "${1:-${CHOST}}" in |
158 |
- armv5*) echo 5;; |
159 |
- armv6*) echo 6;; |
160 |
- armv7*) echo 7;; |
161 |
- *) |
162 |
- die "unknown GOARM for ${1:-${CHOST}}" |
163 |
- ;; |
164 |
- esac |
165 |
-} |
166 |
- |
167 |
-go_os() |
168 |
-{ |
169 |
- case "${1:-${CHOST}}" in |
170 |
- *-linux*) echo linux;; |
171 |
- *-darwin*) echo darwin;; |
172 |
- *-freebsd*) echo freebsd;; |
173 |
- *-netbsd*) echo netbsd;; |
174 |
- *-openbsd*) echo openbsd;; |
175 |
- *-solaris*) echo solaris;; |
176 |
- *-cygwin*|*-interix*|*-winnt*) |
177 |
- echo windows |
178 |
- ;; |
179 |
- *) |
180 |
- die "unknown GOOS for ${1:-${CHOST}}" |
181 |
- ;; |
182 |
- esac |
183 |
-} |
184 |
- |
185 |
-go_tuple() |
186 |
-{ |
187 |
- echo "$(go_os $@)_$(go_arch $@)" |
188 |
-} |
189 |
- |
190 |
-go_cross_compile() |
191 |
-{ |
192 |
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] |
193 |
-} |
194 |
- |
195 |
-pkg_pretend() |
196 |
-{ |
197 |
- # make.bash does not understand cross-compiling a cross-compiler |
198 |
- if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then |
199 |
- die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}" |
200 |
- fi |
201 |
-} |
202 |
- |
203 |
-src_unpack() |
204 |
-{ |
205 |
- if [[ ${PV} = 9999 ]]; then |
206 |
- git-r3_src_unpack |
207 |
- fi |
208 |
- default |
209 |
-} |
210 |
- |
211 |
-src_compile() |
212 |
-{ |
213 |
- export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-bootstrap |
214 |
- if use gccgo; then |
215 |
- mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die |
216 |
- local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version) |
217 |
- [[ -x ${go_binary} ]] || go_binary=$( |
218 |
- find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) | |
219 |
- sort -V | tail -n1) |
220 |
- [[ -x ${go_binary} ]] || |
221 |
- die "go-$(gcc-major-version): command not found" |
222 |
- ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die |
223 |
- fi |
224 |
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go |
225 |
- export GOROOT="$(pwd)" |
226 |
- export GOBIN="${GOROOT}/bin" |
227 |
- |
228 |
- # Go's build script does not use BUILD/HOST/TARGET consistently. :( |
229 |
- export GOHOSTARCH=$(go_arch ${CBUILD}) |
230 |
- export GOHOSTOS=$(go_os ${CBUILD}) |
231 |
- export CC=$(tc-getBUILD_CC) |
232 |
- |
233 |
- export GOARCH=$(go_arch) |
234 |
- export GOOS=$(go_os) |
235 |
- export CC_FOR_TARGET=$(tc-getCC) |
236 |
- export CXX_FOR_TARGET=$(tc-getCXX) |
237 |
- if [[ ${ARCH} == arm ]]; then |
238 |
- export GOARM=$(go_arm) |
239 |
- fi |
240 |
- |
241 |
- cd src |
242 |
- ./make.bash || die "build failed" |
243 |
-} |
244 |
- |
245 |
-src_test() |
246 |
-{ |
247 |
- go_cross_compile && return 0 |
248 |
- |
249 |
- cd src |
250 |
- PATH="${GOBIN}:${PATH}" \ |
251 |
- ./run.bash -no-rebuild || die "tests failed" |
252 |
-} |
253 |
- |
254 |
-src_install() |
255 |
-{ |
256 |
- local bin_path f x |
257 |
- |
258 |
- dodir /usr/lib/go |
259 |
- |
260 |
- # There is a known issue which requires the source tree to be installed [1]. |
261 |
- # Once this is fixed, we can consider using the doc use flag to control |
262 |
- # installing the doc and src directories. |
263 |
- # [1] https://golang.org/issue/2775 |
264 |
- # |
265 |
- # deliberately use cp to retain permissions |
266 |
- cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go |
267 |
- if go_cross_compile; then |
268 |
- bin_path="bin/$(go_tuple)" |
269 |
- else |
270 |
- bin_path=bin |
271 |
- fi |
272 |
- for x in ${bin_path}/*; do |
273 |
- f=${x##*/} |
274 |
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} |
275 |
- done |
276 |
- einstalldocs |
277 |
- |
278 |
- if [[ ${CHOST} == *-darwin* ]] ; then |
279 |
- # fix install_name for test object (binutils_test) on Darwin, it |
280 |
- # is never used in real circumstances |
281 |
- local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/ |
282 |
- libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64 |
283 |
- install_name_tool -id "${libmac64}" "${D}${libmac64}" |
284 |
- fi |
285 |
-} |
286 |
|
287 |
diff --git a/dev-lang/go/go-1.11.7.ebuild b/dev-lang/go/go-1.11.7.ebuild |
288 |
deleted file mode 100644 |
289 |
index 4cb21b53d19..00000000000 |
290 |
--- a/dev-lang/go/go-1.11.7.ebuild |
291 |
+++ /dev/null |
292 |
@@ -1,238 +0,0 @@ |
293 |
-# Copyright 1999-2019 Gentoo Authors |
294 |
-# Distributed under the terms of the GNU General Public License v2 |
295 |
- |
296 |
-EAPI=7 |
297 |
- |
298 |
-export CBUILD=${CBUILD:-${CHOST}} |
299 |
-export CTARGET=${CTARGET:-${CHOST}} |
300 |
- |
301 |
-MY_PV=${PV/_/} |
302 |
- |
303 |
-inherit toolchain-funcs |
304 |
- |
305 |
-BOOTSTRAP_VERSION="bootstrap-1.8" |
306 |
-BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist" |
307 |
-BOOTSTRAP_URI=" |
308 |
- ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz |
309 |
- ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz |
310 |
- ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz |
311 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz |
312 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz |
313 |
- ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz |
314 |
- ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz |
315 |
- ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz |
316 |
- ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz |
317 |
- ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz |
318 |
- ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz |
319 |
-" |
320 |
- |
321 |
-case ${PV} in |
322 |
-*9999*) |
323 |
- EGIT_REPO_URI="https://github.com/golang/go.git" |
324 |
- inherit git-r3 |
325 |
- ;; |
326 |
-*) |
327 |
- SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " |
328 |
- S="${WORKDIR}"/go |
329 |
- case ${PV} in |
330 |
- *_beta*|*_rc*) ;; |
331 |
- *) |
332 |
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~s390 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x64-macos ~x64-solaris" |
333 |
- # The upstream tests fail under portage but pass if the build is |
334 |
- # run according to their documentation [1]. |
335 |
- # I am restricting the tests on released versions until this is |
336 |
- # solved. |
337 |
- # [1] https://golang.org/issues/18442 |
338 |
- RESTRICT="test" |
339 |
- ;; |
340 |
- esac |
341 |
-esac |
342 |
- |
343 |
-# If gccgo is not being used to build Go, there is no way to know the |
344 |
-# architecture or operating system of the build machine, so we need to |
345 |
-# download all of our bootstrap archives to allow this ebuild to work |
346 |
-# under crossdev. |
347 |
-# |
348 |
-# https://bugs.gentoo.org/671394 |
349 |
-SRC_URI+="!gccgo? ( ${BOOTSTRAP_URI} )" |
350 |
- |
351 |
-DESCRIPTION="A concurrent garbage collected and typesafe programming language" |
352 |
-HOMEPAGE="https://golang.org" |
353 |
- |
354 |
-LICENSE="BSD" |
355 |
-SLOT="0/${PV}" |
356 |
-IUSE="gccgo" |
357 |
- |
358 |
-BDEPEND="gccgo? ( >=sys-devel/gcc-5[go] )" |
359 |
-RDEPEND="!<dev-go/go-tools-0_pre20150902" |
360 |
- |
361 |
-# These test data objects have writable/executable stacks. |
362 |
-QA_EXECSTACK=" |
363 |
- usr/lib/go/src/debug/elf/testdata/*.obj |
364 |
- usr/lib/go/src/*.gox |
365 |
- " |
366 |
- |
367 |
-# Do not complain about CFLAGS, etc, since Go doesn't use them. |
368 |
-QA_FLAGS_IGNORED='.*' |
369 |
- |
370 |
-REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*" |
371 |
- |
372 |
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail. |
373 |
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" |
374 |
- |
375 |
-# Do not strip this package. Stripping is unsupported upstream and may |
376 |
-# fail. |
377 |
-RESTRICT+=" strip" |
378 |
- |
379 |
-DOCS=( |
380 |
-AUTHORS |
381 |
-CONTRIBUTING.md |
382 |
-CONTRIBUTORS |
383 |
-PATENTS |
384 |
-README.md |
385 |
-) |
386 |
- |
387 |
-go_arch() |
388 |
-{ |
389 |
- # By chance most portage arch names match Go |
390 |
- local portage_arch=$(tc-arch $@) |
391 |
- case "${portage_arch}" in |
392 |
- x86) echo 386;; |
393 |
- x64-*) echo amd64;; |
394 |
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;; |
395 |
- s390) echo s390x ;; |
396 |
- *) echo "${portage_arch}";; |
397 |
- esac |
398 |
-} |
399 |
- |
400 |
-go_arm() |
401 |
-{ |
402 |
- case "${1:-${CHOST}}" in |
403 |
- armv5*) echo 5;; |
404 |
- armv6*) echo 6;; |
405 |
- armv7*) echo 7;; |
406 |
- *) |
407 |
- die "unknown GOARM for ${1:-${CHOST}}" |
408 |
- ;; |
409 |
- esac |
410 |
-} |
411 |
- |
412 |
-go_os() |
413 |
-{ |
414 |
- case "${1:-${CHOST}}" in |
415 |
- *-linux*) echo linux;; |
416 |
- *-darwin*) echo darwin;; |
417 |
- *-freebsd*) echo freebsd;; |
418 |
- *-netbsd*) echo netbsd;; |
419 |
- *-openbsd*) echo openbsd;; |
420 |
- *-solaris*) echo solaris;; |
421 |
- *-cygwin*|*-interix*|*-winnt*) |
422 |
- echo windows |
423 |
- ;; |
424 |
- *) |
425 |
- die "unknown GOOS for ${1:-${CHOST}}" |
426 |
- ;; |
427 |
- esac |
428 |
-} |
429 |
- |
430 |
-go_tuple() |
431 |
-{ |
432 |
- echo "$(go_os $@)_$(go_arch $@)" |
433 |
-} |
434 |
- |
435 |
-go_cross_compile() |
436 |
-{ |
437 |
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] |
438 |
-} |
439 |
- |
440 |
-pkg_pretend() |
441 |
-{ |
442 |
- # make.bash does not understand cross-compiling a cross-compiler |
443 |
- if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then |
444 |
- die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}" |
445 |
- fi |
446 |
-} |
447 |
- |
448 |
-src_unpack() |
449 |
-{ |
450 |
- if [[ ${PV} = 9999 ]]; then |
451 |
- git-r3_src_unpack |
452 |
- fi |
453 |
- default |
454 |
-} |
455 |
- |
456 |
-src_compile() |
457 |
-{ |
458 |
- export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-bootstrap |
459 |
- if use gccgo; then |
460 |
- mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die |
461 |
- local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version) |
462 |
- [[ -x ${go_binary} ]] || go_binary=$( |
463 |
- find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) | |
464 |
- sort -V | tail -n1) |
465 |
- [[ -x ${go_binary} ]] || |
466 |
- die "go-$(gcc-major-version): command not found" |
467 |
- ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die |
468 |
- fi |
469 |
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go |
470 |
- export GOROOT="$(pwd)" |
471 |
- export GOBIN="${GOROOT}/bin" |
472 |
- |
473 |
- # Go's build script does not use BUILD/HOST/TARGET consistently. :( |
474 |
- export GOHOSTARCH=$(go_arch ${CBUILD}) |
475 |
- export GOHOSTOS=$(go_os ${CBUILD}) |
476 |
- export CC=$(tc-getBUILD_CC) |
477 |
- |
478 |
- export GOARCH=$(go_arch) |
479 |
- export GOOS=$(go_os) |
480 |
- export CC_FOR_TARGET=$(tc-getCC) |
481 |
- export CXX_FOR_TARGET=$(tc-getCXX) |
482 |
- if [[ ${ARCH} == arm ]]; then |
483 |
- export GOARM=$(go_arm) |
484 |
- fi |
485 |
- |
486 |
- cd src |
487 |
- ./make.bash || die "build failed" |
488 |
-} |
489 |
- |
490 |
-src_test() |
491 |
-{ |
492 |
- go_cross_compile && return 0 |
493 |
- |
494 |
- cd src |
495 |
- PATH="${GOBIN}:${PATH}" \ |
496 |
- ./run.bash -no-rebuild || die "tests failed" |
497 |
-} |
498 |
- |
499 |
-src_install() |
500 |
-{ |
501 |
- local bin_path f x |
502 |
- |
503 |
- dodir /usr/lib/go |
504 |
- |
505 |
- # There is a known issue which requires the source tree to be installed [1]. |
506 |
- # Once this is fixed, we can consider using the doc use flag to control |
507 |
- # installing the doc and src directories. |
508 |
- # [1] https://golang.org/issue/2775 |
509 |
- # |
510 |
- # deliberately use cp to retain permissions |
511 |
- cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go |
512 |
- if go_cross_compile; then |
513 |
- bin_path="bin/$(go_tuple)" |
514 |
- else |
515 |
- bin_path=bin |
516 |
- fi |
517 |
- for x in ${bin_path}/*; do |
518 |
- f=${x##*/} |
519 |
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} |
520 |
- done |
521 |
- einstalldocs |
522 |
- |
523 |
- if [[ ${CHOST} == *-darwin* ]] ; then |
524 |
- # fix install_name for test object (binutils_test) on Darwin, it |
525 |
- # is never used in real circumstances |
526 |
- local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/ |
527 |
- libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64 |
528 |
- install_name_tool -id "${libmac64}" "${D}${libmac64}" |
529 |
- fi |
530 |
-} |
531 |
|
532 |
diff --git a/dev-lang/go/go-1.11.8.ebuild b/dev-lang/go/go-1.11.8.ebuild |
533 |
deleted file mode 100644 |
534 |
index 4cb21b53d19..00000000000 |
535 |
--- a/dev-lang/go/go-1.11.8.ebuild |
536 |
+++ /dev/null |
537 |
@@ -1,238 +0,0 @@ |
538 |
-# Copyright 1999-2019 Gentoo Authors |
539 |
-# Distributed under the terms of the GNU General Public License v2 |
540 |
- |
541 |
-EAPI=7 |
542 |
- |
543 |
-export CBUILD=${CBUILD:-${CHOST}} |
544 |
-export CTARGET=${CTARGET:-${CHOST}} |
545 |
- |
546 |
-MY_PV=${PV/_/} |
547 |
- |
548 |
-inherit toolchain-funcs |
549 |
- |
550 |
-BOOTSTRAP_VERSION="bootstrap-1.8" |
551 |
-BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist" |
552 |
-BOOTSTRAP_URI=" |
553 |
- ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz |
554 |
- ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz |
555 |
- ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz |
556 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz |
557 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz |
558 |
- ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz |
559 |
- ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz |
560 |
- ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz |
561 |
- ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz |
562 |
- ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz |
563 |
- ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz |
564 |
-" |
565 |
- |
566 |
-case ${PV} in |
567 |
-*9999*) |
568 |
- EGIT_REPO_URI="https://github.com/golang/go.git" |
569 |
- inherit git-r3 |
570 |
- ;; |
571 |
-*) |
572 |
- SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " |
573 |
- S="${WORKDIR}"/go |
574 |
- case ${PV} in |
575 |
- *_beta*|*_rc*) ;; |
576 |
- *) |
577 |
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~s390 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x64-macos ~x64-solaris" |
578 |
- # The upstream tests fail under portage but pass if the build is |
579 |
- # run according to their documentation [1]. |
580 |
- # I am restricting the tests on released versions until this is |
581 |
- # solved. |
582 |
- # [1] https://golang.org/issues/18442 |
583 |
- RESTRICT="test" |
584 |
- ;; |
585 |
- esac |
586 |
-esac |
587 |
- |
588 |
-# If gccgo is not being used to build Go, there is no way to know the |
589 |
-# architecture or operating system of the build machine, so we need to |
590 |
-# download all of our bootstrap archives to allow this ebuild to work |
591 |
-# under crossdev. |
592 |
-# |
593 |
-# https://bugs.gentoo.org/671394 |
594 |
-SRC_URI+="!gccgo? ( ${BOOTSTRAP_URI} )" |
595 |
- |
596 |
-DESCRIPTION="A concurrent garbage collected and typesafe programming language" |
597 |
-HOMEPAGE="https://golang.org" |
598 |
- |
599 |
-LICENSE="BSD" |
600 |
-SLOT="0/${PV}" |
601 |
-IUSE="gccgo" |
602 |
- |
603 |
-BDEPEND="gccgo? ( >=sys-devel/gcc-5[go] )" |
604 |
-RDEPEND="!<dev-go/go-tools-0_pre20150902" |
605 |
- |
606 |
-# These test data objects have writable/executable stacks. |
607 |
-QA_EXECSTACK=" |
608 |
- usr/lib/go/src/debug/elf/testdata/*.obj |
609 |
- usr/lib/go/src/*.gox |
610 |
- " |
611 |
- |
612 |
-# Do not complain about CFLAGS, etc, since Go doesn't use them. |
613 |
-QA_FLAGS_IGNORED='.*' |
614 |
- |
615 |
-REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*" |
616 |
- |
617 |
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail. |
618 |
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" |
619 |
- |
620 |
-# Do not strip this package. Stripping is unsupported upstream and may |
621 |
-# fail. |
622 |
-RESTRICT+=" strip" |
623 |
- |
624 |
-DOCS=( |
625 |
-AUTHORS |
626 |
-CONTRIBUTING.md |
627 |
-CONTRIBUTORS |
628 |
-PATENTS |
629 |
-README.md |
630 |
-) |
631 |
- |
632 |
-go_arch() |
633 |
-{ |
634 |
- # By chance most portage arch names match Go |
635 |
- local portage_arch=$(tc-arch $@) |
636 |
- case "${portage_arch}" in |
637 |
- x86) echo 386;; |
638 |
- x64-*) echo amd64;; |
639 |
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;; |
640 |
- s390) echo s390x ;; |
641 |
- *) echo "${portage_arch}";; |
642 |
- esac |
643 |
-} |
644 |
- |
645 |
-go_arm() |
646 |
-{ |
647 |
- case "${1:-${CHOST}}" in |
648 |
- armv5*) echo 5;; |
649 |
- armv6*) echo 6;; |
650 |
- armv7*) echo 7;; |
651 |
- *) |
652 |
- die "unknown GOARM for ${1:-${CHOST}}" |
653 |
- ;; |
654 |
- esac |
655 |
-} |
656 |
- |
657 |
-go_os() |
658 |
-{ |
659 |
- case "${1:-${CHOST}}" in |
660 |
- *-linux*) echo linux;; |
661 |
- *-darwin*) echo darwin;; |
662 |
- *-freebsd*) echo freebsd;; |
663 |
- *-netbsd*) echo netbsd;; |
664 |
- *-openbsd*) echo openbsd;; |
665 |
- *-solaris*) echo solaris;; |
666 |
- *-cygwin*|*-interix*|*-winnt*) |
667 |
- echo windows |
668 |
- ;; |
669 |
- *) |
670 |
- die "unknown GOOS for ${1:-${CHOST}}" |
671 |
- ;; |
672 |
- esac |
673 |
-} |
674 |
- |
675 |
-go_tuple() |
676 |
-{ |
677 |
- echo "$(go_os $@)_$(go_arch $@)" |
678 |
-} |
679 |
- |
680 |
-go_cross_compile() |
681 |
-{ |
682 |
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] |
683 |
-} |
684 |
- |
685 |
-pkg_pretend() |
686 |
-{ |
687 |
- # make.bash does not understand cross-compiling a cross-compiler |
688 |
- if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then |
689 |
- die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}" |
690 |
- fi |
691 |
-} |
692 |
- |
693 |
-src_unpack() |
694 |
-{ |
695 |
- if [[ ${PV} = 9999 ]]; then |
696 |
- git-r3_src_unpack |
697 |
- fi |
698 |
- default |
699 |
-} |
700 |
- |
701 |
-src_compile() |
702 |
-{ |
703 |
- export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-bootstrap |
704 |
- if use gccgo; then |
705 |
- mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die |
706 |
- local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version) |
707 |
- [[ -x ${go_binary} ]] || go_binary=$( |
708 |
- find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) | |
709 |
- sort -V | tail -n1) |
710 |
- [[ -x ${go_binary} ]] || |
711 |
- die "go-$(gcc-major-version): command not found" |
712 |
- ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die |
713 |
- fi |
714 |
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go |
715 |
- export GOROOT="$(pwd)" |
716 |
- export GOBIN="${GOROOT}/bin" |
717 |
- |
718 |
- # Go's build script does not use BUILD/HOST/TARGET consistently. :( |
719 |
- export GOHOSTARCH=$(go_arch ${CBUILD}) |
720 |
- export GOHOSTOS=$(go_os ${CBUILD}) |
721 |
- export CC=$(tc-getBUILD_CC) |
722 |
- |
723 |
- export GOARCH=$(go_arch) |
724 |
- export GOOS=$(go_os) |
725 |
- export CC_FOR_TARGET=$(tc-getCC) |
726 |
- export CXX_FOR_TARGET=$(tc-getCXX) |
727 |
- if [[ ${ARCH} == arm ]]; then |
728 |
- export GOARM=$(go_arm) |
729 |
- fi |
730 |
- |
731 |
- cd src |
732 |
- ./make.bash || die "build failed" |
733 |
-} |
734 |
- |
735 |
-src_test() |
736 |
-{ |
737 |
- go_cross_compile && return 0 |
738 |
- |
739 |
- cd src |
740 |
- PATH="${GOBIN}:${PATH}" \ |
741 |
- ./run.bash -no-rebuild || die "tests failed" |
742 |
-} |
743 |
- |
744 |
-src_install() |
745 |
-{ |
746 |
- local bin_path f x |
747 |
- |
748 |
- dodir /usr/lib/go |
749 |
- |
750 |
- # There is a known issue which requires the source tree to be installed [1]. |
751 |
- # Once this is fixed, we can consider using the doc use flag to control |
752 |
- # installing the doc and src directories. |
753 |
- # [1] https://golang.org/issue/2775 |
754 |
- # |
755 |
- # deliberately use cp to retain permissions |
756 |
- cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go |
757 |
- if go_cross_compile; then |
758 |
- bin_path="bin/$(go_tuple)" |
759 |
- else |
760 |
- bin_path=bin |
761 |
- fi |
762 |
- for x in ${bin_path}/*; do |
763 |
- f=${x##*/} |
764 |
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} |
765 |
- done |
766 |
- einstalldocs |
767 |
- |
768 |
- if [[ ${CHOST} == *-darwin* ]] ; then |
769 |
- # fix install_name for test object (binutils_test) on Darwin, it |
770 |
- # is never used in real circumstances |
771 |
- local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/ |
772 |
- libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64 |
773 |
- install_name_tool -id "${libmac64}" "${D}${libmac64}" |
774 |
- fi |
775 |
-} |
776 |
|
777 |
diff --git a/dev-lang/go/go-1.11.9.ebuild b/dev-lang/go/go-1.11.9.ebuild |
778 |
deleted file mode 100644 |
779 |
index a53df7c0956..00000000000 |
780 |
--- a/dev-lang/go/go-1.11.9.ebuild |
781 |
+++ /dev/null |
782 |
@@ -1,246 +0,0 @@ |
783 |
-# Copyright 1999-2019 Gentoo Authors |
784 |
-# Distributed under the terms of the GNU General Public License v2 |
785 |
- |
786 |
-EAPI=7 |
787 |
- |
788 |
-export CBUILD=${CBUILD:-${CHOST}} |
789 |
-export CTARGET=${CTARGET:-${CHOST}} |
790 |
- |
791 |
-MY_PV=${PV/_/} |
792 |
- |
793 |
-inherit toolchain-funcs |
794 |
- |
795 |
-BOOTSTRAP_VERSION="bootstrap-1.8" |
796 |
-BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist" |
797 |
-BOOTSTRAP_URI=" |
798 |
- ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz |
799 |
- ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz |
800 |
- ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz |
801 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz |
802 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz |
803 |
- ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz |
804 |
- ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz |
805 |
- ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz |
806 |
- ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz |
807 |
- ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz |
808 |
- ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz |
809 |
-" |
810 |
- |
811 |
-case ${PV} in |
812 |
-*9999*) |
813 |
- EGIT_REPO_URI="https://github.com/golang/go.git" |
814 |
- inherit git-r3 |
815 |
- ;; |
816 |
-*) |
817 |
- SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " |
818 |
- S="${WORKDIR}"/go |
819 |
- case ${PV} in |
820 |
- *_beta*|*_rc*) ;; |
821 |
- *) |
822 |
- KEYWORDS="-* amd64 ~arm ~arm64 ~ppc64 ~s390 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x64-macos ~x64-solaris" |
823 |
- # The upstream tests fail under portage but pass if the build is |
824 |
- # run according to their documentation [1]. |
825 |
- # I am restricting the tests on released versions until this is |
826 |
- # solved. |
827 |
- # [1] https://golang.org/issues/18442 |
828 |
- RESTRICT="test" |
829 |
- ;; |
830 |
- esac |
831 |
-esac |
832 |
- |
833 |
-# If gccgo or a previously installed version of dev-lang/go is not being |
834 |
-# used to build Go, there is no way to know the architecture or operating system |
835 |
-# of the build machine, so we need to download all of our bootstrap |
836 |
-# archives to allow this ebuild to work under crossdev. |
837 |
-# |
838 |
-# https://bugs.gentoo.org/671394 |
839 |
-SRC_URI+="!gccgo? ( !system-bootstrap? ( ${BOOTSTRAP_URI} ) )" |
840 |
- |
841 |
-DESCRIPTION="A concurrent garbage collected and typesafe programming language" |
842 |
-HOMEPAGE="https://golang.org" |
843 |
- |
844 |
-LICENSE="BSD" |
845 |
-SLOT="0/${PV}" |
846 |
-IUSE="gccgo system-bootstrap" |
847 |
- |
848 |
-BDEPEND="gccgo? ( >=sys-devel/gcc-5[go] )" |
849 |
-RDEPEND="!<dev-go/go-tools-0_pre20150902" |
850 |
- |
851 |
-# These test data objects have writable/executable stacks. |
852 |
-QA_EXECSTACK=" |
853 |
- usr/lib/go/src/debug/elf/testdata/*.obj |
854 |
- usr/lib/go/src/*.gox |
855 |
- " |
856 |
- |
857 |
-# Do not complain about CFLAGS, etc, since Go doesn't use them. |
858 |
-QA_FLAGS_IGNORED='.*' |
859 |
- |
860 |
-REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*" |
861 |
- |
862 |
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail. |
863 |
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" |
864 |
- |
865 |
-# Do not strip this package. Stripping is unsupported upstream and may |
866 |
-# fail. |
867 |
-RESTRICT+=" strip" |
868 |
- |
869 |
-DOCS=( |
870 |
-AUTHORS |
871 |
-CONTRIBUTING.md |
872 |
-CONTRIBUTORS |
873 |
-PATENTS |
874 |
-README.md |
875 |
-) |
876 |
- |
877 |
-go_arch() |
878 |
-{ |
879 |
- # By chance most portage arch names match Go |
880 |
- local portage_arch=$(tc-arch $@) |
881 |
- case "${portage_arch}" in |
882 |
- x86) echo 386;; |
883 |
- x64-*) echo amd64;; |
884 |
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;; |
885 |
- s390) echo s390x ;; |
886 |
- *) echo "${portage_arch}";; |
887 |
- esac |
888 |
-} |
889 |
- |
890 |
-go_arm() |
891 |
-{ |
892 |
- case "${1:-${CHOST}}" in |
893 |
- armv5*) echo 5;; |
894 |
- armv6*) echo 6;; |
895 |
- armv7*) echo 7;; |
896 |
- *) |
897 |
- die "unknown GOARM for ${1:-${CHOST}}" |
898 |
- ;; |
899 |
- esac |
900 |
-} |
901 |
- |
902 |
-go_os() |
903 |
-{ |
904 |
- case "${1:-${CHOST}}" in |
905 |
- *-linux*) echo linux;; |
906 |
- *-darwin*) echo darwin;; |
907 |
- *-freebsd*) echo freebsd;; |
908 |
- *-netbsd*) echo netbsd;; |
909 |
- *-openbsd*) echo openbsd;; |
910 |
- *-solaris*) echo solaris;; |
911 |
- *-cygwin*|*-interix*|*-winnt*) |
912 |
- echo windows |
913 |
- ;; |
914 |
- *) |
915 |
- die "unknown GOOS for ${1:-${CHOST}}" |
916 |
- ;; |
917 |
- esac |
918 |
-} |
919 |
- |
920 |
-go_tuple() |
921 |
-{ |
922 |
- echo "$(go_os $@)_$(go_arch $@)" |
923 |
-} |
924 |
- |
925 |
-go_cross_compile() |
926 |
-{ |
927 |
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] |
928 |
-} |
929 |
- |
930 |
-pkg_pretend() |
931 |
-{ |
932 |
- # make.bash does not understand cross-compiling a cross-compiler |
933 |
- if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then |
934 |
- die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}" |
935 |
- fi |
936 |
- [[ ${MERGE_TYPE} != binary ]] && |
937 |
- use system-bootstrap && ! has_version "dev-lang/go" && |
938 |
- die "dev-lang/go must be installed to use the system-bootstrap use flag" |
939 |
-} |
940 |
- |
941 |
-src_unpack() |
942 |
-{ |
943 |
- if [[ ${PV} = 9999 ]]; then |
944 |
- git-r3_src_unpack |
945 |
- else |
946 |
- unpack "go${MY_PV}.src.tar.gz" |
947 |
- fi |
948 |
- use gccgo || use system-bootstrap || |
949 |
- unpack "go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-${BOOTSTRAP_VERSION}.tbz" |
950 |
-} |
951 |
- |
952 |
-src_compile() |
953 |
-{ |
954 |
- export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-bootstrap |
955 |
- if use gccgo; then |
956 |
- mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die |
957 |
- local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version) |
958 |
- [[ -x ${go_binary} ]] || go_binary=$( |
959 |
- find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) | |
960 |
- sort -V | tail -n1) |
961 |
- [[ -x ${go_binary} ]] || |
962 |
- die "go-$(gcc-major-version): command not found" |
963 |
- ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die |
964 |
- elif use system-bootstrap; then |
965 |
- export GOROOT_BOOTSTRAP="${EPREFIX}"/usr/lib/go |
966 |
- fi |
967 |
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go |
968 |
- export GOROOT="$(pwd)" |
969 |
- export GOBIN="${GOROOT}/bin" |
970 |
- |
971 |
- # Go's build script does not use BUILD/HOST/TARGET consistently. :( |
972 |
- export GOHOSTARCH=$(go_arch ${CBUILD}) |
973 |
- export GOHOSTOS=$(go_os ${CBUILD}) |
974 |
- export CC=$(tc-getBUILD_CC) |
975 |
- |
976 |
- export GOARCH=$(go_arch) |
977 |
- export GOOS=$(go_os) |
978 |
- export CC_FOR_TARGET=$(tc-getCC) |
979 |
- export CXX_FOR_TARGET=$(tc-getCXX) |
980 |
- if [[ ${ARCH} == arm ]]; then |
981 |
- export GOARM=$(go_arm) |
982 |
- fi |
983 |
- |
984 |
- cd src |
985 |
- ./make.bash || die "build failed" |
986 |
-} |
987 |
- |
988 |
-src_test() |
989 |
-{ |
990 |
- go_cross_compile && return 0 |
991 |
- |
992 |
- cd src |
993 |
- PATH="${GOBIN}:${PATH}" \ |
994 |
- ./run.bash -no-rebuild || die "tests failed" |
995 |
-} |
996 |
- |
997 |
-src_install() |
998 |
-{ |
999 |
- local bin_path f x |
1000 |
- |
1001 |
- dodir /usr/lib/go |
1002 |
- |
1003 |
- # There is a known issue which requires the source tree to be installed [1]. |
1004 |
- # Once this is fixed, we can consider using the doc use flag to control |
1005 |
- # installing the doc and src directories. |
1006 |
- # [1] https://golang.org/issue/2775 |
1007 |
- # |
1008 |
- # deliberately use cp to retain permissions |
1009 |
- cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go |
1010 |
- if go_cross_compile; then |
1011 |
- bin_path="bin/$(go_tuple)" |
1012 |
- else |
1013 |
- bin_path=bin |
1014 |
- fi |
1015 |
- for x in ${bin_path}/*; do |
1016 |
- f=${x##*/} |
1017 |
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} |
1018 |
- done |
1019 |
- einstalldocs |
1020 |
- |
1021 |
- if [[ ${CHOST} == *-darwin* ]] ; then |
1022 |
- # fix install_name for test object (binutils_test) on Darwin, it |
1023 |
- # is never used in real circumstances |
1024 |
- local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/ |
1025 |
- libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64 |
1026 |
- install_name_tool -id "${libmac64}" "${D}${libmac64}" |
1027 |
- fi |
1028 |
-} |
1029 |
|
1030 |
diff --git a/dev-lang/go/go-1.12.1.ebuild b/dev-lang/go/go-1.12.1.ebuild |
1031 |
deleted file mode 100644 |
1032 |
index 292a2af5619..00000000000 |
1033 |
--- a/dev-lang/go/go-1.12.1.ebuild |
1034 |
+++ /dev/null |
1035 |
@@ -1,238 +0,0 @@ |
1036 |
-# Copyright 1999-2019 Gentoo Authors |
1037 |
-# Distributed under the terms of the GNU General Public License v2 |
1038 |
- |
1039 |
-EAPI=7 |
1040 |
- |
1041 |
-export CBUILD=${CBUILD:-${CHOST}} |
1042 |
-export CTARGET=${CTARGET:-${CHOST}} |
1043 |
- |
1044 |
-MY_PV=${PV/_/} |
1045 |
- |
1046 |
-inherit toolchain-funcs |
1047 |
- |
1048 |
-BOOTSTRAP_VERSION="bootstrap-1.8" |
1049 |
-BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist" |
1050 |
-BOOTSTRAP_URI=" |
1051 |
- ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz |
1052 |
- ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz |
1053 |
- ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz |
1054 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz |
1055 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz |
1056 |
- ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz |
1057 |
- ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz |
1058 |
- ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz |
1059 |
- ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz |
1060 |
- ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz |
1061 |
- ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz |
1062 |
-" |
1063 |
- |
1064 |
-case ${PV} in |
1065 |
-*9999*) |
1066 |
- EGIT_REPO_URI="https://github.com/golang/go.git" |
1067 |
- inherit git-r3 |
1068 |
- ;; |
1069 |
-*) |
1070 |
- SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " |
1071 |
- S="${WORKDIR}"/go |
1072 |
- case ${PV} in |
1073 |
- *_beta*|*_rc*) ;; |
1074 |
- *) |
1075 |
- KEYWORDS="-* amd64 arm ~arm64 ~ppc64 ~s390 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x64-macos ~x64-solaris" |
1076 |
- # The upstream tests fail under portage but pass if the build is |
1077 |
- # run according to their documentation [1]. |
1078 |
- # I am restricting the tests on released versions until this is |
1079 |
- # solved. |
1080 |
- # [1] https://golang.org/issues/18442 |
1081 |
- RESTRICT="test" |
1082 |
- ;; |
1083 |
- esac |
1084 |
-esac |
1085 |
- |
1086 |
-# If gccgo is not being used to build Go, there is no way to know the |
1087 |
-# architecture or operating system of the build machine, so we need to |
1088 |
-# download all of our bootstrap archives to allow this ebuild to work |
1089 |
-# under crossdev. |
1090 |
-# |
1091 |
-# https://bugs.gentoo.org/671394 |
1092 |
-SRC_URI+="!gccgo? ( ${BOOTSTRAP_URI} )" |
1093 |
- |
1094 |
-DESCRIPTION="A concurrent garbage collected and typesafe programming language" |
1095 |
-HOMEPAGE="https://golang.org" |
1096 |
- |
1097 |
-LICENSE="BSD" |
1098 |
-SLOT="0/${PV}" |
1099 |
-IUSE="gccgo" |
1100 |
- |
1101 |
-BDEPEND="gccgo? ( >=sys-devel/gcc-5[go] )" |
1102 |
-RDEPEND="!<dev-go/go-tools-0_pre20150902" |
1103 |
- |
1104 |
-# These test data objects have writable/executable stacks. |
1105 |
-QA_EXECSTACK=" |
1106 |
- usr/lib/go/src/debug/elf/testdata/*.obj |
1107 |
- usr/lib/go/src/*.gox |
1108 |
- " |
1109 |
- |
1110 |
-# Do not complain about CFLAGS, etc, since Go doesn't use them. |
1111 |
-QA_FLAGS_IGNORED='.*' |
1112 |
- |
1113 |
-REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*" |
1114 |
- |
1115 |
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail. |
1116 |
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" |
1117 |
- |
1118 |
-# Do not strip this package. Stripping is unsupported upstream and may |
1119 |
-# fail. |
1120 |
-RESTRICT+=" strip" |
1121 |
- |
1122 |
-DOCS=( |
1123 |
-AUTHORS |
1124 |
-CONTRIBUTING.md |
1125 |
-CONTRIBUTORS |
1126 |
-PATENTS |
1127 |
-README.md |
1128 |
-) |
1129 |
- |
1130 |
-go_arch() |
1131 |
-{ |
1132 |
- # By chance most portage arch names match Go |
1133 |
- local portage_arch=$(tc-arch $@) |
1134 |
- case "${portage_arch}" in |
1135 |
- x86) echo 386;; |
1136 |
- x64-*) echo amd64;; |
1137 |
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;; |
1138 |
- s390) echo s390x ;; |
1139 |
- *) echo "${portage_arch}";; |
1140 |
- esac |
1141 |
-} |
1142 |
- |
1143 |
-go_arm() |
1144 |
-{ |
1145 |
- case "${1:-${CHOST}}" in |
1146 |
- armv5*) echo 5;; |
1147 |
- armv6*) echo 6;; |
1148 |
- armv7*) echo 7;; |
1149 |
- *) |
1150 |
- die "unknown GOARM for ${1:-${CHOST}}" |
1151 |
- ;; |
1152 |
- esac |
1153 |
-} |
1154 |
- |
1155 |
-go_os() |
1156 |
-{ |
1157 |
- case "${1:-${CHOST}}" in |
1158 |
- *-linux*) echo linux;; |
1159 |
- *-darwin*) echo darwin;; |
1160 |
- *-freebsd*) echo freebsd;; |
1161 |
- *-netbsd*) echo netbsd;; |
1162 |
- *-openbsd*) echo openbsd;; |
1163 |
- *-solaris*) echo solaris;; |
1164 |
- *-cygwin*|*-interix*|*-winnt*) |
1165 |
- echo windows |
1166 |
- ;; |
1167 |
- *) |
1168 |
- die "unknown GOOS for ${1:-${CHOST}}" |
1169 |
- ;; |
1170 |
- esac |
1171 |
-} |
1172 |
- |
1173 |
-go_tuple() |
1174 |
-{ |
1175 |
- echo "$(go_os $@)_$(go_arch $@)" |
1176 |
-} |
1177 |
- |
1178 |
-go_cross_compile() |
1179 |
-{ |
1180 |
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] |
1181 |
-} |
1182 |
- |
1183 |
-pkg_pretend() |
1184 |
-{ |
1185 |
- # make.bash does not understand cross-compiling a cross-compiler |
1186 |
- if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then |
1187 |
- die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}" |
1188 |
- fi |
1189 |
-} |
1190 |
- |
1191 |
-src_unpack() |
1192 |
-{ |
1193 |
- if [[ ${PV} = 9999 ]]; then |
1194 |
- git-r3_src_unpack |
1195 |
- fi |
1196 |
- default |
1197 |
-} |
1198 |
- |
1199 |
-src_compile() |
1200 |
-{ |
1201 |
- export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-bootstrap |
1202 |
- if use gccgo; then |
1203 |
- mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die |
1204 |
- local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version) |
1205 |
- [[ -x ${go_binary} ]] || go_binary=$( |
1206 |
- find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) | |
1207 |
- sort -V | tail -n1) |
1208 |
- [[ -x ${go_binary} ]] || |
1209 |
- die "go-$(gcc-major-version): command not found" |
1210 |
- ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die |
1211 |
- fi |
1212 |
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go |
1213 |
- export GOROOT="$(pwd)" |
1214 |
- export GOBIN="${GOROOT}/bin" |
1215 |
- |
1216 |
- # Go's build script does not use BUILD/HOST/TARGET consistently. :( |
1217 |
- export GOHOSTARCH=$(go_arch ${CBUILD}) |
1218 |
- export GOHOSTOS=$(go_os ${CBUILD}) |
1219 |
- export CC=$(tc-getBUILD_CC) |
1220 |
- |
1221 |
- export GOARCH=$(go_arch) |
1222 |
- export GOOS=$(go_os) |
1223 |
- export CC_FOR_TARGET=$(tc-getCC) |
1224 |
- export CXX_FOR_TARGET=$(tc-getCXX) |
1225 |
- if [[ ${ARCH} == arm ]]; then |
1226 |
- export GOARM=$(go_arm) |
1227 |
- fi |
1228 |
- |
1229 |
- cd src |
1230 |
- ./make.bash || die "build failed" |
1231 |
-} |
1232 |
- |
1233 |
-src_test() |
1234 |
-{ |
1235 |
- go_cross_compile && return 0 |
1236 |
- |
1237 |
- cd src |
1238 |
- PATH="${GOBIN}:${PATH}" \ |
1239 |
- ./run.bash -no-rebuild || die "tests failed" |
1240 |
-} |
1241 |
- |
1242 |
-src_install() |
1243 |
-{ |
1244 |
- local bin_path f x |
1245 |
- |
1246 |
- dodir /usr/lib/go |
1247 |
- |
1248 |
- # There is a known issue which requires the source tree to be installed [1]. |
1249 |
- # Once this is fixed, we can consider using the doc use flag to control |
1250 |
- # installing the doc and src directories. |
1251 |
- # [1] https://golang.org/issue/2775 |
1252 |
- # |
1253 |
- # deliberately use cp to retain permissions |
1254 |
- cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go |
1255 |
- if go_cross_compile; then |
1256 |
- bin_path="bin/$(go_tuple)" |
1257 |
- else |
1258 |
- bin_path=bin |
1259 |
- fi |
1260 |
- for x in ${bin_path}/*; do |
1261 |
- f=${x##*/} |
1262 |
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} |
1263 |
- done |
1264 |
- einstalldocs |
1265 |
- |
1266 |
- if [[ ${CHOST} == *-darwin* ]] ; then |
1267 |
- # fix install_name for test object (binutils_test) on Darwin, it |
1268 |
- # is never used in real circumstances |
1269 |
- local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/ |
1270 |
- libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64 |
1271 |
- install_name_tool -id "${libmac64}" "${D}${libmac64}" |
1272 |
- fi |
1273 |
-} |
1274 |
|
1275 |
diff --git a/dev-lang/go/go-1.12.2.ebuild b/dev-lang/go/go-1.12.2.ebuild |
1276 |
deleted file mode 100644 |
1277 |
index 4cb21b53d19..00000000000 |
1278 |
--- a/dev-lang/go/go-1.12.2.ebuild |
1279 |
+++ /dev/null |
1280 |
@@ -1,238 +0,0 @@ |
1281 |
-# Copyright 1999-2019 Gentoo Authors |
1282 |
-# Distributed under the terms of the GNU General Public License v2 |
1283 |
- |
1284 |
-EAPI=7 |
1285 |
- |
1286 |
-export CBUILD=${CBUILD:-${CHOST}} |
1287 |
-export CTARGET=${CTARGET:-${CHOST}} |
1288 |
- |
1289 |
-MY_PV=${PV/_/} |
1290 |
- |
1291 |
-inherit toolchain-funcs |
1292 |
- |
1293 |
-BOOTSTRAP_VERSION="bootstrap-1.8" |
1294 |
-BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist" |
1295 |
-BOOTSTRAP_URI=" |
1296 |
- ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz |
1297 |
- ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz |
1298 |
- ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz |
1299 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz |
1300 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz |
1301 |
- ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz |
1302 |
- ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz |
1303 |
- ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz |
1304 |
- ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz |
1305 |
- ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz |
1306 |
- ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz |
1307 |
-" |
1308 |
- |
1309 |
-case ${PV} in |
1310 |
-*9999*) |
1311 |
- EGIT_REPO_URI="https://github.com/golang/go.git" |
1312 |
- inherit git-r3 |
1313 |
- ;; |
1314 |
-*) |
1315 |
- SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " |
1316 |
- S="${WORKDIR}"/go |
1317 |
- case ${PV} in |
1318 |
- *_beta*|*_rc*) ;; |
1319 |
- *) |
1320 |
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~s390 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x64-macos ~x64-solaris" |
1321 |
- # The upstream tests fail under portage but pass if the build is |
1322 |
- # run according to their documentation [1]. |
1323 |
- # I am restricting the tests on released versions until this is |
1324 |
- # solved. |
1325 |
- # [1] https://golang.org/issues/18442 |
1326 |
- RESTRICT="test" |
1327 |
- ;; |
1328 |
- esac |
1329 |
-esac |
1330 |
- |
1331 |
-# If gccgo is not being used to build Go, there is no way to know the |
1332 |
-# architecture or operating system of the build machine, so we need to |
1333 |
-# download all of our bootstrap archives to allow this ebuild to work |
1334 |
-# under crossdev. |
1335 |
-# |
1336 |
-# https://bugs.gentoo.org/671394 |
1337 |
-SRC_URI+="!gccgo? ( ${BOOTSTRAP_URI} )" |
1338 |
- |
1339 |
-DESCRIPTION="A concurrent garbage collected and typesafe programming language" |
1340 |
-HOMEPAGE="https://golang.org" |
1341 |
- |
1342 |
-LICENSE="BSD" |
1343 |
-SLOT="0/${PV}" |
1344 |
-IUSE="gccgo" |
1345 |
- |
1346 |
-BDEPEND="gccgo? ( >=sys-devel/gcc-5[go] )" |
1347 |
-RDEPEND="!<dev-go/go-tools-0_pre20150902" |
1348 |
- |
1349 |
-# These test data objects have writable/executable stacks. |
1350 |
-QA_EXECSTACK=" |
1351 |
- usr/lib/go/src/debug/elf/testdata/*.obj |
1352 |
- usr/lib/go/src/*.gox |
1353 |
- " |
1354 |
- |
1355 |
-# Do not complain about CFLAGS, etc, since Go doesn't use them. |
1356 |
-QA_FLAGS_IGNORED='.*' |
1357 |
- |
1358 |
-REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*" |
1359 |
- |
1360 |
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail. |
1361 |
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" |
1362 |
- |
1363 |
-# Do not strip this package. Stripping is unsupported upstream and may |
1364 |
-# fail. |
1365 |
-RESTRICT+=" strip" |
1366 |
- |
1367 |
-DOCS=( |
1368 |
-AUTHORS |
1369 |
-CONTRIBUTING.md |
1370 |
-CONTRIBUTORS |
1371 |
-PATENTS |
1372 |
-README.md |
1373 |
-) |
1374 |
- |
1375 |
-go_arch() |
1376 |
-{ |
1377 |
- # By chance most portage arch names match Go |
1378 |
- local portage_arch=$(tc-arch $@) |
1379 |
- case "${portage_arch}" in |
1380 |
- x86) echo 386;; |
1381 |
- x64-*) echo amd64;; |
1382 |
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;; |
1383 |
- s390) echo s390x ;; |
1384 |
- *) echo "${portage_arch}";; |
1385 |
- esac |
1386 |
-} |
1387 |
- |
1388 |
-go_arm() |
1389 |
-{ |
1390 |
- case "${1:-${CHOST}}" in |
1391 |
- armv5*) echo 5;; |
1392 |
- armv6*) echo 6;; |
1393 |
- armv7*) echo 7;; |
1394 |
- *) |
1395 |
- die "unknown GOARM for ${1:-${CHOST}}" |
1396 |
- ;; |
1397 |
- esac |
1398 |
-} |
1399 |
- |
1400 |
-go_os() |
1401 |
-{ |
1402 |
- case "${1:-${CHOST}}" in |
1403 |
- *-linux*) echo linux;; |
1404 |
- *-darwin*) echo darwin;; |
1405 |
- *-freebsd*) echo freebsd;; |
1406 |
- *-netbsd*) echo netbsd;; |
1407 |
- *-openbsd*) echo openbsd;; |
1408 |
- *-solaris*) echo solaris;; |
1409 |
- *-cygwin*|*-interix*|*-winnt*) |
1410 |
- echo windows |
1411 |
- ;; |
1412 |
- *) |
1413 |
- die "unknown GOOS for ${1:-${CHOST}}" |
1414 |
- ;; |
1415 |
- esac |
1416 |
-} |
1417 |
- |
1418 |
-go_tuple() |
1419 |
-{ |
1420 |
- echo "$(go_os $@)_$(go_arch $@)" |
1421 |
-} |
1422 |
- |
1423 |
-go_cross_compile() |
1424 |
-{ |
1425 |
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] |
1426 |
-} |
1427 |
- |
1428 |
-pkg_pretend() |
1429 |
-{ |
1430 |
- # make.bash does not understand cross-compiling a cross-compiler |
1431 |
- if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then |
1432 |
- die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}" |
1433 |
- fi |
1434 |
-} |
1435 |
- |
1436 |
-src_unpack() |
1437 |
-{ |
1438 |
- if [[ ${PV} = 9999 ]]; then |
1439 |
- git-r3_src_unpack |
1440 |
- fi |
1441 |
- default |
1442 |
-} |
1443 |
- |
1444 |
-src_compile() |
1445 |
-{ |
1446 |
- export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-bootstrap |
1447 |
- if use gccgo; then |
1448 |
- mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die |
1449 |
- local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version) |
1450 |
- [[ -x ${go_binary} ]] || go_binary=$( |
1451 |
- find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) | |
1452 |
- sort -V | tail -n1) |
1453 |
- [[ -x ${go_binary} ]] || |
1454 |
- die "go-$(gcc-major-version): command not found" |
1455 |
- ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die |
1456 |
- fi |
1457 |
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go |
1458 |
- export GOROOT="$(pwd)" |
1459 |
- export GOBIN="${GOROOT}/bin" |
1460 |
- |
1461 |
- # Go's build script does not use BUILD/HOST/TARGET consistently. :( |
1462 |
- export GOHOSTARCH=$(go_arch ${CBUILD}) |
1463 |
- export GOHOSTOS=$(go_os ${CBUILD}) |
1464 |
- export CC=$(tc-getBUILD_CC) |
1465 |
- |
1466 |
- export GOARCH=$(go_arch) |
1467 |
- export GOOS=$(go_os) |
1468 |
- export CC_FOR_TARGET=$(tc-getCC) |
1469 |
- export CXX_FOR_TARGET=$(tc-getCXX) |
1470 |
- if [[ ${ARCH} == arm ]]; then |
1471 |
- export GOARM=$(go_arm) |
1472 |
- fi |
1473 |
- |
1474 |
- cd src |
1475 |
- ./make.bash || die "build failed" |
1476 |
-} |
1477 |
- |
1478 |
-src_test() |
1479 |
-{ |
1480 |
- go_cross_compile && return 0 |
1481 |
- |
1482 |
- cd src |
1483 |
- PATH="${GOBIN}:${PATH}" \ |
1484 |
- ./run.bash -no-rebuild || die "tests failed" |
1485 |
-} |
1486 |
- |
1487 |
-src_install() |
1488 |
-{ |
1489 |
- local bin_path f x |
1490 |
- |
1491 |
- dodir /usr/lib/go |
1492 |
- |
1493 |
- # There is a known issue which requires the source tree to be installed [1]. |
1494 |
- # Once this is fixed, we can consider using the doc use flag to control |
1495 |
- # installing the doc and src directories. |
1496 |
- # [1] https://golang.org/issue/2775 |
1497 |
- # |
1498 |
- # deliberately use cp to retain permissions |
1499 |
- cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go |
1500 |
- if go_cross_compile; then |
1501 |
- bin_path="bin/$(go_tuple)" |
1502 |
- else |
1503 |
- bin_path=bin |
1504 |
- fi |
1505 |
- for x in ${bin_path}/*; do |
1506 |
- f=${x##*/} |
1507 |
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} |
1508 |
- done |
1509 |
- einstalldocs |
1510 |
- |
1511 |
- if [[ ${CHOST} == *-darwin* ]] ; then |
1512 |
- # fix install_name for test object (binutils_test) on Darwin, it |
1513 |
- # is never used in real circumstances |
1514 |
- local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/ |
1515 |
- libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64 |
1516 |
- install_name_tool -id "${libmac64}" "${D}${libmac64}" |
1517 |
- fi |
1518 |
-} |
1519 |
|
1520 |
diff --git a/dev-lang/go/go-1.12.3.ebuild b/dev-lang/go/go-1.12.3.ebuild |
1521 |
deleted file mode 100644 |
1522 |
index 4cb21b53d19..00000000000 |
1523 |
--- a/dev-lang/go/go-1.12.3.ebuild |
1524 |
+++ /dev/null |
1525 |
@@ -1,238 +0,0 @@ |
1526 |
-# Copyright 1999-2019 Gentoo Authors |
1527 |
-# Distributed under the terms of the GNU General Public License v2 |
1528 |
- |
1529 |
-EAPI=7 |
1530 |
- |
1531 |
-export CBUILD=${CBUILD:-${CHOST}} |
1532 |
-export CTARGET=${CTARGET:-${CHOST}} |
1533 |
- |
1534 |
-MY_PV=${PV/_/} |
1535 |
- |
1536 |
-inherit toolchain-funcs |
1537 |
- |
1538 |
-BOOTSTRAP_VERSION="bootstrap-1.8" |
1539 |
-BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist" |
1540 |
-BOOTSTRAP_URI=" |
1541 |
- ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz |
1542 |
- ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz |
1543 |
- ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz |
1544 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz |
1545 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz |
1546 |
- ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz |
1547 |
- ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz |
1548 |
- ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz |
1549 |
- ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz |
1550 |
- ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz |
1551 |
- ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz |
1552 |
-" |
1553 |
- |
1554 |
-case ${PV} in |
1555 |
-*9999*) |
1556 |
- EGIT_REPO_URI="https://github.com/golang/go.git" |
1557 |
- inherit git-r3 |
1558 |
- ;; |
1559 |
-*) |
1560 |
- SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " |
1561 |
- S="${WORKDIR}"/go |
1562 |
- case ${PV} in |
1563 |
- *_beta*|*_rc*) ;; |
1564 |
- *) |
1565 |
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~s390 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x64-macos ~x64-solaris" |
1566 |
- # The upstream tests fail under portage but pass if the build is |
1567 |
- # run according to their documentation [1]. |
1568 |
- # I am restricting the tests on released versions until this is |
1569 |
- # solved. |
1570 |
- # [1] https://golang.org/issues/18442 |
1571 |
- RESTRICT="test" |
1572 |
- ;; |
1573 |
- esac |
1574 |
-esac |
1575 |
- |
1576 |
-# If gccgo is not being used to build Go, there is no way to know the |
1577 |
-# architecture or operating system of the build machine, so we need to |
1578 |
-# download all of our bootstrap archives to allow this ebuild to work |
1579 |
-# under crossdev. |
1580 |
-# |
1581 |
-# https://bugs.gentoo.org/671394 |
1582 |
-SRC_URI+="!gccgo? ( ${BOOTSTRAP_URI} )" |
1583 |
- |
1584 |
-DESCRIPTION="A concurrent garbage collected and typesafe programming language" |
1585 |
-HOMEPAGE="https://golang.org" |
1586 |
- |
1587 |
-LICENSE="BSD" |
1588 |
-SLOT="0/${PV}" |
1589 |
-IUSE="gccgo" |
1590 |
- |
1591 |
-BDEPEND="gccgo? ( >=sys-devel/gcc-5[go] )" |
1592 |
-RDEPEND="!<dev-go/go-tools-0_pre20150902" |
1593 |
- |
1594 |
-# These test data objects have writable/executable stacks. |
1595 |
-QA_EXECSTACK=" |
1596 |
- usr/lib/go/src/debug/elf/testdata/*.obj |
1597 |
- usr/lib/go/src/*.gox |
1598 |
- " |
1599 |
- |
1600 |
-# Do not complain about CFLAGS, etc, since Go doesn't use them. |
1601 |
-QA_FLAGS_IGNORED='.*' |
1602 |
- |
1603 |
-REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*" |
1604 |
- |
1605 |
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail. |
1606 |
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" |
1607 |
- |
1608 |
-# Do not strip this package. Stripping is unsupported upstream and may |
1609 |
-# fail. |
1610 |
-RESTRICT+=" strip" |
1611 |
- |
1612 |
-DOCS=( |
1613 |
-AUTHORS |
1614 |
-CONTRIBUTING.md |
1615 |
-CONTRIBUTORS |
1616 |
-PATENTS |
1617 |
-README.md |
1618 |
-) |
1619 |
- |
1620 |
-go_arch() |
1621 |
-{ |
1622 |
- # By chance most portage arch names match Go |
1623 |
- local portage_arch=$(tc-arch $@) |
1624 |
- case "${portage_arch}" in |
1625 |
- x86) echo 386;; |
1626 |
- x64-*) echo amd64;; |
1627 |
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;; |
1628 |
- s390) echo s390x ;; |
1629 |
- *) echo "${portage_arch}";; |
1630 |
- esac |
1631 |
-} |
1632 |
- |
1633 |
-go_arm() |
1634 |
-{ |
1635 |
- case "${1:-${CHOST}}" in |
1636 |
- armv5*) echo 5;; |
1637 |
- armv6*) echo 6;; |
1638 |
- armv7*) echo 7;; |
1639 |
- *) |
1640 |
- die "unknown GOARM for ${1:-${CHOST}}" |
1641 |
- ;; |
1642 |
- esac |
1643 |
-} |
1644 |
- |
1645 |
-go_os() |
1646 |
-{ |
1647 |
- case "${1:-${CHOST}}" in |
1648 |
- *-linux*) echo linux;; |
1649 |
- *-darwin*) echo darwin;; |
1650 |
- *-freebsd*) echo freebsd;; |
1651 |
- *-netbsd*) echo netbsd;; |
1652 |
- *-openbsd*) echo openbsd;; |
1653 |
- *-solaris*) echo solaris;; |
1654 |
- *-cygwin*|*-interix*|*-winnt*) |
1655 |
- echo windows |
1656 |
- ;; |
1657 |
- *) |
1658 |
- die "unknown GOOS for ${1:-${CHOST}}" |
1659 |
- ;; |
1660 |
- esac |
1661 |
-} |
1662 |
- |
1663 |
-go_tuple() |
1664 |
-{ |
1665 |
- echo "$(go_os $@)_$(go_arch $@)" |
1666 |
-} |
1667 |
- |
1668 |
-go_cross_compile() |
1669 |
-{ |
1670 |
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] |
1671 |
-} |
1672 |
- |
1673 |
-pkg_pretend() |
1674 |
-{ |
1675 |
- # make.bash does not understand cross-compiling a cross-compiler |
1676 |
- if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then |
1677 |
- die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}" |
1678 |
- fi |
1679 |
-} |
1680 |
- |
1681 |
-src_unpack() |
1682 |
-{ |
1683 |
- if [[ ${PV} = 9999 ]]; then |
1684 |
- git-r3_src_unpack |
1685 |
- fi |
1686 |
- default |
1687 |
-} |
1688 |
- |
1689 |
-src_compile() |
1690 |
-{ |
1691 |
- export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-bootstrap |
1692 |
- if use gccgo; then |
1693 |
- mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die |
1694 |
- local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version) |
1695 |
- [[ -x ${go_binary} ]] || go_binary=$( |
1696 |
- find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) | |
1697 |
- sort -V | tail -n1) |
1698 |
- [[ -x ${go_binary} ]] || |
1699 |
- die "go-$(gcc-major-version): command not found" |
1700 |
- ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die |
1701 |
- fi |
1702 |
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go |
1703 |
- export GOROOT="$(pwd)" |
1704 |
- export GOBIN="${GOROOT}/bin" |
1705 |
- |
1706 |
- # Go's build script does not use BUILD/HOST/TARGET consistently. :( |
1707 |
- export GOHOSTARCH=$(go_arch ${CBUILD}) |
1708 |
- export GOHOSTOS=$(go_os ${CBUILD}) |
1709 |
- export CC=$(tc-getBUILD_CC) |
1710 |
- |
1711 |
- export GOARCH=$(go_arch) |
1712 |
- export GOOS=$(go_os) |
1713 |
- export CC_FOR_TARGET=$(tc-getCC) |
1714 |
- export CXX_FOR_TARGET=$(tc-getCXX) |
1715 |
- if [[ ${ARCH} == arm ]]; then |
1716 |
- export GOARM=$(go_arm) |
1717 |
- fi |
1718 |
- |
1719 |
- cd src |
1720 |
- ./make.bash || die "build failed" |
1721 |
-} |
1722 |
- |
1723 |
-src_test() |
1724 |
-{ |
1725 |
- go_cross_compile && return 0 |
1726 |
- |
1727 |
- cd src |
1728 |
- PATH="${GOBIN}:${PATH}" \ |
1729 |
- ./run.bash -no-rebuild || die "tests failed" |
1730 |
-} |
1731 |
- |
1732 |
-src_install() |
1733 |
-{ |
1734 |
- local bin_path f x |
1735 |
- |
1736 |
- dodir /usr/lib/go |
1737 |
- |
1738 |
- # There is a known issue which requires the source tree to be installed [1]. |
1739 |
- # Once this is fixed, we can consider using the doc use flag to control |
1740 |
- # installing the doc and src directories. |
1741 |
- # [1] https://golang.org/issue/2775 |
1742 |
- # |
1743 |
- # deliberately use cp to retain permissions |
1744 |
- cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go |
1745 |
- if go_cross_compile; then |
1746 |
- bin_path="bin/$(go_tuple)" |
1747 |
- else |
1748 |
- bin_path=bin |
1749 |
- fi |
1750 |
- for x in ${bin_path}/*; do |
1751 |
- f=${x##*/} |
1752 |
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} |
1753 |
- done |
1754 |
- einstalldocs |
1755 |
- |
1756 |
- if [[ ${CHOST} == *-darwin* ]] ; then |
1757 |
- # fix install_name for test object (binutils_test) on Darwin, it |
1758 |
- # is never used in real circumstances |
1759 |
- local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/ |
1760 |
- libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64 |
1761 |
- install_name_tool -id "${libmac64}" "${D}${libmac64}" |
1762 |
- fi |
1763 |
-} |
1764 |
|
1765 |
diff --git a/dev-lang/go/go-1.12.4.ebuild b/dev-lang/go/go-1.12.4.ebuild |
1766 |
deleted file mode 100644 |
1767 |
index a53df7c0956..00000000000 |
1768 |
--- a/dev-lang/go/go-1.12.4.ebuild |
1769 |
+++ /dev/null |
1770 |
@@ -1,246 +0,0 @@ |
1771 |
-# Copyright 1999-2019 Gentoo Authors |
1772 |
-# Distributed under the terms of the GNU General Public License v2 |
1773 |
- |
1774 |
-EAPI=7 |
1775 |
- |
1776 |
-export CBUILD=${CBUILD:-${CHOST}} |
1777 |
-export CTARGET=${CTARGET:-${CHOST}} |
1778 |
- |
1779 |
-MY_PV=${PV/_/} |
1780 |
- |
1781 |
-inherit toolchain-funcs |
1782 |
- |
1783 |
-BOOTSTRAP_VERSION="bootstrap-1.8" |
1784 |
-BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist" |
1785 |
-BOOTSTRAP_URI=" |
1786 |
- ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz |
1787 |
- ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz |
1788 |
- ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz |
1789 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz |
1790 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz |
1791 |
- ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz |
1792 |
- ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz |
1793 |
- ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz |
1794 |
- ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz |
1795 |
- ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz |
1796 |
- ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz |
1797 |
-" |
1798 |
- |
1799 |
-case ${PV} in |
1800 |
-*9999*) |
1801 |
- EGIT_REPO_URI="https://github.com/golang/go.git" |
1802 |
- inherit git-r3 |
1803 |
- ;; |
1804 |
-*) |
1805 |
- SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " |
1806 |
- S="${WORKDIR}"/go |
1807 |
- case ${PV} in |
1808 |
- *_beta*|*_rc*) ;; |
1809 |
- *) |
1810 |
- KEYWORDS="-* amd64 ~arm ~arm64 ~ppc64 ~s390 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x64-macos ~x64-solaris" |
1811 |
- # The upstream tests fail under portage but pass if the build is |
1812 |
- # run according to their documentation [1]. |
1813 |
- # I am restricting the tests on released versions until this is |
1814 |
- # solved. |
1815 |
- # [1] https://golang.org/issues/18442 |
1816 |
- RESTRICT="test" |
1817 |
- ;; |
1818 |
- esac |
1819 |
-esac |
1820 |
- |
1821 |
-# If gccgo or a previously installed version of dev-lang/go is not being |
1822 |
-# used to build Go, there is no way to know the architecture or operating system |
1823 |
-# of the build machine, so we need to download all of our bootstrap |
1824 |
-# archives to allow this ebuild to work under crossdev. |
1825 |
-# |
1826 |
-# https://bugs.gentoo.org/671394 |
1827 |
-SRC_URI+="!gccgo? ( !system-bootstrap? ( ${BOOTSTRAP_URI} ) )" |
1828 |
- |
1829 |
-DESCRIPTION="A concurrent garbage collected and typesafe programming language" |
1830 |
-HOMEPAGE="https://golang.org" |
1831 |
- |
1832 |
-LICENSE="BSD" |
1833 |
-SLOT="0/${PV}" |
1834 |
-IUSE="gccgo system-bootstrap" |
1835 |
- |
1836 |
-BDEPEND="gccgo? ( >=sys-devel/gcc-5[go] )" |
1837 |
-RDEPEND="!<dev-go/go-tools-0_pre20150902" |
1838 |
- |
1839 |
-# These test data objects have writable/executable stacks. |
1840 |
-QA_EXECSTACK=" |
1841 |
- usr/lib/go/src/debug/elf/testdata/*.obj |
1842 |
- usr/lib/go/src/*.gox |
1843 |
- " |
1844 |
- |
1845 |
-# Do not complain about CFLAGS, etc, since Go doesn't use them. |
1846 |
-QA_FLAGS_IGNORED='.*' |
1847 |
- |
1848 |
-REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*" |
1849 |
- |
1850 |
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail. |
1851 |
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" |
1852 |
- |
1853 |
-# Do not strip this package. Stripping is unsupported upstream and may |
1854 |
-# fail. |
1855 |
-RESTRICT+=" strip" |
1856 |
- |
1857 |
-DOCS=( |
1858 |
-AUTHORS |
1859 |
-CONTRIBUTING.md |
1860 |
-CONTRIBUTORS |
1861 |
-PATENTS |
1862 |
-README.md |
1863 |
-) |
1864 |
- |
1865 |
-go_arch() |
1866 |
-{ |
1867 |
- # By chance most portage arch names match Go |
1868 |
- local portage_arch=$(tc-arch $@) |
1869 |
- case "${portage_arch}" in |
1870 |
- x86) echo 386;; |
1871 |
- x64-*) echo amd64;; |
1872 |
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;; |
1873 |
- s390) echo s390x ;; |
1874 |
- *) echo "${portage_arch}";; |
1875 |
- esac |
1876 |
-} |
1877 |
- |
1878 |
-go_arm() |
1879 |
-{ |
1880 |
- case "${1:-${CHOST}}" in |
1881 |
- armv5*) echo 5;; |
1882 |
- armv6*) echo 6;; |
1883 |
- armv7*) echo 7;; |
1884 |
- *) |
1885 |
- die "unknown GOARM for ${1:-${CHOST}}" |
1886 |
- ;; |
1887 |
- esac |
1888 |
-} |
1889 |
- |
1890 |
-go_os() |
1891 |
-{ |
1892 |
- case "${1:-${CHOST}}" in |
1893 |
- *-linux*) echo linux;; |
1894 |
- *-darwin*) echo darwin;; |
1895 |
- *-freebsd*) echo freebsd;; |
1896 |
- *-netbsd*) echo netbsd;; |
1897 |
- *-openbsd*) echo openbsd;; |
1898 |
- *-solaris*) echo solaris;; |
1899 |
- *-cygwin*|*-interix*|*-winnt*) |
1900 |
- echo windows |
1901 |
- ;; |
1902 |
- *) |
1903 |
- die "unknown GOOS for ${1:-${CHOST}}" |
1904 |
- ;; |
1905 |
- esac |
1906 |
-} |
1907 |
- |
1908 |
-go_tuple() |
1909 |
-{ |
1910 |
- echo "$(go_os $@)_$(go_arch $@)" |
1911 |
-} |
1912 |
- |
1913 |
-go_cross_compile() |
1914 |
-{ |
1915 |
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] |
1916 |
-} |
1917 |
- |
1918 |
-pkg_pretend() |
1919 |
-{ |
1920 |
- # make.bash does not understand cross-compiling a cross-compiler |
1921 |
- if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then |
1922 |
- die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}" |
1923 |
- fi |
1924 |
- [[ ${MERGE_TYPE} != binary ]] && |
1925 |
- use system-bootstrap && ! has_version "dev-lang/go" && |
1926 |
- die "dev-lang/go must be installed to use the system-bootstrap use flag" |
1927 |
-} |
1928 |
- |
1929 |
-src_unpack() |
1930 |
-{ |
1931 |
- if [[ ${PV} = 9999 ]]; then |
1932 |
- git-r3_src_unpack |
1933 |
- else |
1934 |
- unpack "go${MY_PV}.src.tar.gz" |
1935 |
- fi |
1936 |
- use gccgo || use system-bootstrap || |
1937 |
- unpack "go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-${BOOTSTRAP_VERSION}.tbz" |
1938 |
-} |
1939 |
- |
1940 |
-src_compile() |
1941 |
-{ |
1942 |
- export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-bootstrap |
1943 |
- if use gccgo; then |
1944 |
- mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die |
1945 |
- local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version) |
1946 |
- [[ -x ${go_binary} ]] || go_binary=$( |
1947 |
- find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) | |
1948 |
- sort -V | tail -n1) |
1949 |
- [[ -x ${go_binary} ]] || |
1950 |
- die "go-$(gcc-major-version): command not found" |
1951 |
- ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die |
1952 |
- elif use system-bootstrap; then |
1953 |
- export GOROOT_BOOTSTRAP="${EPREFIX}"/usr/lib/go |
1954 |
- fi |
1955 |
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go |
1956 |
- export GOROOT="$(pwd)" |
1957 |
- export GOBIN="${GOROOT}/bin" |
1958 |
- |
1959 |
- # Go's build script does not use BUILD/HOST/TARGET consistently. :( |
1960 |
- export GOHOSTARCH=$(go_arch ${CBUILD}) |
1961 |
- export GOHOSTOS=$(go_os ${CBUILD}) |
1962 |
- export CC=$(tc-getBUILD_CC) |
1963 |
- |
1964 |
- export GOARCH=$(go_arch) |
1965 |
- export GOOS=$(go_os) |
1966 |
- export CC_FOR_TARGET=$(tc-getCC) |
1967 |
- export CXX_FOR_TARGET=$(tc-getCXX) |
1968 |
- if [[ ${ARCH} == arm ]]; then |
1969 |
- export GOARM=$(go_arm) |
1970 |
- fi |
1971 |
- |
1972 |
- cd src |
1973 |
- ./make.bash || die "build failed" |
1974 |
-} |
1975 |
- |
1976 |
-src_test() |
1977 |
-{ |
1978 |
- go_cross_compile && return 0 |
1979 |
- |
1980 |
- cd src |
1981 |
- PATH="${GOBIN}:${PATH}" \ |
1982 |
- ./run.bash -no-rebuild || die "tests failed" |
1983 |
-} |
1984 |
- |
1985 |
-src_install() |
1986 |
-{ |
1987 |
- local bin_path f x |
1988 |
- |
1989 |
- dodir /usr/lib/go |
1990 |
- |
1991 |
- # There is a known issue which requires the source tree to be installed [1]. |
1992 |
- # Once this is fixed, we can consider using the doc use flag to control |
1993 |
- # installing the doc and src directories. |
1994 |
- # [1] https://golang.org/issue/2775 |
1995 |
- # |
1996 |
- # deliberately use cp to retain permissions |
1997 |
- cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go |
1998 |
- if go_cross_compile; then |
1999 |
- bin_path="bin/$(go_tuple)" |
2000 |
- else |
2001 |
- bin_path=bin |
2002 |
- fi |
2003 |
- for x in ${bin_path}/*; do |
2004 |
- f=${x##*/} |
2005 |
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} |
2006 |
- done |
2007 |
- einstalldocs |
2008 |
- |
2009 |
- if [[ ${CHOST} == *-darwin* ]] ; then |
2010 |
- # fix install_name for test object (binutils_test) on Darwin, it |
2011 |
- # is never used in real circumstances |
2012 |
- local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/ |
2013 |
- libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64 |
2014 |
- install_name_tool -id "${libmac64}" "${D}${libmac64}" |
2015 |
- fi |
2016 |
-} |