1 |
commit: 4f7551b6501bd3c169e2548c87db577c5b14b604 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jul 28 15:58:30 2016 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 28 15:58:30 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f7551b6 |
7 |
|
8 |
dev-lang/go: cleanup for #589230 |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
|
12 |
dev-lang/go/Manifest | 3 - |
13 |
dev-lang/go/files/go-1.6.1-gdb-no-shell.patch | 12 -- |
14 |
dev-lang/go/files/go-1.6.2-gdb-no-shell.patch | 12 -- |
15 |
dev-lang/go/go-1.6-r2.ebuild | 243 ------------------------ |
16 |
dev-lang/go/go-1.6.1.ebuild | 257 ------------------------- |
17 |
dev-lang/go/go-1.6.2.ebuild | 260 -------------------------- |
18 |
6 files changed, 787 deletions(-) |
19 |
|
20 |
diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest |
21 |
index a1e0299..7f2ddff 100644 |
22 |
--- a/dev-lang/go/Manifest |
23 |
+++ b/dev-lang/go/Manifest |
24 |
@@ -8,7 +8,4 @@ DIST go-linux-arm64-bootstrap.tbz 45369354 SHA256 810c998e6701580fe0f26d46c5796e |
25 |
DIST go-linux-ppc64-bootstrap.tbz 45266082 SHA256 89902cebaf93b95dea225b7304eedcae101d6fb83bba0fcdfee001361b4868c0 SHA512 d013a1a5953207505a9f7e0c5cfdc7f463d4669fd18b36cf1df10126e9d4c012252bc4d207dd4503c34301e76197d8e89a9ed9d9d0b8a3b54b62e782b4c39d7b WHIRLPOOL 3ec868d94e8452a3cdb49a1292f9f32ebeb813ea297e419849cdee28c8d952887feb70e1095ce109ff6b8bb81dee47b7eb6f275b15bb6f46422095c3b260f968 |
26 |
DIST go-linux-ppc64le-bootstrap.tbz 50134685 SHA256 ca816a3e3cbd7721200522fa39843de0bf546d0ac18e0d550e64b7cc33bea4f2 SHA512 da718166febe77b57f2f2edb18c921501a0eb7184a7e6f18411b5cba95fe0de185ef9d5e85be3632c5829e66008912d12b5259ca7fc330ad28026e53bb658e7f WHIRLPOOL 0d7875146f1bdc8f6af089f7f4b003d952419c51be7d519ca3474b39f67dbc88c6caa515f707ad9e6fac345e8a78f42d13eb794485ce18b6d90f7331ee16686c |
27 |
DIST go-solaris-amd64-bootstrap.tbz 48367195 SHA256 92ebdbf001f243a78a6c2d8ee30e929ba2cecbedf8e0fc07e129b04b107453ad SHA512 cf8725db0d001d61badee71624799a3c9e75f61f77ab090c1f6c490d694c4be367019b28d88306045d877ab5a324a1f9b0674293caf3acb19c193fc3746a48f2 WHIRLPOOL 672c6642e340b6d4f38b633f67fdc3202e3725022a8a61e2129276fccd6c42ddc24ed06c1d57eb31a25ea8056b79686619cbb36431b9c23b6d4be5bcb715bd89 |
28 |
-DIST go1.6.1.src.tar.gz 12615799 SHA256 1d4b53cdee51b2298afcf50926a7fa44b286f0bf24ff8323ce690a66daa7193f SHA512 31ea2504f8ab0fd709005275d0c2129b6cdb4e5d34d6e2b435b23480674b135d1bff8de863b1e01201e757523f4dc28b6ebefeb87d7e855f2509a6837e436fab WHIRLPOOL 6589f311fc3893775352a3c5d6409933397215389f2b25d3b61370acde35ead374403dfdd1dd58962b5066acd61c4acd85cf9c556d05b099e7fec6d23d6daca0 |
29 |
-DIST go1.6.2.src.tar.gz 12617724 SHA256 787b0b750d037016a30c6ed05a8a70a91b2e9db4bd9b1a2453aa502a63f1bccc SHA512 e148022f9e18b5d5b05744f1aa9fa3ef82e255752179545711ade077e271216aa5b450859a764fdfb028ae4faa26adad8d0a0a5268b31396ab9d14de3cb2f20a WHIRLPOOL bbd04cc0b18768b9dcf3b1d3614d2a263d2314ca811e03b390bafeafc7ea4d2aa650a34901da75e55ca58bf9c00601d9924152228ed0d57bbc4b5dbdc081e8a9 |
30 |
DIST go1.6.3.src.tar.gz 12617426 SHA256 6326aeed5f86cf18f16d6dc831405614f855e2d416a91fd3fdc334f772345b00 SHA512 43e9b01220788112a185500bd53f091e7a0023a790092f428e2f40fc1a334dd148558b99d2a1c871b8cc79ad7d2d87a092b93eee7b5a27c2ee675c494de35306 WHIRLPOOL 0a22dc08b89ddfaccf1e871037e7ad6cdbf36f914de527011813d57a2d857478278202314b185e26aa905cb135d13cbea490d03337b42148c6fc2ef93a8cd9fe |
31 |
-DIST go1.6.src.tar.gz 12613308 SHA256 a96cce8ce43a9bf9b2a4c7d470bc7ee0cb00410da815980681c8353218dcf146 SHA512 59e9d72a80558fd5e3f176e068897a45333b36e35f6c00393647941a70e741168e65941b6059397378020c3b78ec3471a48809682f7efd97cf33eec6325fc3e8 WHIRLPOOL c6debe1a5039f0ca34c29b4a53f958503a724cae13715ea14f0237b5faacd26e09eb6405462e22abd6806540dd8fb9eb2fa08ff6e8676b0f6dffa267210f5eac |
32 |
|
33 |
diff --git a/dev-lang/go/files/go-1.6.1-gdb-no-shell.patch b/dev-lang/go/files/go-1.6.1-gdb-no-shell.patch |
34 |
deleted file mode 100644 |
35 |
index ccce6f0..0000000 |
36 |
--- a/dev-lang/go/files/go-1.6.1-gdb-no-shell.patch |
37 |
+++ /dev/null |
38 |
@@ -1,12 +0,0 @@ |
39 |
-diff --git a/src/runtime/runtime-gdb_test.go b/src/runtime/runtime-gdb_test.go |
40 |
-index 6ebc69a..648092a 100644 |
41 |
---- a/src/runtime/runtime-gdb_test.go |
42 |
-+++ b/src/runtime/runtime-gdb_test.go |
43 |
-@@ -87,6 +87,7 @@ func TestGdbPython(t *testing.T) { |
44 |
- |
45 |
- args := []string{"-nx", "-q", "--batch", "-iex", |
46 |
- fmt.Sprintf("add-auto-load-safe-path %s/src/runtime", runtime.GOROOT()), |
47 |
-+ "-ex", "set startup-with-shell off", |
48 |
- "-ex", "info auto-load python-scripts", |
49 |
- "-ex", "br main.go:10", |
50 |
- "-ex", "run", |
51 |
|
52 |
diff --git a/dev-lang/go/files/go-1.6.2-gdb-no-shell.patch b/dev-lang/go/files/go-1.6.2-gdb-no-shell.patch |
53 |
deleted file mode 100644 |
54 |
index ccce6f0..0000000 |
55 |
--- a/dev-lang/go/files/go-1.6.2-gdb-no-shell.patch |
56 |
+++ /dev/null |
57 |
@@ -1,12 +0,0 @@ |
58 |
-diff --git a/src/runtime/runtime-gdb_test.go b/src/runtime/runtime-gdb_test.go |
59 |
-index 6ebc69a..648092a 100644 |
60 |
---- a/src/runtime/runtime-gdb_test.go |
61 |
-+++ b/src/runtime/runtime-gdb_test.go |
62 |
-@@ -87,6 +87,7 @@ func TestGdbPython(t *testing.T) { |
63 |
- |
64 |
- args := []string{"-nx", "-q", "--batch", "-iex", |
65 |
- fmt.Sprintf("add-auto-load-safe-path %s/src/runtime", runtime.GOROOT()), |
66 |
-+ "-ex", "set startup-with-shell off", |
67 |
- "-ex", "info auto-load python-scripts", |
68 |
- "-ex", "br main.go:10", |
69 |
- "-ex", "run", |
70 |
|
71 |
diff --git a/dev-lang/go/go-1.6-r2.ebuild b/dev-lang/go/go-1.6-r2.ebuild |
72 |
deleted file mode 100644 |
73 |
index 5689900..0000000 |
74 |
--- a/dev-lang/go/go-1.6-r2.ebuild |
75 |
+++ /dev/null |
76 |
@@ -1,243 +0,0 @@ |
77 |
-# Copyright 1999-2016 Gentoo Foundation |
78 |
-# Distributed under the terms of the GNU General Public License v2 |
79 |
-# $Id$ |
80 |
- |
81 |
-EAPI=6 |
82 |
- |
83 |
-export CBUILD=${CBUILD:-${CHOST}} |
84 |
-export CTARGET=${CTARGET:-${CHOST}} |
85 |
- |
86 |
-MY_PV=${PV/_/} |
87 |
- |
88 |
-inherit toolchain-funcs |
89 |
- |
90 |
-BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist" |
91 |
-SRC_URI=" |
92 |
-kernel_Darwin? ( |
93 |
- x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-bootstrap.tbz ) |
94 |
-) |
95 |
-kernel_FreeBSD? ( |
96 |
-amd64-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-amd64-bootstrap.tbz ) |
97 |
-x86-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-386-bootstrap-1.tbz ) |
98 |
-) |
99 |
-kernel_linux? ( |
100 |
- amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-bootstrap.tbz ) |
101 |
- arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-bootstrap.tbz ) |
102 |
- arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-bootstrap.tbz ) |
103 |
- ppc64? ( ${BOOTSTRAP_DIST}/go-linux-ppc64-bootstrap.tbz ) |
104 |
- x86? ( ${BOOTSTRAP_DIST}/go-linux-386-bootstrap-1.tbz ) |
105 |
-) |
106 |
-kernel_SunOS? ( |
107 |
- x64-solaris? ( ${BOOTSTRAP_DIST}/go-solaris-amd64-bootstrap.tbz ) |
108 |
-) |
109 |
-" |
110 |
- |
111 |
-if [[ ${PV} = 9999 ]]; then |
112 |
- EGIT_REPO_URI="git://github.com/golang/go.git" |
113 |
- inherit git-r3 |
114 |
-else |
115 |
- SRC_URI+="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz" |
116 |
- # go-bootstrap-1.4 only supports go on amd64, arm and x86 architectures. |
117 |
- # Allowing other bootstrap options would enable arm64 and ppc64 builds. |
118 |
- case ${PV} in |
119 |
- *9999*|*_rc*) ;; |
120 |
- *) |
121 |
- KEYWORDS="-* amd64 arm ~arm64 ~ppc64 x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris" |
122 |
- ;; |
123 |
- esac |
124 |
-fi |
125 |
- |
126 |
-DESCRIPTION="A concurrent garbage collected and typesafe programming language" |
127 |
-HOMEPAGE="http://www.golang.org" |
128 |
- |
129 |
-LICENSE="BSD" |
130 |
-SLOT="0/${PV}" |
131 |
-IUSE="" |
132 |
- |
133 |
-DEPEND="" |
134 |
-RDEPEND="!<dev-go/go-tools-0_pre20150902" |
135 |
- |
136 |
-# These test data objects have writable/executable stacks. |
137 |
-QA_EXECSTACK="usr/lib/go/src/debug/elf/testdata/*.obj" |
138 |
- |
139 |
-# Do not complain about CFLAGS, etc, since Go doesn't use them. |
140 |
-QA_FLAGS_IGNORED='.*' |
141 |
- |
142 |
-REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*" |
143 |
- |
144 |
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail. |
145 |
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" |
146 |
- |
147 |
-# The go language uses *.a files which are _NOT_ libraries and should not be |
148 |
-# stripped. The test data objects should also be left alone and unstripped. |
149 |
-STRIP_MASK="/usr/lib/go/pkg/*.a |
150 |
- /usr/lib/go/src/debug/elf/testdata/* |
151 |
- /usr/lib/go/src/debug/dwarf/testdata/* |
152 |
- /usr/lib/go/src/runtime/race/*.syso" |
153 |
- |
154 |
-if [[ ${PV} != 9999 ]]; then |
155 |
- S="${WORKDIR}"/go |
156 |
-fi |
157 |
- |
158 |
-go_arch() |
159 |
-{ |
160 |
- # By chance most portage arch names match Go |
161 |
- local portage_arch=$(tc-arch $@) |
162 |
- case "${portage_arch}" in |
163 |
- x86) echo 386;; |
164 |
- x64-*) echo amd64;; |
165 |
- *) echo "${portage_arch}";; |
166 |
- esac |
167 |
-} |
168 |
- |
169 |
-go_arm() |
170 |
-{ |
171 |
- case "${1:-${CHOST}}" in |
172 |
- armv5*) echo 5;; |
173 |
- armv6*) echo 6;; |
174 |
- armv7*) echo 7;; |
175 |
- *) |
176 |
- die "unknown GOARM for ${1:-${CHOST}}" |
177 |
- ;; |
178 |
- esac |
179 |
-} |
180 |
- |
181 |
-go_os() |
182 |
-{ |
183 |
- case "${1:-${CHOST}}" in |
184 |
- *-linux*) echo linux;; |
185 |
- *-darwin*) echo darwin;; |
186 |
- *-freebsd*) echo freebsd;; |
187 |
- *-netbsd*) echo netbsd;; |
188 |
- *-openbsd*) echo openbsd;; |
189 |
- *-solaris*) echo solaris;; |
190 |
- *-cygwin*|*-interix*|*-winnt*) |
191 |
- echo windows |
192 |
- ;; |
193 |
- *) |
194 |
- die "unknown GOOS for ${1:-${CHOST}}" |
195 |
- ;; |
196 |
- esac |
197 |
-} |
198 |
- |
199 |
-go_tuple() |
200 |
-{ |
201 |
- echo "$(go_os $@)_$(go_arch $@)" |
202 |
-} |
203 |
- |
204 |
-go_cross_compile() |
205 |
-{ |
206 |
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] |
207 |
-} |
208 |
- |
209 |
-pkg_pretend() |
210 |
-{ |
211 |
- # make.bash does not understand cross-compiling a cross-compiler |
212 |
- if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then |
213 |
- die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}" |
214 |
- fi |
215 |
-} |
216 |
- |
217 |
-src_unpack() |
218 |
-{ |
219 |
- if [[ ${PV} = 9999 ]]; then |
220 |
- git-r3_src_unpack |
221 |
- fi |
222 |
- default |
223 |
-} |
224 |
- |
225 |
-src_compile() |
226 |
-{ |
227 |
- export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os)-$(go_arch)-bootstrap |
228 |
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go |
229 |
- export GOROOT="$(pwd)" |
230 |
- export GOBIN="${GOROOT}/bin" |
231 |
- |
232 |
- # Go's build script does not use BUILD/HOST/TARGET consistently. :( |
233 |
- export GOHOSTARCH=$(go_arch ${CBUILD}) |
234 |
- export GOHOSTOS=$(go_os ${CBUILD}) |
235 |
- export CC=$(tc-getBUILD_CC) |
236 |
- |
237 |
- export GOARCH=$(go_arch) |
238 |
- export GOOS=$(go_os) |
239 |
- export CC_FOR_TARGET=$(tc-getCC) |
240 |
- export CXX_FOR_TARGET=$(tc-getCXX) |
241 |
- if [[ ${ARCH} == arm ]]; then |
242 |
- export GOARM=$(go_arm) |
243 |
- fi |
244 |
- |
245 |
- cd src |
246 |
- ./make.bash || die "build failed" |
247 |
-} |
248 |
- |
249 |
-src_test() |
250 |
-{ |
251 |
- go_cross_compile && return 0 |
252 |
- |
253 |
- cd src |
254 |
- PATH="${GOBIN}:${PATH}" \ |
255 |
- ./run.bash -no-rebuild || die "tests failed" |
256 |
-} |
257 |
- |
258 |
-src_install() |
259 |
-{ |
260 |
- local bin_path f x |
261 |
- |
262 |
- dodir /usr/lib/go |
263 |
- insinto /usr/lib/go |
264 |
- |
265 |
- # There is a known issue which requires the source tree to be installed [1]. |
266 |
- # Once this is fixed, we can consider using the doc use flag to control |
267 |
- # installing the doc and src directories. |
268 |
- # [1] https://golang.org/issue/2775 |
269 |
- doins -r bin doc lib pkg src |
270 |
- fperms -R +x /usr/lib/go/bin /usr/lib/go/pkg/tool |
271 |
- |
272 |
- cp -a misc "${D}"/usr/lib/go/misc |
273 |
- |
274 |
- if go_cross_compile; then |
275 |
- bin_path="bin/$(go_tuple)" |
276 |
- else |
277 |
- bin_path=bin |
278 |
- fi |
279 |
- for x in ${bin_path}/*; do |
280 |
- f=${x##*/} |
281 |
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} |
282 |
- done |
283 |
- dodoc AUTHORS CONTRIBUTORS PATENTS README.md |
284 |
-} |
285 |
- |
286 |
-pkg_preinst() |
287 |
-{ |
288 |
- has_version '<dev-lang/go-1.4' && |
289 |
- export had_support_files=true || |
290 |
- export had_support_files=false |
291 |
-} |
292 |
- |
293 |
-pkg_postinst() |
294 |
-{ |
295 |
- # If the go tool sees a package file timestamped older than a dependancy it |
296 |
- # will rebuild that file. So, in order to stop go from rebuilding lots of |
297 |
- # packages for every build we need to fix the timestamps. The compiler and |
298 |
- # linker are also checked - so we need to fix them too. |
299 |
- ebegin "fixing timestamps to avoid unnecessary rebuilds" |
300 |
- tref="usr/lib/go/pkg/*/runtime.a" |
301 |
- find "${EROOT}"usr/lib/go -type f \ |
302 |
- -exec touch -r "${EROOT}"${tref} {} \; |
303 |
- eend $? |
304 |
- |
305 |
- if [[ ${PV} != 9999 && -n ${REPLACING_VERSIONS} && |
306 |
- ${REPLACING_VERSIONS} != ${PV} ]]; then |
307 |
- elog "Release notes are located at http://golang.org/doc/go${PV}" |
308 |
- fi |
309 |
- |
310 |
- if $had_support_files; then |
311 |
- ewarn |
312 |
- ewarn "All editor support, IDE support, shell completion" |
313 |
- ewarn "support, etc has been removed from the go package" |
314 |
- ewarn "upstream." |
315 |
- ewarn "For more information on which support is available, see" |
316 |
- ewarn "the following URL:" |
317 |
- ewarn "https://github.com/golang/go/wiki/IDEsAndTextEditorPlugins" |
318 |
- fi |
319 |
-} |
320 |
|
321 |
diff --git a/dev-lang/go/go-1.6.1.ebuild b/dev-lang/go/go-1.6.1.ebuild |
322 |
deleted file mode 100644 |
323 |
index 4fce12b..0000000 |
324 |
--- a/dev-lang/go/go-1.6.1.ebuild |
325 |
+++ /dev/null |
326 |
@@ -1,257 +0,0 @@ |
327 |
-# Copyright 1999-2016 Gentoo Foundation |
328 |
-# Distributed under the terms of the GNU General Public License v2 |
329 |
-# $Id$ |
330 |
- |
331 |
-EAPI=6 |
332 |
- |
333 |
-export CBUILD=${CBUILD:-${CHOST}} |
334 |
-export CTARGET=${CTARGET:-${CHOST}} |
335 |
- |
336 |
-MY_PV=${PV/_/} |
337 |
- |
338 |
-inherit toolchain-funcs |
339 |
- |
340 |
-BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist" |
341 |
-SRC_URI="!gccgo? ( |
342 |
-kernel_Darwin? ( |
343 |
- x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-bootstrap.tbz ) |
344 |
-) |
345 |
-kernel_FreeBSD? ( |
346 |
-amd64-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-amd64-bootstrap.tbz ) |
347 |
-x86-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-386-bootstrap-1.tbz ) |
348 |
-) |
349 |
-kernel_linux? ( |
350 |
- amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-bootstrap.tbz ) |
351 |
- arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-bootstrap.tbz ) |
352 |
- arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-bootstrap.tbz ) |
353 |
- ppc64? ( ${BOOTSTRAP_DIST}/go-linux-ppc64-bootstrap.tbz ) |
354 |
- x86? ( ${BOOTSTRAP_DIST}/go-linux-386-bootstrap-1.tbz ) |
355 |
-) |
356 |
-kernel_SunOS? ( |
357 |
- x64-solaris? ( ${BOOTSTRAP_DIST}/go-solaris-amd64-bootstrap.tbz ) |
358 |
-) |
359 |
-) |
360 |
-" |
361 |
- |
362 |
-if [[ ${PV} = 9999 ]]; then |
363 |
- EGIT_REPO_URI="git://github.com/golang/go.git" |
364 |
- inherit git-r3 |
365 |
-else |
366 |
- SRC_URI+="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz" |
367 |
- # go-bootstrap-1.4 only supports go on amd64, arm and x86 architectures. |
368 |
- # Allowing other bootstrap options would enable arm64 and ppc64 builds. |
369 |
- case ${PV} in |
370 |
- *9999*|*_rc*) ;; |
371 |
- *) |
372 |
- KEYWORDS="-* amd64 ~arm ~arm64 ~ppc64 x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris" |
373 |
- ;; |
374 |
- esac |
375 |
-fi |
376 |
- |
377 |
-DESCRIPTION="A concurrent garbage collected and typesafe programming language" |
378 |
-HOMEPAGE="http://www.golang.org" |
379 |
- |
380 |
-LICENSE="BSD" |
381 |
-SLOT="0/${PV}" |
382 |
-IUSE="gccgo" |
383 |
- |
384 |
-DEPEND="gccgo? ( >=sys-devel/gcc-5[go] )" |
385 |
-RDEPEND="!<dev-go/go-tools-0_pre20150902" |
386 |
- |
387 |
-# These test data objects have writable/executable stacks. |
388 |
-QA_EXECSTACK="usr/lib/go/src/debug/elf/testdata/*.obj" |
389 |
- |
390 |
-# Do not complain about CFLAGS, etc, since Go doesn't use them. |
391 |
-QA_FLAGS_IGNORED='.*' |
392 |
- |
393 |
-REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*" |
394 |
- |
395 |
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail. |
396 |
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" |
397 |
- |
398 |
-# The go language uses *.a files which are _NOT_ libraries and should not be |
399 |
-# stripped. The test data objects should also be left alone and unstripped. |
400 |
-STRIP_MASK="/usr/lib/go/pkg/*.a |
401 |
- /usr/lib/go/src/debug/elf/testdata/* |
402 |
- /usr/lib/go/src/debug/dwarf/testdata/* |
403 |
- /usr/lib/go/src/runtime/race/*.syso" |
404 |
- |
405 |
-if [[ ${PV} != 9999 ]]; then |
406 |
- S="${WORKDIR}"/go |
407 |
-fi |
408 |
- |
409 |
-PATCHES=( |
410 |
-# patch for #581072 |
411 |
- "${FILESDIR}"/${P}-gdb-no-shell.patch |
412 |
-) |
413 |
- |
414 |
-go_arch() |
415 |
-{ |
416 |
- # By chance most portage arch names match Go |
417 |
- local portage_arch=$(tc-arch $@) |
418 |
- case "${portage_arch}" in |
419 |
- x86) echo 386;; |
420 |
- x64-*) echo amd64;; |
421 |
- *) echo "${portage_arch}";; |
422 |
- esac |
423 |
-} |
424 |
- |
425 |
-go_arm() |
426 |
-{ |
427 |
- case "${1:-${CHOST}}" in |
428 |
- armv5*) echo 5;; |
429 |
- armv6*) echo 6;; |
430 |
- armv7*) echo 7;; |
431 |
- *) |
432 |
- die "unknown GOARM for ${1:-${CHOST}}" |
433 |
- ;; |
434 |
- esac |
435 |
-} |
436 |
- |
437 |
-go_os() |
438 |
-{ |
439 |
- case "${1:-${CHOST}}" in |
440 |
- *-linux*) echo linux;; |
441 |
- *-darwin*) echo darwin;; |
442 |
- *-freebsd*) echo freebsd;; |
443 |
- *-netbsd*) echo netbsd;; |
444 |
- *-openbsd*) echo openbsd;; |
445 |
- *-solaris*) echo solaris;; |
446 |
- *-cygwin*|*-interix*|*-winnt*) |
447 |
- echo windows |
448 |
- ;; |
449 |
- *) |
450 |
- die "unknown GOOS for ${1:-${CHOST}}" |
451 |
- ;; |
452 |
- esac |
453 |
-} |
454 |
- |
455 |
-go_tuple() |
456 |
-{ |
457 |
- echo "$(go_os $@)_$(go_arch $@)" |
458 |
-} |
459 |
- |
460 |
-go_cross_compile() |
461 |
-{ |
462 |
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] |
463 |
-} |
464 |
- |
465 |
-pkg_pretend() |
466 |
-{ |
467 |
- # make.bash does not understand cross-compiling a cross-compiler |
468 |
- if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then |
469 |
- die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}" |
470 |
- fi |
471 |
-} |
472 |
- |
473 |
-src_unpack() |
474 |
-{ |
475 |
- if [[ ${PV} = 9999 ]]; then |
476 |
- git-r3_src_unpack |
477 |
- fi |
478 |
- default |
479 |
-} |
480 |
- |
481 |
-src_compile() |
482 |
-{ |
483 |
- export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os)-$(go_arch)-bootstrap |
484 |
- if use gccgo; then |
485 |
- mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die |
486 |
- local go_binary=$(gcc-config --get-bin-path)/go-5 |
487 |
- [[ -x ${go_binary} ]] || go_binary=$( |
488 |
- find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-5 | sort -V | tail -n1) |
489 |
- [[ -x ${go_binary} ]] || die "go-5: command not found" |
490 |
- ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die |
491 |
- fi |
492 |
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go |
493 |
- export GOROOT="$(pwd)" |
494 |
- export GOBIN="${GOROOT}/bin" |
495 |
- |
496 |
- # Go's build script does not use BUILD/HOST/TARGET consistently. :( |
497 |
- export GOHOSTARCH=$(go_arch ${CBUILD}) |
498 |
- export GOHOSTOS=$(go_os ${CBUILD}) |
499 |
- export CC=$(tc-getBUILD_CC) |
500 |
- |
501 |
- export GOARCH=$(go_arch) |
502 |
- export GOOS=$(go_os) |
503 |
- export CC_FOR_TARGET=$(tc-getCC) |
504 |
- export CXX_FOR_TARGET=$(tc-getCXX) |
505 |
- if [[ ${ARCH} == arm ]]; then |
506 |
- export GOARM=$(go_arm) |
507 |
- fi |
508 |
- |
509 |
- cd src |
510 |
- ./make.bash || die "build failed" |
511 |
-} |
512 |
- |
513 |
-src_test() |
514 |
-{ |
515 |
- go_cross_compile && return 0 |
516 |
- |
517 |
- cd src |
518 |
- PATH="${GOBIN}:${PATH}" \ |
519 |
- ./run.bash -no-rebuild || die "tests failed" |
520 |
-} |
521 |
- |
522 |
-src_install() |
523 |
-{ |
524 |
- local bin_path f x |
525 |
- |
526 |
- dodir /usr/lib/go |
527 |
- insinto /usr/lib/go |
528 |
- |
529 |
- # There is a known issue which requires the source tree to be installed [1]. |
530 |
- # Once this is fixed, we can consider using the doc use flag to control |
531 |
- # installing the doc and src directories. |
532 |
- # [1] https://golang.org/issue/2775 |
533 |
- doins -r bin doc lib pkg src |
534 |
- fperms -R +x /usr/lib/go/bin /usr/lib/go/pkg/tool |
535 |
- |
536 |
- cp -a misc "${D}"/usr/lib/go/misc |
537 |
- |
538 |
- if go_cross_compile; then |
539 |
- bin_path="bin/$(go_tuple)" |
540 |
- else |
541 |
- bin_path=bin |
542 |
- fi |
543 |
- for x in ${bin_path}/*; do |
544 |
- f=${x##*/} |
545 |
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} |
546 |
- done |
547 |
- dodoc AUTHORS CONTRIBUTORS PATENTS README.md |
548 |
-} |
549 |
- |
550 |
-pkg_preinst() |
551 |
-{ |
552 |
- has_version '<dev-lang/go-1.4' && |
553 |
- export had_support_files=true || |
554 |
- export had_support_files=false |
555 |
-} |
556 |
- |
557 |
-pkg_postinst() |
558 |
-{ |
559 |
- # If the go tool sees a package file timestamped older than a dependancy it |
560 |
- # will rebuild that file. So, in order to stop go from rebuilding lots of |
561 |
- # packages for every build we need to fix the timestamps. The compiler and |
562 |
- # linker are also checked - so we need to fix them too. |
563 |
- ebegin "fixing timestamps to avoid unnecessary rebuilds" |
564 |
- tref="usr/lib/go/pkg/*/runtime.a" |
565 |
- find "${EROOT}"usr/lib/go -type f \ |
566 |
- -exec touch -r "${EROOT}"${tref} {} \; |
567 |
- eend $? |
568 |
- |
569 |
- if [[ ${PV} != 9999 && -n ${REPLACING_VERSIONS} && |
570 |
- ${REPLACING_VERSIONS} != ${PV} ]]; then |
571 |
- elog "Release notes are located at http://golang.org/doc/go${PV}" |
572 |
- fi |
573 |
- |
574 |
- if $had_support_files; then |
575 |
- ewarn |
576 |
- ewarn "All editor support, IDE support, shell completion" |
577 |
- ewarn "support, etc has been removed from the go package" |
578 |
- ewarn "upstream." |
579 |
- ewarn "For more information on which support is available, see" |
580 |
- ewarn "the following URL:" |
581 |
- ewarn "https://github.com/golang/go/wiki/IDEsAndTextEditorPlugins" |
582 |
- fi |
583 |
-} |
584 |
|
585 |
diff --git a/dev-lang/go/go-1.6.2.ebuild b/dev-lang/go/go-1.6.2.ebuild |
586 |
deleted file mode 100644 |
587 |
index ddf85db..0000000 |
588 |
--- a/dev-lang/go/go-1.6.2.ebuild |
589 |
+++ /dev/null |
590 |
@@ -1,260 +0,0 @@ |
591 |
-# Copyright 1999-2016 Gentoo Foundation |
592 |
-# Distributed under the terms of the GNU General Public License v2 |
593 |
-# $Id$ |
594 |
- |
595 |
-EAPI=6 |
596 |
- |
597 |
-export CBUILD=${CBUILD:-${CHOST}} |
598 |
-export CTARGET=${CTARGET:-${CHOST}} |
599 |
- |
600 |
-MY_PV=${PV/_/} |
601 |
- |
602 |
-inherit toolchain-funcs |
603 |
- |
604 |
-BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist" |
605 |
-SRC_URI="!gccgo? ( |
606 |
-kernel_Darwin? ( |
607 |
- x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-bootstrap.tbz ) |
608 |
-) |
609 |
-kernel_FreeBSD? ( |
610 |
-amd64-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-amd64-bootstrap.tbz ) |
611 |
-x86-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-386-bootstrap-1.tbz ) |
612 |
-) |
613 |
-kernel_linux? ( |
614 |
- amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-bootstrap.tbz ) |
615 |
- arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-bootstrap.tbz ) |
616 |
- arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-bootstrap.tbz ) |
617 |
- ppc64? ( |
618 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64-bootstrap.tbz |
619 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64le-bootstrap.tbz |
620 |
- ) |
621 |
- x86? ( ${BOOTSTRAP_DIST}/go-linux-386-bootstrap-1.tbz ) |
622 |
-) |
623 |
-kernel_SunOS? ( |
624 |
- x64-solaris? ( ${BOOTSTRAP_DIST}/go-solaris-amd64-bootstrap.tbz ) |
625 |
-) |
626 |
-) |
627 |
-" |
628 |
- |
629 |
-if [[ ${PV} = 9999 ]]; then |
630 |
- EGIT_REPO_URI="git://github.com/golang/go.git" |
631 |
- inherit git-r3 |
632 |
-else |
633 |
- SRC_URI+="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz" |
634 |
- case ${PV} in |
635 |
- *9999*|*_rc*) ;; |
636 |
- *) |
637 |
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris" |
638 |
- ;; |
639 |
- esac |
640 |
-fi |
641 |
- |
642 |
-DESCRIPTION="A concurrent garbage collected and typesafe programming language" |
643 |
-HOMEPAGE="http://www.golang.org" |
644 |
- |
645 |
-LICENSE="BSD" |
646 |
-SLOT="0/${PV}" |
647 |
-IUSE="gccgo" |
648 |
- |
649 |
-DEPEND="gccgo? ( >=sys-devel/gcc-5[go] )" |
650 |
-RDEPEND="!<dev-go/go-tools-0_pre20150902" |
651 |
- |
652 |
-# These test data objects have writable/executable stacks. |
653 |
-QA_EXECSTACK="usr/lib/go/src/debug/elf/testdata/*.obj" |
654 |
- |
655 |
-# Do not complain about CFLAGS, etc, since Go doesn't use them. |
656 |
-QA_FLAGS_IGNORED='.*' |
657 |
- |
658 |
-REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*" |
659 |
- |
660 |
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail. |
661 |
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" |
662 |
- |
663 |
-# The go language uses *.a files which are _NOT_ libraries and should not be |
664 |
-# stripped. The test data objects should also be left alone and unstripped. |
665 |
-STRIP_MASK="/usr/lib/go/pkg/*.a |
666 |
- /usr/lib/go/src/debug/elf/testdata/* |
667 |
- /usr/lib/go/src/debug/dwarf/testdata/* |
668 |
- /usr/lib/go/src/runtime/race/*.syso" |
669 |
- |
670 |
-if [[ ${PV} != 9999 ]]; then |
671 |
- S="${WORKDIR}"/go |
672 |
-fi |
673 |
- |
674 |
-PATCHES=( |
675 |
-# patch for #581072 |
676 |
- "${FILESDIR}"/${P}-gdb-no-shell.patch |
677 |
-) |
678 |
- |
679 |
-go_arch() |
680 |
-{ |
681 |
- # By chance most portage arch names match Go |
682 |
- local portage_arch=$(tc-arch $@) |
683 |
- case "${portage_arch}" in |
684 |
- x86) echo 386;; |
685 |
- x64-*) echo amd64;; |
686 |
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;; |
687 |
- *) echo "${portage_arch}";; |
688 |
- esac |
689 |
-} |
690 |
- |
691 |
-go_arm() |
692 |
-{ |
693 |
- case "${1:-${CHOST}}" in |
694 |
- armv5*) echo 5;; |
695 |
- armv6*) echo 6;; |
696 |
- armv7*) echo 7;; |
697 |
- *) |
698 |
- die "unknown GOARM for ${1:-${CHOST}}" |
699 |
- ;; |
700 |
- esac |
701 |
-} |
702 |
- |
703 |
-go_os() |
704 |
-{ |
705 |
- case "${1:-${CHOST}}" in |
706 |
- *-linux*) echo linux;; |
707 |
- *-darwin*) echo darwin;; |
708 |
- *-freebsd*) echo freebsd;; |
709 |
- *-netbsd*) echo netbsd;; |
710 |
- *-openbsd*) echo openbsd;; |
711 |
- *-solaris*) echo solaris;; |
712 |
- *-cygwin*|*-interix*|*-winnt*) |
713 |
- echo windows |
714 |
- ;; |
715 |
- *) |
716 |
- die "unknown GOOS for ${1:-${CHOST}}" |
717 |
- ;; |
718 |
- esac |
719 |
-} |
720 |
- |
721 |
-go_tuple() |
722 |
-{ |
723 |
- echo "$(go_os $@)_$(go_arch $@)" |
724 |
-} |
725 |
- |
726 |
-go_cross_compile() |
727 |
-{ |
728 |
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] |
729 |
-} |
730 |
- |
731 |
-pkg_pretend() |
732 |
-{ |
733 |
- # make.bash does not understand cross-compiling a cross-compiler |
734 |
- if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then |
735 |
- die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}" |
736 |
- fi |
737 |
-} |
738 |
- |
739 |
-src_unpack() |
740 |
-{ |
741 |
- if [[ ${PV} = 9999 ]]; then |
742 |
- git-r3_src_unpack |
743 |
- fi |
744 |
- default |
745 |
-} |
746 |
- |
747 |
-src_compile() |
748 |
-{ |
749 |
- export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os)-$(go_arch)-bootstrap |
750 |
- if use gccgo; then |
751 |
- mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die |
752 |
- local go_binary=$(gcc-config --get-bin-path)/go-5 |
753 |
- [[ -x ${go_binary} ]] || go_binary=$( |
754 |
- find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-5 | sort -V | tail -n1) |
755 |
- [[ -x ${go_binary} ]] || die "go-5: command not found" |
756 |
- ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die |
757 |
- fi |
758 |
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go |
759 |
- export GOROOT="$(pwd)" |
760 |
- export GOBIN="${GOROOT}/bin" |
761 |
- |
762 |
- # Go's build script does not use BUILD/HOST/TARGET consistently. :( |
763 |
- export GOHOSTARCH=$(go_arch ${CBUILD}) |
764 |
- export GOHOSTOS=$(go_os ${CBUILD}) |
765 |
- export CC=$(tc-getBUILD_CC) |
766 |
- |
767 |
- export GOARCH=$(go_arch) |
768 |
- export GOOS=$(go_os) |
769 |
- export CC_FOR_TARGET=$(tc-getCC) |
770 |
- export CXX_FOR_TARGET=$(tc-getCXX) |
771 |
- if [[ ${ARCH} == arm ]]; then |
772 |
- export GOARM=$(go_arm) |
773 |
- fi |
774 |
- elog "GOROOT_BOOTSTRAP is ${GOROOT_BOOTSTRAP}" |
775 |
- |
776 |
- cd src |
777 |
- ./make.bash || die "build failed" |
778 |
-} |
779 |
- |
780 |
-src_test() |
781 |
-{ |
782 |
- go_cross_compile && return 0 |
783 |
- |
784 |
- cd src |
785 |
- PATH="${GOBIN}:${PATH}" \ |
786 |
- ./run.bash -no-rebuild || die "tests failed" |
787 |
-} |
788 |
- |
789 |
-src_install() |
790 |
-{ |
791 |
- local bin_path f x |
792 |
- |
793 |
- dodir /usr/lib/go |
794 |
- insinto /usr/lib/go |
795 |
- |
796 |
- # There is a known issue which requires the source tree to be installed [1]. |
797 |
- # Once this is fixed, we can consider using the doc use flag to control |
798 |
- # installing the doc and src directories. |
799 |
- # [1] https://golang.org/issue/2775 |
800 |
- doins -r bin doc lib pkg src |
801 |
- fperms -R +x /usr/lib/go/bin /usr/lib/go/pkg/tool |
802 |
- |
803 |
- cp -a misc "${D}"/usr/lib/go/misc |
804 |
- |
805 |
- if go_cross_compile; then |
806 |
- bin_path="bin/$(go_tuple)" |
807 |
- else |
808 |
- bin_path=bin |
809 |
- fi |
810 |
- for x in ${bin_path}/*; do |
811 |
- f=${x##*/} |
812 |
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} |
813 |
- done |
814 |
- dodoc AUTHORS CONTRIBUTORS PATENTS README.md |
815 |
-} |
816 |
- |
817 |
-pkg_preinst() |
818 |
-{ |
819 |
- has_version '<dev-lang/go-1.4' && |
820 |
- export had_support_files=true || |
821 |
- export had_support_files=false |
822 |
-} |
823 |
- |
824 |
-pkg_postinst() |
825 |
-{ |
826 |
- # If the go tool sees a package file timestamped older than a dependancy it |
827 |
- # will rebuild that file. So, in order to stop go from rebuilding lots of |
828 |
- # packages for every build we need to fix the timestamps. The compiler and |
829 |
- # linker are also checked - so we need to fix them too. |
830 |
- ebegin "fixing timestamps to avoid unnecessary rebuilds" |
831 |
- tref="usr/lib/go/pkg/*/runtime.a" |
832 |
- find "${EROOT}"usr/lib/go -type f \ |
833 |
- -exec touch -r "${EROOT}"${tref} {} \; |
834 |
- eend $? |
835 |
- |
836 |
- if [[ ${PV} != 9999 && -n ${REPLACING_VERSIONS} && |
837 |
- ${REPLACING_VERSIONS} != ${PV} ]]; then |
838 |
- elog "Release notes are located at http://golang.org/doc/go${PV}" |
839 |
- fi |
840 |
- |
841 |
- if $had_support_files; then |
842 |
- ewarn |
843 |
- ewarn "All editor support, IDE support, shell completion" |
844 |
- ewarn "support, etc has been removed from the go package" |
845 |
- ewarn "upstream." |
846 |
- ewarn "For more information on which support is available, see" |
847 |
- ewarn "the following URL:" |
848 |
- ewarn "https://github.com/golang/go/wiki/IDEsAndTextEditorPlugins" |
849 |
- fi |
850 |
-} |