Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/go/
Date: Thu, 30 Jan 2020 21:46:54
Message-Id: 1580420785.16bc3422b20517bc3352b2315fa1dd9f0f27125b.williamh@gentoo
1 commit: 16bc3422b20517bc3352b2315fa1dd9f0f27125b
2 Author: William Hubbs <william.hubbs <AT> sony <DOT> com>
3 AuthorDate: Thu Jan 30 21:43:24 2020 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 30 21:46:25 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16bc3422
7
8 dev-lang/go: 1.13.7 bump
9
10 Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
11
12 dev-lang/go/Manifest | 1 +
13 dev-lang/go/go-1.13.7.ebuild | 197 +++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 198 insertions(+)
15
16 diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
17 index 1d514a293ad..4f447f8c3c7 100644
18 --- a/dev-lang/go/Manifest
19 +++ b/dev-lang/go/Manifest
20 @@ -12,3 +12,4 @@ DIST go-solaris-amd64-bootstrap-1.8.tbz 54926326 BLAKE2B 0a45312f090d81ebf46fe59
21 DIST go1.12.13.src.tar.gz 21980338 BLAKE2B 205bee35a947ccd08f36547530e3de7928f5f3970be89580ddff80f7710dd1dcf4f292c10ec93c27717ce25ce2575f7151129430b80d1fb927872f891166d8db SHA512 a8210ba909c1bb26799625bbf648204dbef5a9f91af323277f76caee489f5912a08e9de686b71fe97d30c7dc171d5f4bcf8a2c2227d02353cfbb7d292c9efc22
22 DIST go1.12.15.src.tar.gz 20726294 BLAKE2B d123fc2328bf9db8f7337108e3d6857c31e10829096d47fb58519861b68bc0e2bdc9f032fc076666124ab418d3f37026107d6a853021fecbf26138bf00963572 SHA512 887e331c73b9d174e4a707a85be389fa0de43c77bc191ef5e0fe326ac7285374404450ca081cb8e92514a973d25d0314ca74eb17c8e53f8386e1798edd9d41aa
23 DIST go1.13.6.src.tar.gz 21631050 BLAKE2B 8923021d5ff785f5422ee204ee81c986fc066a878a347bc73625974f05045689f694f76147c9bf7956dc59d6e3d3a543f0970e0716df8cd4f6556c28fe23808b SHA512 dffb6e06eea0b1541901dfbed8d28e8cc1eac3184dc40a19ed3637737df796a67a2e7170b228e1003d36b14e6f0f13bb8be9d2a702834a9c06228d1821659528
24 +DIST go1.13.7.src.tar.gz 21631267 BLAKE2B 9c3096e7c7658e03be52b76298dd409de292929d95448cb8945fe6f263fda774d9d13e124bb978c91b51a3770c0ca81302098b0e915015cfcac5f26256987796 SHA512 f87dd04befbe32c7ff1eb617a756fcc7d85e4236d4b063bbf6091d8911ef147c070808f7f7db536e7a3b3990f61f6fb4666e665217b0807e7e0703e00c5491fa
25
26 diff --git a/dev-lang/go/go-1.13.7.ebuild b/dev-lang/go/go-1.13.7.ebuild
27 new file mode 100644
28 index 00000000000..f7c4c78376b
29 --- /dev/null
30 +++ b/dev-lang/go/go-1.13.7.ebuild
31 @@ -0,0 +1,197 @@
32 +# Copyright 1999-2020 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +export CBUILD=${CBUILD:-${CHOST}}
38 +export CTARGET=${CTARGET:-${CHOST}}
39 +
40 +MY_PV=${PV/_/}
41 +
42 +inherit toolchain-funcs
43 +
44 +case ${PV} in
45 +*9999*)
46 + EGIT_REPO_URI="https://github.com/golang/go.git"
47 + inherit git-r3
48 + ;;
49 +*)
50 + SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
51 + S="${WORKDIR}"/go
52 + case ${PV} in
53 + *_beta*|*_rc*) ;;
54 + *)
55 + KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
56 + # The upstream tests fail under portage but pass if the build is
57 + # run according to their documentation [1].
58 + # I am restricting the tests on released versions until this is
59 + # solved.
60 + # [1] https://golang.org/issues/18442
61 + RESTRICT="test"
62 + ;;
63 + esac
64 +esac
65 +
66 +DESCRIPTION="A concurrent garbage collected and typesafe programming language"
67 +HOMEPAGE="https://golang.org"
68 +
69 +LICENSE="BSD"
70 +SLOT="0/${PV}"
71 +
72 +BDEPEND="|| (
73 + dev-lang/go
74 + dev-lang/go-bootstrap )"
75 +RDEPEND="!<dev-go/go-tools-0_pre20150902"
76 +
77 +# These test data objects have writable/executable stacks.
78 +QA_EXECSTACK="
79 + usr/lib/go/src/debug/elf/testdata/*.obj
80 + usr/lib/go/src/*.gox
81 + "
82 +
83 +# Do not complain about CFLAGS, etc, since Go doesn't use them.
84 +QA_FLAGS_IGNORED='.*'
85 +
86 +REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*"
87 +
88 +# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
89 +QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
90 +
91 +# Do not strip this package. Stripping is unsupported upstream and may
92 +# fail.
93 +RESTRICT+=" strip"
94 +
95 +DOCS=(
96 +AUTHORS
97 +CONTRIBUTING.md
98 +CONTRIBUTORS
99 +PATENTS
100 +README.md
101 +)
102 +
103 +go_arch()
104 +{
105 + # By chance most portage arch names match Go
106 + local portage_arch=$(tc-arch $@)
107 + case "${portage_arch}" in
108 + x86) echo 386;;
109 + x64-*) echo amd64;;
110 + ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
111 + s390) echo s390x ;;
112 + *) echo "${portage_arch}";;
113 + esac
114 +}
115 +
116 +go_arm()
117 +{
118 + case "${1:-${CHOST}}" in
119 + armv5*) echo 5;;
120 + armv6*) echo 6;;
121 + armv7*) echo 7;;
122 + *)
123 + die "unknown GOARM for ${1:-${CHOST}}"
124 + ;;
125 + esac
126 +}
127 +
128 +go_os()
129 +{
130 + case "${1:-${CHOST}}" in
131 + *-linux*) echo linux;;
132 + *-darwin*) echo darwin;;
133 + *-freebsd*) echo freebsd;;
134 + *-netbsd*) echo netbsd;;
135 + *-openbsd*) echo openbsd;;
136 + *-solaris*) echo solaris;;
137 + *-cygwin*|*-interix*|*-winnt*)
138 + echo windows
139 + ;;
140 + *)
141 + die "unknown GOOS for ${1:-${CHOST}}"
142 + ;;
143 + esac
144 +}
145 +
146 +go_tuple()
147 +{
148 + echo "$(go_os $@)_$(go_arch $@)"
149 +}
150 +
151 +go_cross_compile()
152 +{
153 + [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
154 +}
155 +
156 +src_compile()
157 +{
158 + if has_version -b dev-lang/go; then
159 + export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
160 + elif has_version -b dev-lang/go-bootstrap; then
161 + export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
162 + else
163 + eerror "Go cannot be built without go or go-bootstrap installed"
164 + die "Should not be here, please report a bug"
165 + fi
166 +
167 + export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
168 + export GOROOT="$(pwd)"
169 + export GOBIN="${GOROOT}/bin"
170 +
171 + # Go's build script does not use BUILD/HOST/TARGET consistently. :(
172 + export GOHOSTARCH=$(go_arch ${CBUILD})
173 + export GOHOSTOS=$(go_os ${CBUILD})
174 + export CC=$(tc-getBUILD_CC)
175 +
176 + export GOARCH=$(go_arch)
177 + export GOOS=$(go_os)
178 + export CC_FOR_TARGET=$(tc-getCC)
179 + export CXX_FOR_TARGET=$(tc-getCXX)
180 + if [[ ${ARCH} == arm ]]; then
181 + export GOARM=$(go_arm)
182 + fi
183 +
184 + cd src
185 + ./make.bash || die "build failed"
186 +}
187 +
188 +src_test()
189 +{
190 + go_cross_compile && return 0
191 +
192 + cd src
193 + PATH="${GOBIN}:${PATH}" \
194 + ./run.bash -no-rebuild || die "tests failed"
195 +}
196 +
197 +src_install()
198 +{
199 + local bin_path f x
200 +
201 + dodir /usr/lib/go
202 +
203 + # There is a known issue which requires the source tree to be installed [1].
204 + # Once this is fixed, we can consider using the doc use flag to control
205 + # installing the doc and src directories.
206 + # [1] https://golang.org/issue/2775
207 + #
208 + # deliberately use cp to retain permissions
209 + cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
210 + if go_cross_compile; then
211 + bin_path="bin/$(go_tuple)"
212 + else
213 + bin_path=bin
214 + fi
215 + for x in ${bin_path}/*; do
216 + f=${x##*/}
217 + dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
218 + done
219 + einstalldocs
220 +
221 + if [[ ${CHOST} == *-darwin* ]] ; then
222 + # fix install_name for test object (binutils_test) on Darwin, it
223 + # is never used in real circumstances
224 + local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/
225 + libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64
226 + install_name_tool -id "${libmac64}" "${D}${libmac64}"
227 + fi
228 +}