commit:     4ab2af9616336aa40b8c824916e85f75d150f5d2
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 12 09:24:37 2021 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sun Dec 12 09:46:29 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ab2af96

net-analyzer/zabbix: use GO_OPTIONAL from go-module eclass

This makes dev-lang/go an optional dependency.

Closes: https://bugs.gentoo.org/775779
Closes: https://github.com/gentoo/gentoo/pull/23261
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 .../zabbix/{zabbix-5.0.18.ebuild => zabbix-5.0.18-r1.ebuild} | 12 ++++++++++++
 .../zabbix/{zabbix-5.4.8.ebuild => zabbix-5.4.8-r1.ebuild}   | 12 ++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/net-analyzer/zabbix/zabbix-5.0.18.ebuild 
b/net-analyzer/zabbix/zabbix-5.0.18-r1.ebuild
similarity index 99%
rename from net-analyzer/zabbix/zabbix-5.0.18.ebuild
rename to net-analyzer/zabbix/zabbix-5.0.18-r1.ebuild
index 0e9da3be9ad9..de4e218a3299 100644
--- a/net-analyzer/zabbix/zabbix-5.0.18.ebuild
+++ b/net-analyzer/zabbix/zabbix-5.0.18-r1.ebuild
@@ -3,6 +3,7 @@
 
 EAPI=7
 
+GO_OPTIONAL="yes"
 # needed to make webapp-config dep optional
 WEBAPP_OPTIONAL="yes"
 inherit webapp java-pkg-opt-2 systemd tmpfiles toolchain-funcs go-module 
user-info
@@ -312,6 +313,10 @@ DEPEND="${COMMON_DEPEND}
 "
 BDEPEND="
        virtual/pkgconfig
+       agent2? (
+               >=dev-lang/go-1.12
+               app-arch/unzip
+       )
 "
 
 # upstream tests fail for agent2
@@ -351,6 +356,13 @@ pkg_setup() {
        java-pkg-opt-2_pkg_setup
 }
 
+src_unpack() {
+       default
+       if use agent2; then
+               go-module_src_unpack
+       fi
+}
+
 src_prepare() {
        default
 }

diff --git a/net-analyzer/zabbix/zabbix-5.4.8.ebuild 
b/net-analyzer/zabbix/zabbix-5.4.8-r1.ebuild
similarity index 99%
rename from net-analyzer/zabbix/zabbix-5.4.8.ebuild
rename to net-analyzer/zabbix/zabbix-5.4.8-r1.ebuild
index 6a0d5e421042..6a6c91266493 100644
--- a/net-analyzer/zabbix/zabbix-5.4.8.ebuild
+++ b/net-analyzer/zabbix/zabbix-5.4.8-r1.ebuild
@@ -3,6 +3,7 @@
 
 EAPI=7
 
+GO_OPTIONAL="yes"
 # needed to make webapp-config dep optional
 WEBAPP_OPTIONAL="yes"
 inherit webapp java-pkg-opt-2 systemd tmpfiles toolchain-funcs go-module 
user-info
@@ -337,6 +338,10 @@ DEPEND="${COMMON_DEPEND}
 "
 BDEPEND="
        virtual/pkgconfig
+       agent2? (
+               >=dev-lang/go-1.12
+               app-arch/unzip
+       )
 "
 
 # upstream tests fail for agent2
@@ -376,6 +381,13 @@ pkg_setup() {
        java-pkg-opt-2_pkg_setup
 }
 
+src_unpack() {
+       default
+       if use agent2; then
+               go-module_src_unpack
+       fi
+}
+
 src_prepare() {
        default
 }

Reply via email to