git: 5b0bf0e7d2a2 - main - net-mgmt/zabbix72-agent: Do not depend on libxml2

From: Juraj Lutter <otis_at_FreeBSD.org>
Date: Fri, 06 Jun 2025 12:04:46 UTC
The branch main has been updated by otis:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5b0bf0e7d2a2d305a0e987c5bfc215bbb54513b7

commit 5b0bf0e7d2a2d305a0e987c5bfc215bbb54513b7
Author:     Juraj Lutter <otis@FreeBSD.org>
AuthorDate: 2025-06-06 11:18:19 +0000
Commit:     Juraj Lutter <otis@FreeBSD.org>
CommitDate: 2025-06-06 12:04:17 +0000

    net-mgmt/zabbix72-agent: Do not depend on libxml2
    
    Do not depend on libxml2, it's not being used in agent.
    Move libxml2 dependency to only server and proxy builds.
    
    PR:             287330
---
 net-mgmt/zabbix72-agent/Makefile  |  2 +-
 net-mgmt/zabbix72-server/Makefile | 15 +++++++++------
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/net-mgmt/zabbix72-agent/Makefile b/net-mgmt/zabbix72-agent/Makefile
index ccd59e7be74d..3efc709f4935 100644
--- a/net-mgmt/zabbix72-agent/Makefile
+++ b/net-mgmt/zabbix72-agent/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	zabbix72
-PORTREVISION=	0
+PORTREVISION=	1
 CATEGORIES=	net-mgmt
 PKGNAMESUFFIX=	-agent
 
diff --git a/net-mgmt/zabbix72-server/Makefile b/net-mgmt/zabbix72-server/Makefile
index eca03d535611..6d43df8ecb0d 100644
--- a/net-mgmt/zabbix72-server/Makefile
+++ b/net-mgmt/zabbix72-server/Makefile
@@ -18,6 +18,8 @@ CONFLICTS_INSTALL=	zabbix[0-9]${PKGNAMESUFFIX} \
 
 ZABBIX_BUILD=	${PKGNAMESUFFIX:S/^-//:S/-$//}
 
+USES=		iconv pkgconfig
+
 .if ${ZABBIX_BUILD} != "frontend" # frontend only needs the version/distribution settings
 .if ${ZABBIX_BUILD} != "agent"
 CONFIGURE_ARGS+=	--cache-file=${WRKSRC}/config.cache \
@@ -25,13 +27,15 @@ CONFIGURE_ARGS+=	--cache-file=${WRKSRC}/config.cache \
 			--with-libxml2
 LIB_DEPENDS+=		libevent.so:devel/libevent
 USE_RC_SUBR=		zabbix_${ZABBIX_BUILD}
+# -server and -proxy depends on libxml2
+.if ${ZABBIX_BUILD} != "java"
+USES+=		gnome
+USE_GNOME=	libxml2
+.endif
 .else
 USE_RC_SUBR=		zabbix_${ZABBIX_BUILD}d
 .endif
 
-USES=		gnome iconv pkgconfig
-USE_GNOME=	libxml2
-
 USERS=		zabbix
 GROUPS=		zabbix
 
@@ -78,8 +82,8 @@ CPPFLAGS+=	-I${LOCALBASE}/include
 
 SUB_FILES=	pkg-message
 
-OPTIONS_DEFAULT+=	CURL FPING IPMI IPV6 LIBXML2 MYSQL OPENSSL SNMP SSH UNIXODBC
-OPTIONS_DEFINE=		CURL FPING IPMI IPV6 LDAP LIBXML2 NMAP SNMP SSH UNIXODBC
+OPTIONS_DEFAULT+=	CURL FPING IPMI IPV6 MYSQL OPENSSL SNMP SSH UNIXODBC
+OPTIONS_DEFINE=		CURL FPING IPMI IPV6 LDAP NMAP SNMP SSH UNIXODBC
 OPTIONS_SINGLE+=	DB SSL
 OPTIONS_SINGLE_DB=	MDB5 MDB6 MYSQL MYSQLDV PGSQL
 .if ${ZABBIX_BUILD} == "proxy"
@@ -95,7 +99,6 @@ NMAP_DESC=	Build/install nmap for o/s detection
 SNMP_DESC=	Support for SNMP checks
 SSH_DESC=	Support for SSH-based checks
 UNIXODBC_DESC=	Support for database checks via ODBC
-LIBXML2_DESC=	Support for libxml2 (required by monitoring VMware)
 MYSQL_DESC=	MySQL 8.0 database support
 MYSQLDV_DESC=	MYSQL DEFAULT_VERSIONS= (poudriere)