git: 184a2d43b66d - main - net-mgmt/ocsinventory-agent: use dmidecode only where it's available

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Sun, 10 Oct 2021 18:33:45 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=184a2d43b66d651ee245cc746ab5854977c73dcf

commit 184a2d43b66d651ee245cc746ab5854977c73dcf
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2021-10-10 18:14:32 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2021-10-10 18:14:32 +0000

    net-mgmt/ocsinventory-agent: use dmidecode only where it's available
---
 net-mgmt/ocsinventory-agent/Makefile | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/net-mgmt/ocsinventory-agent/Makefile b/net-mgmt/ocsinventory-agent/Makefile
index 0638598bce6b..c8583a8fa6f2 100644
--- a/net-mgmt/ocsinventory-agent/Makefile
+++ b/net-mgmt/ocsinventory-agent/Makefile
@@ -11,8 +11,7 @@ COMMENT=	Keep track of the computers configuration and software
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-RUN_DEPENDS=	dmidecode:sysutils/dmidecode \
-		lspci:sysutils/pciutils \
+RUN_DEPENDS=	lspci:sysutils/pciutils \
 		p5-libwww>=0:www/p5-libwww \
 		p5-Net-IP>=0:net-mgmt/p5-Net-IP \
 		p5-Proc-Daemon>=0:devel/p5-Proc-Daemon \
@@ -52,4 +51,10 @@ SNMP_RUN_DEPENDS=	nmap:security/nmap \
 			p5-Net-SNMP>=0:net-mgmt/p5-Net-SNMP \
 			p5-Nmap-Parser>=0:security/p5-Nmap-Parser
 
+.include <bsd.port.options.mk>
+
+.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH} == armv6 || ${ARCH} == armv7 || ${ARCH} == i386 || ${ARCH} == riscv64 || ${ARCH} == riscv64sf
+RUN_DEPENDS+=	dmidecode:sysutils/dmidecode
+.endif
+
 .include <bsd.port.mk>