summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/go-module.eclass')
-rw-r--r--eclass/go-module.eclass13
1 files changed, 7 insertions, 6 deletions
diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass
index 6bba9542cfc8..5cffbb1084d9 100644
--- a/eclass/go-module.eclass
+++ b/eclass/go-module.eclass
@@ -65,11 +65,10 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-inherit multiprocessing toolchain-funcs
-
-if [[ -z ${_GO_MODULE} ]]; then
+if [[ -z ${_GO_MODULE_ECLASS} ]]; then
+_GO_MODULE_ECLASS=1
-_GO_MODULE=1
+inherit multiprocessing toolchain-funcs
if [[ ! ${GO_OPTIONAL} ]]; then
BDEPEND=">=dev-lang/go-1.18"
@@ -79,8 +78,6 @@ if [[ ! ${GO_OPTIONAL} ]]; then
# Added here rather than to each affected package, so it can be cleaned up just
# once when pkgcheck is improved.
BDEPEND+=" app-arch/unzip"
-
- EXPORT_FUNCTIONS src_unpack
fi
# Force go to build in module mode.
@@ -526,3 +523,7 @@ _go-module_gomod_encode() {
}
fi
+
+if [[ ! ${GO_OPTIONAL} ]]; then
+ EXPORT_FUNCTIONS src_unpack
+fi