summaryrefslogtreecommitdiff
path: root/dev-lang/go
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /dev-lang/go
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'dev-lang/go')
-rw-r--r--dev-lang/go/Manifest12
-rw-r--r--dev-lang/go/go-1.17.7.ebuild (renamed from dev-lang/go/go-1.17.5.ebuild)3
-rw-r--r--dev-lang/go/go-1.17.8.ebuild196
-rw-r--r--dev-lang/go/go-1.18.ebuild (renamed from dev-lang/go/go-1.17.6.ebuild)1
-rw-r--r--dev-lang/go/go-9999.ebuild3
5 files changed, 205 insertions, 10 deletions
diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
index e56b985ff6a2..16f171ec8d37 100644
--- a/dev-lang/go/Manifest
+++ b/dev-lang/go/Manifest
@@ -1,7 +1,9 @@
AUX go-sets.conf 313 BLAKE2B 03e94776e317d34b72bfb8385b8b0dfa6a599a6086e4d0c9214e7b49293768947c21d9afb323ffcc7fd85ba0af72d9cb243dbb571eee9eb81de9400fd5f5e79c SHA512 7d01b98bc8d1b609183682dd942bd4c9fa757a98243c7de3cf6c497c7bc20b8cdbe59dd669ce4bb11f914a0e9b6d100e65cea2dffd99f38be50b18e0ecf66315
-DIST go1.17.5.src.tar.gz 22186577 BLAKE2B fe6cbfce1a8e7556e7f690f34eb1cdf761f0f74b2ff3781bdc3c6ce2efa4fd00229268ee704d6c4a84f4b37b3deae7c65bd12628bf60ec32c2d8c32b13d99de1 SHA512 6c833455fe79476c29a0565ae3b5ede452abb75689d52cbaa524743549f6f12681b6b5035dc4048387bd738c15b7cd8bdc4c875d54232ca2343c7404a4326884
-DIST go1.17.6.src.tar.gz 22191372 BLAKE2B d6b52e23cea61709a682f06aa21db345980a7eb223b08d539721429227bb22d365bde5901e18f289eede0872e7bf9a5db4c2736d847202ded0f5f7351dcf035a SHA512 59e5471d33e72208a3ca1ddf6c13aeb2b95a3291c0491571597197a260fb8cb74241c7bb09b44129c1e39f857ce4279f416c139b3ab2d7aded10002beb222ee2
-EBUILD go-1.17.5.ebuild 4855 BLAKE2B dd3877fe5f7afa41fa91faabd2c0ddc4224a6bd4dca91ee64dc1447a87480a45e67975aa3c9fa1434aa209f55c85e1acec584f09025ea7ecef76e465da877563 SHA512 7568355bc063281f80f2e94b16f9a0b5b3eecf3744167b26154aaecb296bf7201ff07af9ba93c5ecdac66cb3277869c996da79e17ae54c642c9107012e516d34
-EBUILD go-1.17.6.ebuild 4860 BLAKE2B b42be3af896af9dcf861825afc1f2e21028097b0e02b8ad67f785cda6d3e20d15d0c9cff13dcb18c32831f0f0c2a0b44b8b2b0130a9f4d2d3ee178d8b2612ee3 SHA512 3dc73bafec02bae3ed4795f3a60fe36b20012022ea7a7bb1d65668e101ecaa2366a4de4cff7c580c0bd68a624dbcb97ec2bf2827bb2063d8a86b5e6961ced6a3
-EBUILD go-9999.ebuild 4860 BLAKE2B 15dabdb1ce54184d4542c9839303f780850fc003d4a3fd9e79e131aa91c7116ac0513196643a6f9ef86166f6204c3f4a1850c084caab13ed7b5cad7b878119ec SHA512 28fb38b58feacc7e79ae3228b56e654c4c134647c95f6ac165d4f7b328b0ec4c86440b3d11f28d4177bf3ecef3fa2d08768f2ef8c93a4d5d52b057e8354b84fc
+DIST go1.17.7.src.tar.gz 22195583 BLAKE2B 3ea226fe3089729435d9b9e09880432fef4780303705b6424da9e7ce662aadf54d9c179a5fec8152754dabbb9d53958e35d0119a497bb8f888dbf933b625ce74 SHA512 ee20a97d19e501ee2c11930548bcacfa8b1e8499bbae15659231548f4b03c13bc92bb20c4ce879f0956c02268e748c73ba56d8b140ce8f134501c33cc8b58d3c
+DIST go1.17.8.src.tar.gz 22199282 BLAKE2B 359089402c4f67b8102689a5772f6a168938c57fc3c809681f65f95725ce0a3b528d6cdfeff0da50844f5cfdb941d427658907c30597872315b1fd68a3a61be8 SHA512 21d5c51ce62bc3b987dd5bf7c6b7e1a934fe40582bfbbe99ca80c26d41253e796a4b9d02c571f1e5ab3fd7c3950175e23b9929b0d934f421c96a6d6128c44668
+DIST go1.18.src.tar.gz 22827832 BLAKE2B a961563352721455c9913cd71d8f56c5409e2d4edd44144f09aaba60daf353f844884db6a20943bd84f3634ef0dd330d43d27f5a65911eb4d4d877bfc71c4f40 SHA512 f10356df9099e4d027415be5c73bd2551f2f941a31feb21e1ccc03b7d8faa1844f0a639a508e990712e11ec335675e57504edb323fa1eee63e1d09b8523b3b0d
+EBUILD go-1.17.7.ebuild 4813 BLAKE2B c4f3808ff284d5a6e9cfe43852073002dc204ac3832bd40c7a132f3661c459ff2e4be15e99530787b95844158e11f200d1cabfc2a2d4dbd28c5f3dd79e145017 SHA512 c30ee5f4110c8bbd292cb3d59eb264bb421d8bd78f06d840866fd39682b9b2691ea974e75b18bce58f6f7d9588652dbda3dfe61a58c6e71447df6aaf14998f2a
+EBUILD go-1.17.8.ebuild 4814 BLAKE2B fd356dbb344c527dabc5599a625c70582c14e17f760a89e5f8d957257423f186b9137280070c2d9c0e5ef6ab26d685ef6458c421fc8f8560f7fb237c794adc80 SHA512 f29c73b810eec741c7d31a2840852fc332a1300031c3baef0522c46362648e4651601064187cfdf731b5ab360e257ff8212013401bcebe12a9eec805e5179674
+EBUILD go-1.18.ebuild 4818 BLAKE2B 906a76bebb6036a5e2d5af8563cc2aa3d8c10d48c8926d5e1368026d97c9b00c65973be3f3937396fa35865f0119d9fd59586c66d2ef137c980695a3b62861eb SHA512 07796174e89485089232edfd712a4540bc8bb138894bfa119f8d79deedb3bb8fe770de018637f81c27629e277ea65fa369721b70fead893b600d0d554efae650
+EBUILD go-9999.ebuild 4818 BLAKE2B 906a76bebb6036a5e2d5af8563cc2aa3d8c10d48c8926d5e1368026d97c9b00c65973be3f3937396fa35865f0119d9fd59586c66d2ef137c980695a3b62861eb SHA512 07796174e89485089232edfd712a4540bc8bb138894bfa119f8d79deedb3bb8fe770de018637f81c27629e277ea65fa369721b70fead893b600d0d554efae650
MISC metadata.xml 463 BLAKE2B 133822f9d8be6d5aeb0bf8b9e41ee17637cc3e6f78590a36c1811b77a77a74dd541bb98ad57cfeb6b71a9bcb106c4ac58effcfcfbbef6db4e05b155ef196fd0b SHA512 2837a80088ac2e07cccfb78497c121902a3a0e2f6677b42b1cd82dd3b4e2703099b6d4c95c6c08fefbc647b9b279692e3a46b1126acaad9298c1ecd3b6899fe5
diff --git a/dev-lang/go/go-1.17.5.ebuild b/dev-lang/go/go-1.17.7.ebuild
index 1896c2546e86..7f1ce9304e51 100644
--- a/dev-lang/go/go-1.17.5.ebuild
+++ b/dev-lang/go/go-1.17.7.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -36,7 +36,6 @@ IUSE="cpu_flags_x86_sse2"
BDEPEND="|| (
dev-lang/go
dev-lang/go-bootstrap )"
-RDEPEND="!<dev-go/go-tools-0_pre20150902"
# the *.syso files have writable/executable stacks
QA_EXECSTACK='*.syso'
diff --git a/dev-lang/go/go-1.17.8.ebuild b/dev-lang/go/go-1.17.8.ebuild
new file mode 100644
index 000000000000..ba82adbb2e5d
--- /dev/null
+++ b/dev-lang/go/go-1.17.8.ebuild
@@ -0,0 +1,196 @@
+# Copyright 1999-2022 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 ~riscv ~s390 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+ ;;
+ esac
+esac
+
+DESCRIPTION="A concurrent garbage collected and typesafe programming language"
+HOMEPAGE="https://go.dev"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+IUSE="cpu_flags_x86_sse2"
+
+BDEPEND="|| (
+ dev-lang/go
+ dev-lang/go-bootstrap )"
+
+# the *.syso files have writable/executable stacks
+QA_EXECSTACK='*.syso'
+
+# Do not complain about CFLAGS, etc, since Go doesn't use them.
+QA_FLAGS_IGNORED='.*'
+
+# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
+QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
+
+# This package triggers "unrecognized elf file(s)" notices on riscv.
+# https://bugs.gentoo.org/794046
+QA_PREBUILT='.*'
+
+# 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 ;;
+ riscv) echo riscv64 ;;
+ 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)
+ use arm && export GOARM=$(go_arm)
+ use x86 && export GO386=$(usex cpu_flags_x86_sse2 '' 'softfloat')
+
+ cd src
+ bash -x ./make.bash || die "build failed"
+}
+
+src_test() {
+ go_cross_compile && return 0
+
+ cd src
+ PATH="${GOBIN}:${PATH}" \
+ ./run.bash -no-rebuild || die "tests failed"
+ cd ..
+ rm -fr pkg/*_race || die
+ rm -fr pkg/obj/go-build || die
+}
+
+src_install() {
+ # 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.
+ # The use of cp is deliberate in order to retain permissions
+ # [1] https://golang.org/issue/2775
+ dodir /usr/lib/go
+ cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
+ einstalldocs
+
+ # testdata directories are not needed on the installed system
+ rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print)
+
+ local bin_path
+ if go_cross_compile; then
+ bin_path="bin/$(go_tuple)"
+ else
+ bin_path=bin
+ fi
+ local f x
+ for x in ${bin_path}/*; do
+ f=${x##*/}
+ dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
+ done
+
+ # install the @golang-rebuild set for Portage
+ insinto /usr/share/portage/config/sets
+ newins "${FILESDIR}"/go-sets.conf go.conf
+}
+
+pkg_postinst() {
+ [[ -z ${REPLACING_VERSIONS} ]] && return
+ elog "After ${CATEGORY}/${PN} is updated it is recommended to rebuild"
+ elog "all packages compiled with previous versions of ${CATEGORY}/${PN}"
+ elog "due to the static linking nature of go."
+ elog "If this is not done, the packages compiled with the older"
+ elog "version of the compiler will not be updated until they are"
+ elog "updated individually, which could mean they will have"
+ elog "vulnerabilities."
+ elog "Run 'emerge @golang-rebuild' to rebuild all 'go' packages"
+ elog "See https://bugs.gentoo.org/752153 for more info"
+}
diff --git a/dev-lang/go/go-1.17.6.ebuild b/dev-lang/go/go-1.18.ebuild
index cd2ef07a5897..217891046702 100644
--- a/dev-lang/go/go-1.17.6.ebuild
+++ b/dev-lang/go/go-1.18.ebuild
@@ -36,7 +36,6 @@ IUSE="cpu_flags_x86_sse2"
BDEPEND="|| (
dev-lang/go
dev-lang/go-bootstrap )"
-RDEPEND="!<dev-go/go-tools-0_pre20150902"
# the *.syso files have writable/executable stacks
QA_EXECSTACK='*.syso'
diff --git a/dev-lang/go/go-9999.ebuild b/dev-lang/go/go-9999.ebuild
index a1e1574ff8dd..217891046702 100644
--- a/dev-lang/go/go-9999.ebuild
+++ b/dev-lang/go/go-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -36,7 +36,6 @@ IUSE="cpu_flags_x86_sse2"
BDEPEND="|| (
dev-lang/go
dev-lang/go-bootstrap )"
-RDEPEND="!<dev-go/go-tools-0_pre20150902"
# the *.syso files have writable/executable stacks
QA_EXECSTACK='*.syso'