summaryrefslogtreecommitdiff
path: root/dev-lang/go
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-10-06 07:21:11 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-10-06 07:21:11 +0100
commit86b151cdc26e1566efef728aac4ebb2aabce776a (patch)
treecddf785c30aaa09d058e8944cea2581743b189dd /dev-lang/go
parenta4f9ab81d6cbfc3ff649dd3577e3efa700b47387 (diff)
gentoo auto-resync : 06:10:2022 - 07:21:10
Diffstat (limited to 'dev-lang/go')
-rw-r--r--dev-lang/go/Manifest4
-rw-r--r--dev-lang/go/go-1.18.7.ebuild196
-rw-r--r--dev-lang/go/go-1.19.2.ebuild201
3 files changed, 401 insertions, 0 deletions
diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
index d30e1da1eb00..5d3d9818b31b 100644
--- a/dev-lang/go/Manifest
+++ b/dev-lang/go/Manifest
@@ -1,9 +1,13 @@
AUX go-sets.conf 313 BLAKE2B 03e94776e317d34b72bfb8385b8b0dfa6a599a6086e4d0c9214e7b49293768947c21d9afb323ffcc7fd85ba0af72d9cb243dbb571eee9eb81de9400fd5f5e79c SHA512 7d01b98bc8d1b609183682dd942bd4c9fa757a98243c7de3cf6c497c7bc20b8cdbe59dd669ce4bb11f914a0e9b6d100e65cea2dffd99f38be50b18e0ecf66315
DIST go1.18.5.src.tar.gz 22847094 BLAKE2B 8edf133aa5b1fa4076db72bd7c63240db6cbd6b9b4725c2a71384ff302bee77e193bcfad6b55bfd31ee58f08fc59d9bbee5750d9227598fe402d6293863595ff SHA512 4ba69ad49b5c17963fdc39ae7f5360fa38950db39ec1fb9b52744d6a209abf177dab6bd587e7457c83a4fd265589907ec241d8b09d0eac76cf984243a14500ef
DIST go1.18.6.src.tar.gz 22865753 BLAKE2B fc86e509006e61434bcf6968aca345474560457be1573c836f24cd1d173d7cd515bbe70376d4231cd4318c77bd8e7c3af1101ded8403b3ca8f0afd08563a38ba SHA512 2af66b09bfe033b413eb7603a73a490319bf49fec0a2e20c40350e60b9ef35250a6dc8544c5fc67bd1ede55e242d056e7749f69ef500a38b1efe4b8f93078de3
+DIST go1.18.7.src.tar.gz 22872579 BLAKE2B 194ef3440c0e23c4409e433fa9c62419d9aa7c3445bacd45c905cb78b480882e220ca5cb0a45ebe071d8c6592db470832f9358b36b18af557a4684ef6872c456 SHA512 cf1ff024e94b900b87cc52d3ec04b0f7f853880a99c416791ad4b9af5f8e50ec82fbe00788bc8dcc184ef5ce1a9df17f5f5e95cf01c0c8138f28f53d691ca5d4
DIST go1.19.1.src.tar.gz 26527375 BLAKE2B 80e80189e7e94f0a6bcb5dfdccc56fa3fee82d461816606b5600f6238f8929bb230c74c527ca01a087024002f9e9eb807997bd43639a7af81774d731361ce3a2 SHA512 7e8cf557f05d5a537f9305bb9c19cf8ab9ce640376e5ea97ff0d490b016364936e8dfc129462760c4e817af01fdf09e3f815b88412f9985bb254dfa3167752c0
+DIST go1.19.2.src.tar.gz 26534465 BLAKE2B 9b1eb84a8d840facf69dde8f6263d08239b67b583b3b4fdf0aa5c03cb15c41c0dd6b10df61bfe7d1b02eeb0d1eb97fc5adeaa71e9745318c2648057be3f37259 SHA512 72901e5eaf1857b22bf62a82690579aa4bd8b8130f16416313d249600c99e1ae3c1451ac5c53138ce41dd39dd72dcf8d0f3592b98f4239754efcf4f8b0103cb4
EBUILD go-1.18.5.ebuild 4798 BLAKE2B 8857c2432424a27febc299a46ca61bfd267d9a1d2fad7116096e5938a519410d35bf90b61a1827e2ad769986b9406ecd0bf1b9197e64b8a176e0a8d9dbb600eb SHA512 9e2efbcb8652fd203e239626f2ace311dba12c591829ce00e4204f28c3d908adeca69d1a17855c2544f2f8bc5d88a636a3d1c806d36542788c1949204b5535b8
EBUILD go-1.18.6.ebuild 4799 BLAKE2B 0d764bfef4365902950fdf72ee7ba01a6d09791e342bfc12dc8f113634549b323d997f653399e62a9f5b47670607683580b42b83c8434521c3d99f77ab3123b5 SHA512 2104e572fd37817cf5b66a765bbd533c8ee93c82c4672059f68eba83210363664a16c8e7721ba92622f2238e52f0d12137b0a8d92e453946eed99adde8b57a4a
+EBUILD go-1.18.7.ebuild 4803 BLAKE2B d2b93e9fca1ebcc0619b6c72c724c95da3b7b0223f2d0ac95081096fcf2c5123f0c4f8284fc935450780545c1d408f71ad905ad12029c02dee9eec1f2e4f45b9 SHA512 356f3323b209c69113a81920367ac38793bf3d8599fa71d64838027da0db878430fa0856ec0d74db943752e211c2fbc410eec30fae3f15a4fb8cc53b15f63580
EBUILD go-1.19.1.ebuild 5055 BLAKE2B 495d5f984812d96ae6079cbbd1d4ebb8a0d0cc96e01950ec29e8ac008a8da99fe0f722adc8a7a30d829ef33c0fcb75562b6d7904c428550846fc23777c61abd3 SHA512 427faf40bee0c22c5f4df9e2aecbd09b4e6c8b38eb6206a2bc89dc99c2a10a61601b7b1e46c3d1ebbcb9243a3c23b86a9f8df1624523d5d05231be3f2e9f76a0
+EBUILD go-1.19.2.ebuild 5059 BLAKE2B 494ce3c3bf014b06d6024a2f89d96499c1924547c38617ada01fd4bf61329541d94df164b8c1682d9984ec34dd16278dc016853b32af8f4ef3afaac8c87b23d1 SHA512 91cd271b2c243b5ec3ed92d91f600d2af3e7ec24dee25d477f75d80cf9d86c106086de9af3a0d6c99cdf0e64ba4f350a72ae8d2f6108cb496ddbcbd84f03466f
EBUILD go-9999.ebuild 4798 BLAKE2B 50daca174e8bc89f747432e96bc7d66e6c7dd50320d0b4c97754bb90267d62b700d34c250a892fdf60c907fa5eb881dd7adb3e64eba7ceb240740bd90c399f83 SHA512 051671c9a99efe554f9ed66423a20d053546ba68fdbf8a900e4ef0a365622bf8fcc976c678e393ade4a5475e01ccc53668d61d98e1b976e69de030662498273a
MISC metadata.xml 537 BLAKE2B 8017fd0edeef2ec4b17f75e8686f6014ce3c3e39b7083c347f601de9b15f34896305d6041edd0bc2b6a0687a69827c9dcecb2f07ca5994f29a3c0f8014c0604b SHA512 5f6b42721e1602efab24f33955806c33ace6433e17b41755dbee47abea79a2744292148c330d6e5a04612b0b451545c32241236cc8f211c5e7cf22c8cdebc778
diff --git a/dev-lang/go/go-1.18.7.ebuild b/dev-lang/go/go-1.18.7.ebuild
new file mode 100644
index 000000000000..c340b5873264
--- /dev/null
+++ b/dev-lang/go/go-1.18.7.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 tc_arch=$(tc-arch $@)
+ case "${tc_arch}" in
+ x86) echo 386;;
+ x64-*) echo amd64;;
+ ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
+ riscv) echo riscv64 ;;
+ s390) echo s390x ;;
+ *) echo "${tc_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.19.2.ebuild b/dev-lang/go/go-1.19.2.ebuild
new file mode 100644
index 000000000000..5e8e4e56890a
--- /dev/null
+++ b/dev-lang/go/go-1.19.2.ebuild
@@ -0,0 +1,201 @@
+# 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 ~loong ~mips ~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="abi_mips_o32 abi_mips_n64 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=(
+ CONTRIBUTING.md
+ PATENTS
+ README.md
+ SECURITY.md
+)
+
+go_arch() {
+ # By chance most portage arch names match Go
+ local tc_arch=$(tc-arch $@)
+ case "${tc_arch}" in
+ x86) echo 386;;
+ x64-*) echo amd64;;
+ loong) echo loong64;;
+ mips) if use abi_mips_o32; then
+ [[ $(tc-endian $@) = big ]] && echo mips || echo mipsle
+ elif use abi_mips_n64; then
+ [[ $(tc-endian $@) = big ]] && echo mips64 || echo mips64le
+ fi ;;
+ ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
+ riscv) echo riscv64 ;;
+ s390) echo s390x ;;
+ *) echo "${tc_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"
+}