summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <william.hubbs@sony.com>2020-02-13 14:23:21 -0600
committerWilliam Hubbs <williamh@gentoo.org>2020-02-13 14:27:40 -0600
commitf2f89755dbc35a7facb442bb9cc09c69a9d6323d (patch)
treeaa47d8e2f25c047d563d29940626bdf4e2e39225 /dev-lang/go
parentdev-lang/go: 1.12.17 bump (diff)
downloadgentoo-f2f89755dbc35a7facb442bb9cc09c69a9d6323d.tar.gz
gentoo-f2f89755dbc35a7facb442bb9cc09c69a9d6323d.tar.bz2
gentoo-f2f89755dbc35a7facb442bb9cc09c69a9d6323d.zip
dev-lang/go: 1.13.8 bump
Signed-off-by: William Hubbs <williamh@gentoo.org>
Diffstat (limited to 'dev-lang/go')
-rw-r--r--dev-lang/go/Manifest1
-rw-r--r--dev-lang/go/go-1.13.8.ebuild197
2 files changed, 198 insertions, 0 deletions
diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
index a93b51bdaee9..3dfc24769e2c 100644
--- a/dev-lang/go/Manifest
+++ b/dev-lang/go/Manifest
@@ -14,3 +14,4 @@ DIST go1.12.15.src.tar.gz 20726294 BLAKE2B d123fc2328bf9db8f7337108e3d6857c31e10
DIST go1.12.17.src.tar.gz 20725913 BLAKE2B 2eef7374195302656268a42409619445dfeb3ede1f9218ae4eab195916876b97f7510cc62585a0bfdd9f86dddf8a74000032a84b29bc9891d84fc69db94f0274 SHA512 069f8f445d9d2268ebb14b2446fab34843d56283c04561636d122fd8b4c1ea0b63640a84437db7a7be71039440ffe170cd3f8025b03b0acf95f2a56fa2febec6
DIST go1.13.6.src.tar.gz 21631050 BLAKE2B 8923021d5ff785f5422ee204ee81c986fc066a878a347bc73625974f05045689f694f76147c9bf7956dc59d6e3d3a543f0970e0716df8cd4f6556c28fe23808b SHA512 dffb6e06eea0b1541901dfbed8d28e8cc1eac3184dc40a19ed3637737df796a67a2e7170b228e1003d36b14e6f0f13bb8be9d2a702834a9c06228d1821659528
DIST go1.13.7.src.tar.gz 21631267 BLAKE2B 9c3096e7c7658e03be52b76298dd409de292929d95448cb8945fe6f263fda774d9d13e124bb978c91b51a3770c0ca81302098b0e915015cfcac5f26256987796 SHA512 f87dd04befbe32c7ff1eb617a756fcc7d85e4236d4b063bbf6091d8911ef147c070808f7f7db536e7a3b3990f61f6fb4666e665217b0807e7e0703e00c5491fa
+DIST go1.13.8.src.tar.gz 21631178 BLAKE2B 1752a4ecc4fd9409ebbb129f6b6edaacb7d9e140e3b0a8cbbb9b16b64b481a375b4fbe2a4814e2a272be4fdb5929e5d40f40778a07d6ff0b814230b2d4ed9697 SHA512 5df45c4701631e7a70f4f25b07ed00dc9a56bdebeb5ead2d04e0e6b000e8a9f00d193247e626ef5b1e6b7fc54bf27fbc5e8fb21b23ab52ec397f2238c5dfa000
diff --git a/dev-lang/go/go-1.13.8.ebuild b/dev-lang/go/go-1.13.8.ebuild
new file mode 100644
index 000000000000..f7c4c78376b8
--- /dev/null
+++ b/dev-lang/go/go-1.13.8.ebuild
@@ -0,0 +1,197 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+
+MY_PV=${PV/_/}
+
+inherit toolchain-funcs
+
+case ${PV} in
+*9999*)
+ EGIT_REPO_URI="https://github.com/golang/go.git"
+ inherit git-r3
+ ;;
+*)
+ SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
+ S="${WORKDIR}"/go
+ case ${PV} in
+ *_beta*|*_rc*) ;;
+ *)
+ KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+ # The upstream tests fail under portage but pass if the build is
+ # run according to their documentation [1].
+ # I am restricting the tests on released versions until this is
+ # solved.
+ # [1] https://golang.org/issues/18442
+ RESTRICT="test"
+ ;;
+ esac
+esac
+
+DESCRIPTION="A concurrent garbage collected and typesafe programming language"
+HOMEPAGE="https://golang.org"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+
+BDEPEND="|| (
+ dev-lang/go
+ dev-lang/go-bootstrap )"
+RDEPEND="!<dev-go/go-tools-0_pre20150902"
+
+# These test data objects have writable/executable stacks.
+QA_EXECSTACK="
+ usr/lib/go/src/debug/elf/testdata/*.obj
+ usr/lib/go/src/*.gox
+ "
+
+# Do not complain about CFLAGS, etc, since Go doesn't use them.
+QA_FLAGS_IGNORED='.*'
+
+REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*"
+
+# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
+QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
+
+# Do not strip this package. Stripping is unsupported upstream and may
+# fail.
+RESTRICT+=" strip"
+
+DOCS=(
+AUTHORS
+CONTRIBUTING.md
+CONTRIBUTORS
+PATENTS
+README.md
+)
+
+go_arch()
+{
+ # By chance most portage arch names match Go
+ local portage_arch=$(tc-arch $@)
+ case "${portage_arch}" in
+ x86) echo 386;;
+ x64-*) echo amd64;;
+ ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
+ s390) echo s390x ;;
+ *) echo "${portage_arch}";;
+ esac
+}
+
+go_arm()
+{
+ case "${1:-${CHOST}}" in
+ armv5*) echo 5;;
+ armv6*) echo 6;;
+ armv7*) echo 7;;
+ *)
+ die "unknown GOARM for ${1:-${CHOST}}"
+ ;;
+ esac
+}
+
+go_os()
+{
+ case "${1:-${CHOST}}" in
+ *-linux*) echo linux;;
+ *-darwin*) echo darwin;;
+ *-freebsd*) echo freebsd;;
+ *-netbsd*) echo netbsd;;
+ *-openbsd*) echo openbsd;;
+ *-solaris*) echo solaris;;
+ *-cygwin*|*-interix*|*-winnt*)
+ echo windows
+ ;;
+ *)
+ die "unknown GOOS for ${1:-${CHOST}}"
+ ;;
+ esac
+}
+
+go_tuple()
+{
+ echo "$(go_os $@)_$(go_arch $@)"
+}
+
+go_cross_compile()
+{
+ [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
+}
+
+src_compile()
+{
+ if has_version -b dev-lang/go; then
+ export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
+ elif has_version -b dev-lang/go-bootstrap; then
+ export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
+ else
+ eerror "Go cannot be built without go or go-bootstrap installed"
+ die "Should not be here, please report a bug"
+ fi
+
+ export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
+ export GOROOT="$(pwd)"
+ export GOBIN="${GOROOT}/bin"
+
+ # Go's build script does not use BUILD/HOST/TARGET consistently. :(
+ export GOHOSTARCH=$(go_arch ${CBUILD})
+ export GOHOSTOS=$(go_os ${CBUILD})
+ export CC=$(tc-getBUILD_CC)
+
+ export GOARCH=$(go_arch)
+ export GOOS=$(go_os)
+ export CC_FOR_TARGET=$(tc-getCC)
+ export CXX_FOR_TARGET=$(tc-getCXX)
+ if [[ ${ARCH} == arm ]]; then
+ export GOARM=$(go_arm)
+ fi
+
+ cd src
+ ./make.bash || die "build failed"
+}
+
+src_test()
+{
+ go_cross_compile && return 0
+
+ cd src
+ PATH="${GOBIN}:${PATH}" \
+ ./run.bash -no-rebuild || die "tests failed"
+}
+
+src_install()
+{
+ local bin_path f x
+
+ dodir /usr/lib/go
+
+ # There is a known issue which requires the source tree to be installed [1].
+ # Once this is fixed, we can consider using the doc use flag to control
+ # installing the doc and src directories.
+ # [1] https://golang.org/issue/2775
+ #
+ # deliberately use cp to retain permissions
+ cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
+ if go_cross_compile; then
+ bin_path="bin/$(go_tuple)"
+ else
+ bin_path=bin
+ fi
+ for x in ${bin_path}/*; do
+ f=${x##*/}
+ dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
+ done
+ einstalldocs
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # fix install_name for test object (binutils_test) on Darwin, it
+ # is never used in real circumstances
+ local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/
+ libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64
+ install_name_tool -id "${libmac64}" "${D}${libmac64}"
+ fi
+}