eclass/go-module: Sync with Gentoo

It's from Gentoo commit 0e651d4b8db7082279b5e110c41abb2bc5293eba.
This commit is contained in:
Krzesimir Nowak 2024-08-02 16:04:31 +02:00
parent 87a3f1cad3
commit 24050766f5

View File

@ -1,4 +1,4 @@
# Copyright 2019-2023 Gentoo Authors
# Copyright 2019-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: go-module.eclass
@ -14,7 +14,7 @@
# written in the go programming language that uses modules.
# If the software you are packaging has a file named go.mod in its top level
# directory, it uses modules.
#
#
# Modules have been the preferred method of tracking dependencies in software
# written in Go since version 1.16,
# so if the software isn't using modules, it should be updated.
@ -45,7 +45,7 @@
# Since Go programs are statically linked, it is important that your ebuild's
# LICENSE= setting includes the licenses of all statically linked
# dependencies. So please make sure it is accurate.
# You can use a utility like dev-go/golicense (network connectivity is
# You can use a utility like dev-go/lichen (network connectivity is
# required) to extract this information from the compiled binary.
#
# @EXAMPLE:
@ -68,11 +68,10 @@ esac
if [[ -z ${_GO_MODULE_ECLASS} ]]; then
_GO_MODULE_ECLASS=1
# Flatcar: Keep this change until upstream has merged https://github.com/gentoo/gentoo/pull/33539
inherit multiprocessing toolchain-funcs go-env
if [[ ! ${GO_OPTIONAL} ]]; then
BDEPEND=">=dev-lang/go-1.18"
BDEPEND=">=dev-lang/go-1.20:="
# Workaround for pkgcheck false positive: https://github.com/pkgcore/pkgcheck/issues/214
# MissingUnpackerDep: version ...: missing BDEPEND="app-arch/unzip"
@ -389,7 +388,6 @@ go-module_src_unpack() {
fi
fi
# Flatcar: Keep this change until upstream has merged https://github.com/gentoo/gentoo/pull/33539
go-env_set_compile_environment
}