summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <william.hubbs@sony.com>2020-03-02 17:38:16 -0600
committerWilliam Hubbs <williamh@gentoo.org>2020-03-02 17:38:51 -0600
commitadc41efbb74cf9063e6621eff655c2efbc7a5950 (patch)
tree0e7ba18a18ef2cf99f53a14dc87d5dbd3b29f3b8 /dev-lang/go
parentdev-python/pycxx: QA fixes (diff)
downloadgentoo-adc41efbb74cf9063e6621eff655c2efbc7a5950.tar.gz
gentoo-adc41efbb74cf9063e6621eff655c2efbc7a5950.tar.bz2
gentoo-adc41efbb74cf9063e6621eff655c2efbc7a5950.zip
dev-lang/go: 1.14 version 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.14.ebuild197
2 files changed, 198 insertions, 0 deletions
diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
index 3dfc24769e2c..0c734f62b862 100644
--- a/dev-lang/go/Manifest
+++ b/dev-lang/go/Manifest
@@ -15,3 +15,4 @@ DIST go1.12.17.src.tar.gz 20725913 BLAKE2B 2eef7374195302656268a42409619445dfeb3
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
+DIST go1.14.src.tar.gz 22377333 BLAKE2B 94ba8bac1cffd4ee71051a3ac4a1366f0fcbd0ccf71dad2152e77851593e2a3e8807c0d1f5b6dc396c217b9e7e9c3eeb788760c671b439ee244f8f856406598f SHA512 b04f2a90b9693f2c7a0b5c7048f186318937f3dd3831162c4130d88e2b185a5047db15e284041c70f1f42da512f42e5e85c13256018982cf2739244a31874328
diff --git a/dev-lang/go/go-1.14.ebuild b/dev-lang/go/go-1.14.ebuild
new file mode 100644
index 000000000000..f7c4c78376b8
--- /dev/null
+++ b/dev-lang/go/go-1.14.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
+}