1 |
commit: c2185fdec77fa478042cb6a3d4a257074d614ed3 |
2 |
Author: William Hubbs <william.hubbs <AT> sony <DOT> com> |
3 |
AuthorDate: Thu Jan 23 17:30:43 2020 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 23 17:30:43 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2185fde |
7 |
|
8 |
dev-lang/go: remove old 1.13 versions |
9 |
|
10 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
11 |
|
12 |
dev-lang/go/go-1.13.4.ebuild | 246 ------------------------------------------- |
13 |
dev-lang/go/go-1.13.5.ebuild | 246 ------------------------------------------- |
14 |
2 files changed, 492 deletions(-) |
15 |
|
16 |
diff --git a/dev-lang/go/go-1.13.4.ebuild b/dev-lang/go/go-1.13.4.ebuild |
17 |
deleted file mode 100644 |
18 |
index 5e3547cfead..00000000000 |
19 |
--- a/dev-lang/go/go-1.13.4.ebuild |
20 |
+++ /dev/null |
21 |
@@ -1,246 +0,0 @@ |
22 |
-# Copyright 1999-2019 Gentoo Authors |
23 |
-# Distributed under the terms of the GNU General Public License v2 |
24 |
- |
25 |
-EAPI=7 |
26 |
- |
27 |
-export CBUILD=${CBUILD:-${CHOST}} |
28 |
-export CTARGET=${CTARGET:-${CHOST}} |
29 |
- |
30 |
-MY_PV=${PV/_/} |
31 |
- |
32 |
-inherit toolchain-funcs |
33 |
- |
34 |
-BOOTSTRAP_VERSION="bootstrap-1.8" |
35 |
-BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist" |
36 |
-BOOTSTRAP_URI=" |
37 |
- ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz |
38 |
- ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz |
39 |
- ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz |
40 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz |
41 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz |
42 |
- ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz |
43 |
- ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz |
44 |
- ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz |
45 |
- ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz |
46 |
- ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz |
47 |
- ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz |
48 |
-" |
49 |
- |
50 |
-case ${PV} in |
51 |
-*9999*) |
52 |
- EGIT_REPO_URI="https://github.com/golang/go.git" |
53 |
- inherit git-r3 |
54 |
- ;; |
55 |
-*) |
56 |
- SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " |
57 |
- S="${WORKDIR}"/go |
58 |
- case ${PV} in |
59 |
- *_beta*|*_rc*) ;; |
60 |
- *) |
61 |
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" |
62 |
- # The upstream tests fail under portage but pass if the build is |
63 |
- # run according to their documentation [1]. |
64 |
- # I am restricting the tests on released versions until this is |
65 |
- # solved. |
66 |
- # [1] https://golang.org/issues/18442 |
67 |
- RESTRICT="test" |
68 |
- ;; |
69 |
- esac |
70 |
-esac |
71 |
- |
72 |
-# If gccgo or a previously installed version of dev-lang/go is not being |
73 |
-# used to build Go, there is no way to know the architecture or operating system |
74 |
-# of the build machine, so we need to download all of our bootstrap |
75 |
-# archives to allow this ebuild to work under crossdev. |
76 |
-# |
77 |
-# https://bugs.gentoo.org/671394 |
78 |
-SRC_URI+="!gccgo? ( !system-bootstrap? ( ${BOOTSTRAP_URI} ) )" |
79 |
- |
80 |
-DESCRIPTION="A concurrent garbage collected and typesafe programming language" |
81 |
-HOMEPAGE="https://golang.org" |
82 |
- |
83 |
-LICENSE="BSD" |
84 |
-SLOT="0/${PV}" |
85 |
-IUSE="gccgo system-bootstrap" |
86 |
- |
87 |
-BDEPEND="gccgo? ( >=sys-devel/gcc-5[go] )" |
88 |
-RDEPEND="!<dev-go/go-tools-0_pre20150902" |
89 |
- |
90 |
-# These test data objects have writable/executable stacks. |
91 |
-QA_EXECSTACK=" |
92 |
- usr/lib/go/src/debug/elf/testdata/*.obj |
93 |
- usr/lib/go/src/*.gox |
94 |
- " |
95 |
- |
96 |
-# Do not complain about CFLAGS, etc, since Go doesn't use them. |
97 |
-QA_FLAGS_IGNORED='.*' |
98 |
- |
99 |
-REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*" |
100 |
- |
101 |
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail. |
102 |
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" |
103 |
- |
104 |
-# Do not strip this package. Stripping is unsupported upstream and may |
105 |
-# fail. |
106 |
-RESTRICT+=" strip" |
107 |
- |
108 |
-DOCS=( |
109 |
-AUTHORS |
110 |
-CONTRIBUTING.md |
111 |
-CONTRIBUTORS |
112 |
-PATENTS |
113 |
-README.md |
114 |
-) |
115 |
- |
116 |
-go_arch() |
117 |
-{ |
118 |
- # By chance most portage arch names match Go |
119 |
- local portage_arch=$(tc-arch $@) |
120 |
- case "${portage_arch}" in |
121 |
- x86) echo 386;; |
122 |
- x64-*) echo amd64;; |
123 |
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;; |
124 |
- s390) echo s390x ;; |
125 |
- *) echo "${portage_arch}";; |
126 |
- esac |
127 |
-} |
128 |
- |
129 |
-go_arm() |
130 |
-{ |
131 |
- case "${1:-${CHOST}}" in |
132 |
- armv5*) echo 5;; |
133 |
- armv6*) echo 6;; |
134 |
- armv7*) echo 7;; |
135 |
- *) |
136 |
- die "unknown GOARM for ${1:-${CHOST}}" |
137 |
- ;; |
138 |
- esac |
139 |
-} |
140 |
- |
141 |
-go_os() |
142 |
-{ |
143 |
- case "${1:-${CHOST}}" in |
144 |
- *-linux*) echo linux;; |
145 |
- *-darwin*) echo darwin;; |
146 |
- *-freebsd*) echo freebsd;; |
147 |
- *-netbsd*) echo netbsd;; |
148 |
- *-openbsd*) echo openbsd;; |
149 |
- *-solaris*) echo solaris;; |
150 |
- *-cygwin*|*-interix*|*-winnt*) |
151 |
- echo windows |
152 |
- ;; |
153 |
- *) |
154 |
- die "unknown GOOS for ${1:-${CHOST}}" |
155 |
- ;; |
156 |
- esac |
157 |
-} |
158 |
- |
159 |
-go_tuple() |
160 |
-{ |
161 |
- echo "$(go_os $@)_$(go_arch $@)" |
162 |
-} |
163 |
- |
164 |
-go_cross_compile() |
165 |
-{ |
166 |
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] |
167 |
-} |
168 |
- |
169 |
-pkg_pretend() |
170 |
-{ |
171 |
- # make.bash does not understand cross-compiling a cross-compiler |
172 |
- if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then |
173 |
- die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}" |
174 |
- fi |
175 |
- [[ ${MERGE_TYPE} != binary ]] && |
176 |
- use system-bootstrap && ! has_version "dev-lang/go" && |
177 |
- die "dev-lang/go must be installed to use the system-bootstrap use flag" |
178 |
-} |
179 |
- |
180 |
-src_unpack() |
181 |
-{ |
182 |
- if [[ ${PV} = 9999 ]]; then |
183 |
- git-r3_src_unpack |
184 |
- else |
185 |
- unpack "go${MY_PV}.src.tar.gz" |
186 |
- fi |
187 |
- use gccgo || use system-bootstrap || |
188 |
- unpack "go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-${BOOTSTRAP_VERSION}.tbz" |
189 |
-} |
190 |
- |
191 |
-src_compile() |
192 |
-{ |
193 |
- export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-bootstrap |
194 |
- if use gccgo; then |
195 |
- mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die |
196 |
- local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version) |
197 |
- [[ -x ${go_binary} ]] || go_binary=$( |
198 |
- find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) | |
199 |
- sort -V | tail -n1) |
200 |
- [[ -x ${go_binary} ]] || |
201 |
- die "go-$(gcc-major-version): command not found" |
202 |
- ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die |
203 |
- elif use system-bootstrap; then |
204 |
- export GOROOT_BOOTSTRAP="${EPREFIX}"/usr/lib/go |
205 |
- fi |
206 |
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go |
207 |
- export GOROOT="$(pwd)" |
208 |
- export GOBIN="${GOROOT}/bin" |
209 |
- |
210 |
- # Go's build script does not use BUILD/HOST/TARGET consistently. :( |
211 |
- export GOHOSTARCH=$(go_arch ${CBUILD}) |
212 |
- export GOHOSTOS=$(go_os ${CBUILD}) |
213 |
- export CC=$(tc-getBUILD_CC) |
214 |
- |
215 |
- export GOARCH=$(go_arch) |
216 |
- export GOOS=$(go_os) |
217 |
- export CC_FOR_TARGET=$(tc-getCC) |
218 |
- export CXX_FOR_TARGET=$(tc-getCXX) |
219 |
- if [[ ${ARCH} == arm ]]; then |
220 |
- export GOARM=$(go_arm) |
221 |
- fi |
222 |
- |
223 |
- cd src |
224 |
- ./make.bash || die "build failed" |
225 |
-} |
226 |
- |
227 |
-src_test() |
228 |
-{ |
229 |
- go_cross_compile && return 0 |
230 |
- |
231 |
- cd src |
232 |
- PATH="${GOBIN}:${PATH}" \ |
233 |
- ./run.bash -no-rebuild || die "tests failed" |
234 |
-} |
235 |
- |
236 |
-src_install() |
237 |
-{ |
238 |
- local bin_path f x |
239 |
- |
240 |
- dodir /usr/lib/go |
241 |
- |
242 |
- # There is a known issue which requires the source tree to be installed [1]. |
243 |
- # Once this is fixed, we can consider using the doc use flag to control |
244 |
- # installing the doc and src directories. |
245 |
- # [1] https://golang.org/issue/2775 |
246 |
- # |
247 |
- # deliberately use cp to retain permissions |
248 |
- cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go |
249 |
- if go_cross_compile; then |
250 |
- bin_path="bin/$(go_tuple)" |
251 |
- else |
252 |
- bin_path=bin |
253 |
- fi |
254 |
- for x in ${bin_path}/*; do |
255 |
- f=${x##*/} |
256 |
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} |
257 |
- done |
258 |
- einstalldocs |
259 |
- |
260 |
- if [[ ${CHOST} == *-darwin* ]] ; then |
261 |
- # fix install_name for test object (binutils_test) on Darwin, it |
262 |
- # is never used in real circumstances |
263 |
- local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/ |
264 |
- libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64 |
265 |
- install_name_tool -id "${libmac64}" "${D}${libmac64}" |
266 |
- fi |
267 |
-} |
268 |
|
269 |
diff --git a/dev-lang/go/go-1.13.5.ebuild b/dev-lang/go/go-1.13.5.ebuild |
270 |
deleted file mode 100644 |
271 |
index 5e3547cfead..00000000000 |
272 |
--- a/dev-lang/go/go-1.13.5.ebuild |
273 |
+++ /dev/null |
274 |
@@ -1,246 +0,0 @@ |
275 |
-# Copyright 1999-2019 Gentoo Authors |
276 |
-# Distributed under the terms of the GNU General Public License v2 |
277 |
- |
278 |
-EAPI=7 |
279 |
- |
280 |
-export CBUILD=${CBUILD:-${CHOST}} |
281 |
-export CTARGET=${CTARGET:-${CHOST}} |
282 |
- |
283 |
-MY_PV=${PV/_/} |
284 |
- |
285 |
-inherit toolchain-funcs |
286 |
- |
287 |
-BOOTSTRAP_VERSION="bootstrap-1.8" |
288 |
-BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist" |
289 |
-BOOTSTRAP_URI=" |
290 |
- ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz |
291 |
- ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz |
292 |
- ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz |
293 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz |
294 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz |
295 |
- ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz |
296 |
- ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz |
297 |
- ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz |
298 |
- ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz |
299 |
- ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz |
300 |
- ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz |
301 |
-" |
302 |
- |
303 |
-case ${PV} in |
304 |
-*9999*) |
305 |
- EGIT_REPO_URI="https://github.com/golang/go.git" |
306 |
- inherit git-r3 |
307 |
- ;; |
308 |
-*) |
309 |
- SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " |
310 |
- S="${WORKDIR}"/go |
311 |
- case ${PV} in |
312 |
- *_beta*|*_rc*) ;; |
313 |
- *) |
314 |
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" |
315 |
- # The upstream tests fail under portage but pass if the build is |
316 |
- # run according to their documentation [1]. |
317 |
- # I am restricting the tests on released versions until this is |
318 |
- # solved. |
319 |
- # [1] https://golang.org/issues/18442 |
320 |
- RESTRICT="test" |
321 |
- ;; |
322 |
- esac |
323 |
-esac |
324 |
- |
325 |
-# If gccgo or a previously installed version of dev-lang/go is not being |
326 |
-# used to build Go, there is no way to know the architecture or operating system |
327 |
-# of the build machine, so we need to download all of our bootstrap |
328 |
-# archives to allow this ebuild to work under crossdev. |
329 |
-# |
330 |
-# https://bugs.gentoo.org/671394 |
331 |
-SRC_URI+="!gccgo? ( !system-bootstrap? ( ${BOOTSTRAP_URI} ) )" |
332 |
- |
333 |
-DESCRIPTION="A concurrent garbage collected and typesafe programming language" |
334 |
-HOMEPAGE="https://golang.org" |
335 |
- |
336 |
-LICENSE="BSD" |
337 |
-SLOT="0/${PV}" |
338 |
-IUSE="gccgo system-bootstrap" |
339 |
- |
340 |
-BDEPEND="gccgo? ( >=sys-devel/gcc-5[go] )" |
341 |
-RDEPEND="!<dev-go/go-tools-0_pre20150902" |
342 |
- |
343 |
-# These test data objects have writable/executable stacks. |
344 |
-QA_EXECSTACK=" |
345 |
- usr/lib/go/src/debug/elf/testdata/*.obj |
346 |
- usr/lib/go/src/*.gox |
347 |
- " |
348 |
- |
349 |
-# Do not complain about CFLAGS, etc, since Go doesn't use them. |
350 |
-QA_FLAGS_IGNORED='.*' |
351 |
- |
352 |
-REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*" |
353 |
- |
354 |
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail. |
355 |
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" |
356 |
- |
357 |
-# Do not strip this package. Stripping is unsupported upstream and may |
358 |
-# fail. |
359 |
-RESTRICT+=" strip" |
360 |
- |
361 |
-DOCS=( |
362 |
-AUTHORS |
363 |
-CONTRIBUTING.md |
364 |
-CONTRIBUTORS |
365 |
-PATENTS |
366 |
-README.md |
367 |
-) |
368 |
- |
369 |
-go_arch() |
370 |
-{ |
371 |
- # By chance most portage arch names match Go |
372 |
- local portage_arch=$(tc-arch $@) |
373 |
- case "${portage_arch}" in |
374 |
- x86) echo 386;; |
375 |
- x64-*) echo amd64;; |
376 |
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;; |
377 |
- s390) echo s390x ;; |
378 |
- *) echo "${portage_arch}";; |
379 |
- esac |
380 |
-} |
381 |
- |
382 |
-go_arm() |
383 |
-{ |
384 |
- case "${1:-${CHOST}}" in |
385 |
- armv5*) echo 5;; |
386 |
- armv6*) echo 6;; |
387 |
- armv7*) echo 7;; |
388 |
- *) |
389 |
- die "unknown GOARM for ${1:-${CHOST}}" |
390 |
- ;; |
391 |
- esac |
392 |
-} |
393 |
- |
394 |
-go_os() |
395 |
-{ |
396 |
- case "${1:-${CHOST}}" in |
397 |
- *-linux*) echo linux;; |
398 |
- *-darwin*) echo darwin;; |
399 |
- *-freebsd*) echo freebsd;; |
400 |
- *-netbsd*) echo netbsd;; |
401 |
- *-openbsd*) echo openbsd;; |
402 |
- *-solaris*) echo solaris;; |
403 |
- *-cygwin*|*-interix*|*-winnt*) |
404 |
- echo windows |
405 |
- ;; |
406 |
- *) |
407 |
- die "unknown GOOS for ${1:-${CHOST}}" |
408 |
- ;; |
409 |
- esac |
410 |
-} |
411 |
- |
412 |
-go_tuple() |
413 |
-{ |
414 |
- echo "$(go_os $@)_$(go_arch $@)" |
415 |
-} |
416 |
- |
417 |
-go_cross_compile() |
418 |
-{ |
419 |
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] |
420 |
-} |
421 |
- |
422 |
-pkg_pretend() |
423 |
-{ |
424 |
- # make.bash does not understand cross-compiling a cross-compiler |
425 |
- if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then |
426 |
- die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}" |
427 |
- fi |
428 |
- [[ ${MERGE_TYPE} != binary ]] && |
429 |
- use system-bootstrap && ! has_version "dev-lang/go" && |
430 |
- die "dev-lang/go must be installed to use the system-bootstrap use flag" |
431 |
-} |
432 |
- |
433 |
-src_unpack() |
434 |
-{ |
435 |
- if [[ ${PV} = 9999 ]]; then |
436 |
- git-r3_src_unpack |
437 |
- else |
438 |
- unpack "go${MY_PV}.src.tar.gz" |
439 |
- fi |
440 |
- use gccgo || use system-bootstrap || |
441 |
- unpack "go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-${BOOTSTRAP_VERSION}.tbz" |
442 |
-} |
443 |
- |
444 |
-src_compile() |
445 |
-{ |
446 |
- export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-bootstrap |
447 |
- if use gccgo; then |
448 |
- mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die |
449 |
- local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version) |
450 |
- [[ -x ${go_binary} ]] || go_binary=$( |
451 |
- find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) | |
452 |
- sort -V | tail -n1) |
453 |
- [[ -x ${go_binary} ]] || |
454 |
- die "go-$(gcc-major-version): command not found" |
455 |
- ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die |
456 |
- elif use system-bootstrap; then |
457 |
- export GOROOT_BOOTSTRAP="${EPREFIX}"/usr/lib/go |
458 |
- fi |
459 |
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go |
460 |
- export GOROOT="$(pwd)" |
461 |
- export GOBIN="${GOROOT}/bin" |
462 |
- |
463 |
- # Go's build script does not use BUILD/HOST/TARGET consistently. :( |
464 |
- export GOHOSTARCH=$(go_arch ${CBUILD}) |
465 |
- export GOHOSTOS=$(go_os ${CBUILD}) |
466 |
- export CC=$(tc-getBUILD_CC) |
467 |
- |
468 |
- export GOARCH=$(go_arch) |
469 |
- export GOOS=$(go_os) |
470 |
- export CC_FOR_TARGET=$(tc-getCC) |
471 |
- export CXX_FOR_TARGET=$(tc-getCXX) |
472 |
- if [[ ${ARCH} == arm ]]; then |
473 |
- export GOARM=$(go_arm) |
474 |
- fi |
475 |
- |
476 |
- cd src |
477 |
- ./make.bash || die "build failed" |
478 |
-} |
479 |
- |
480 |
-src_test() |
481 |
-{ |
482 |
- go_cross_compile && return 0 |
483 |
- |
484 |
- cd src |
485 |
- PATH="${GOBIN}:${PATH}" \ |
486 |
- ./run.bash -no-rebuild || die "tests failed" |
487 |
-} |
488 |
- |
489 |
-src_install() |
490 |
-{ |
491 |
- local bin_path f x |
492 |
- |
493 |
- dodir /usr/lib/go |
494 |
- |
495 |
- # There is a known issue which requires the source tree to be installed [1]. |
496 |
- # Once this is fixed, we can consider using the doc use flag to control |
497 |
- # installing the doc and src directories. |
498 |
- # [1] https://golang.org/issue/2775 |
499 |
- # |
500 |
- # deliberately use cp to retain permissions |
501 |
- cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go |
502 |
- if go_cross_compile; then |
503 |
- bin_path="bin/$(go_tuple)" |
504 |
- else |
505 |
- bin_path=bin |
506 |
- fi |
507 |
- for x in ${bin_path}/*; do |
508 |
- f=${x##*/} |
509 |
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} |
510 |
- done |
511 |
- einstalldocs |
512 |
- |
513 |
- if [[ ${CHOST} == *-darwin* ]] ; then |
514 |
- # fix install_name for test object (binutils_test) on Darwin, it |
515 |
- # is never used in real circumstances |
516 |
- local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/ |
517 |
- libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64 |
518 |
- install_name_tool -id "${libmac64}" "${D}${libmac64}" |
519 |
- fi |
520 |
-} |