From b426a5cef3f0ebe3389686a1c145a834d3a1e120 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 9 Sep 2022 10:40:04 +0100 Subject: gentoo auto-resync : 09:09:2022 - 10:40:04 --- dev-lang/go/Manifest | 6 +- dev-lang/go/go-1.18.6.ebuild | 196 +++++++++++++++++++++++++++++++++++++++++++ dev-lang/go/go-1.19.1.ebuild | 196 +++++++++++++++++++++++++++++++++++++++++++ dev-lang/go/go-1.19.ebuild | 196 ------------------------------------------- 4 files changed, 396 insertions(+), 198 deletions(-) create mode 100644 dev-lang/go/go-1.18.6.ebuild create mode 100644 dev-lang/go/go-1.19.1.ebuild delete mode 100644 dev-lang/go/go-1.19.ebuild (limited to 'dev-lang/go') diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest index 30eeafc2a5f7..ec2090d487fb 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.18.5.src.tar.gz 22847094 BLAKE2B 8edf133aa5b1fa4076db72bd7c63240db6cbd6b9b4725c2a71384ff302bee77e193bcfad6b55bfd31ee58f08fc59d9bbee5750d9227598fe402d6293863595ff SHA512 4ba69ad49b5c17963fdc39ae7f5360fa38950db39ec1fb9b52744d6a209abf177dab6bd587e7457c83a4fd265589907ec241d8b09d0eac76cf984243a14500ef -DIST go1.19.src.tar.gz 26521849 BLAKE2B 2f985c4a9a125fa81fb6bd83e47d2382b4f256b689da1e16b53cdd83c896894d89b8601fc6263e8cb344d9e45c9b647d0d3c88fdf65bb304a352612d98e4bb7c SHA512 c4460d54957a0bcf3407ea72cd1c6b3c645ef4ef6cc0fa142a80cb43c06ca4af31d52b0ccd723c81d17a62004bc96559cad23da874a4b668b4d8b168f1da2186 +DIST go1.18.6.src.tar.gz 22865753 BLAKE2B fc86e509006e61434bcf6968aca345474560457be1573c836f24cd1d173d7cd515bbe70376d4231cd4318c77bd8e7c3af1101ded8403b3ca8f0afd08563a38ba SHA512 2af66b09bfe033b413eb7603a73a490319bf49fec0a2e20c40350e60b9ef35250a6dc8544c5fc67bd1ede55e242d056e7749f69ef500a38b1efe4b8f93078de3 +DIST go1.19.1.src.tar.gz 26527375 BLAKE2B 80e80189e7e94f0a6bcb5dfdccc56fa3fee82d461816606b5600f6238f8929bb230c74c527ca01a087024002f9e9eb807997bd43639a7af81774d731361ce3a2 SHA512 7e8cf557f05d5a537f9305bb9c19cf8ab9ce640376e5ea97ff0d490b016364936e8dfc129462760c4e817af01fdf09e3f815b88412f9985bb254dfa3167752c0 EBUILD go-1.18.5.ebuild 4798 BLAKE2B 8857c2432424a27febc299a46ca61bfd267d9a1d2fad7116096e5938a519410d35bf90b61a1827e2ad769986b9406ecd0bf1b9197e64b8a176e0a8d9dbb600eb SHA512 9e2efbcb8652fd203e239626f2ace311dba12c591829ce00e4204f28c3d908adeca69d1a17855c2544f2f8bc5d88a636a3d1c806d36542788c1949204b5535b8 -EBUILD go-1.19.ebuild 4829 BLAKE2B 01637a5c6f2fdfc808d20c08a8eede29d068d7e4b7c002160dc22920b4e6f1a8c8aca2490d83d5a972ae0ddf665af291e385d5c6c989b91994d0a4b56f9944f1 SHA512 b46944fde6bf4055b64f3eb58e6256be3bf3904bcff2285046f831d051dd4c05fa9dbbcf9e48eb63cde5b9708b5430ef2f720112635d77cffc99fbf1276b7751 +EBUILD go-1.18.6.ebuild 4800 BLAKE2B ceff494e09edd7b7c668aa0de6e4dfec44218795cfc8f361b9dc60b595c0067fd7524676b8eaeb8076cededeeb7c27ddf70349c17997820cd2382f4c89bcc0ff SHA512 3fdcd9dff5799679e402f6e4473924a895d53404c741890adff311a6398b0009194f1046ebc79e114e89874e6172ea5a8930a7c38794e6e24059436f8909e693 +EBUILD go-1.19.1.ebuild 4826 BLAKE2B 9114252b590b460d8dd56f347234ab9b671298cff90c5f14a17f6001dfe2b4e0fbdd323d73fd994d9eb8ff4aa7d2c55b10fa1f11b23780d232da57eb5614e72a SHA512 4d63f3f86edd2ea8a0df16bd6f18ee06963d4e238714be9258452db30f7788dc6296f0d136cdaa2243c2bd228db95ea389661f6fe1aa481388eb7cd32b82333f 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.6.ebuild b/dev-lang/go/go-1.18.6.ebuild new file mode 100644 index 000000000000..0ef0adfbf747 --- /dev/null +++ b/dev-lang/go/go-1.18.6.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.1.ebuild b/dev-lang/go/go-1.19.1.ebuild new file mode 100644 index 000000000000..bc66dab29cdd --- /dev/null +++ b/dev-lang/go/go-1.19.1.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 ~loong ~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=( + 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;; + 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.ebuild b/dev-lang/go/go-1.19.ebuild deleted file mode 100644 index d5dfd708f333..000000000000 --- a/dev-lang/go/go-1.19.ebuild +++ /dev/null @@ -1,196 +0,0 @@ -# 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 ~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=( - 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;; - 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" -} -- cgit v1.2.3