Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 May 2021 02:11:13 GMT
From:      Craig Leres <leres@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: e068ee22a21c - main - security/zeek: Add fine grained DEBUG options
Message-ID:  <202105110211.14B2BDFc021900@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by leres:

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

commit e068ee22a21c86db0ab3b5be1d15ff7d0cad3903
Author:     Craig Leres <leres@FreeBSD.org>
AuthorDate: 2021-05-11 02:09:19 +0000
Commit:     Craig Leres <leres@FreeBSD.org>
CommitDate: 2021-05-11 02:09:19 +0000

    security/zeek: Add fine grained DEBUG options
    
    Allow the user to pick from DEBUG, MINSIZEREL, RELEASE, and
    RELWITHDEBINFO options instead of just DEBUG. Don't STRIP with DEBUG
    or RELWITHDEBINFO. Make some minor whitespace changes suggested by
    portfmt.
---
 security/zeek/Makefile | 52 ++++++++++++++++++++++++++++++++++----------------
 1 file changed, 36 insertions(+), 16 deletions(-)

diff --git a/security/zeek/Makefile b/security/zeek/Makefile
index a77ecf53c0b5..55cc4261f6c2 100644
--- a/security/zeek/Makefile
+++ b/security/zeek/Makefile
@@ -14,13 +14,14 @@ LICENSE=	BSD3CLAUSE
 BROKEN_FreeBSD_11_powerpc64=	Does not build: error: zero-size array 'names'
 BROKEN_FreeBSD_12_powerpc64=	Does not build: error: zero-size array 'names'
 
-USES=		bison cmake compiler:c++11-lang gettext-runtime ninja perl5 python shebangfix ssl
+USES=		bison cmake compiler:c++11-lang gettext-runtime ninja perl5 \
+		python shebangfix ssl
 USE_LDCONFIG=	yes
 
 PORTSCOUT=	limit:0,even
 
 CXXFLAGS_powerpc64=	-mpower8-vector
-CMAKE_ARGS+=	-DPYTHON_EXECUTABLE:PATH=${PYTHON_CMD}
+CMAKE_ARGS+=		-DPYTHON_EXECUTABLE:PATH=${PYTHON_CMD}
 
 SHEBANG_FILES=	auxil/zeekctl/auxil/trace-summary/trace-summary
 
@@ -51,25 +52,32 @@ PLIST_SUB+=	ARCH=${UNAME_M} \
 USERS=		${ZEEKUSER}
 GROUPS=		${ZEEKGROUP}
 
-OPTIONS_DEFINE= BROKER DEBUG GEOIP2 IPSUMDUMP LBL_CF LBL_HF NETMAP \
-		PERFTOOLS ZEEKCTL
-OPTIONS_DEFAULT=BROKER GEOIP2 IPSUMDUMP LBL_CF LBL_HF NETMAP ZEEKCTL
-OPTIONS_SUB=	yes
+OPTIONS_DEFINE=	BROKER GEOIP2 IPSUMDUMP LBL_CF LBL_HF NETMAP PERFTOOLS ZEEKCTL
 
-BROKER_DESC=	Enable the Broker communication library
-GEOIP2_DESC=	Build with GeoIP2 (MaxMindDB) support
-IPSUMDUMP_DESC=	Enables traffic summaries
-LBL_CF_DESC=	Unix time to formated time/date filter support
-LBL_HF_DESC=	Address to hostname filter support
-NETMAP_DESC=	Native Netmap Packet IOSource for Zeek
-PERFTOOLS_DESC=	Use Perftools to improve memory & CPU usage
-ZEEKCTL_DESC=	ZeekControl support (implies BROKER and IPSUMDUMP)
+OPTIONS_SINGLE=			BUILD_TYPE
+OPTIONS_SINGLE_BUILD_TYPE=	DEBUG MINSIZEREL RELEASE RELWITHDEBINFO
 
-ZEEKCTL_IMPLIES=		BROKER IPSUMDUMP
+OPTIONS_DEFAULT=	BROKER GEOIP2 IPSUMDUMP LBL_CF LBL_HF NETMAP RELEASE \
+			ZEEKCTL
+OPTIONS_SUB=		yes
+
+BROKER_DESC=		Enable the Broker communication library
+DEBUG_DESC=		Optimizations off, debug symbols/flags on
+GEOIP2_DESC=		Build with GeoIP2 (MaxMindDB) support
+IPSUMDUMP_DESC=		Enables traffic summaries
+LBL_CF_DESC=		Unix time to formated time/date filter support
+LBL_HF_DESC=		Address to hostname filter support
+MINSIZEREL_DESC=	Optimizations on, debug symbols/flags off
+NETMAP_DESC=		Native Netmap Packet IOSource for Zeek
+PERFTOOLS_DESC=		Use Perftools to improve memory & CPU usage
+RELEASE_DESC=		Optimizations on, debug symbols/flags off
+RELWITHDEBINFO_DESC=	Optimizations/debug symbols on, debug flags off
+ZEEKCTL_DESC=		ZeekControl support (implies BROKER and IPSUMDUMP)
+
+ZEEKCTL_IMPLIES=	BROKER IPSUMDUMP
 
 BROKER_BUILD_DEPENDS=	swig:devel/swig
 BROKER_CMAKE_BOOL=	ENABLE_BROKER
-DEBUG_CMAKE_BOOL=	ENABLE_DEBUG
 GEOIP2_LIB_DEPENDS=	libmaxminddb.so:net/libmaxminddb
 IPSUMDUMP_BUILD_DEPENDS=ipsumdump:net/ipsumdump
 IPSUMDUMP_RUN_DEPENDS=	ipsumdump:net/ipsumdump
@@ -90,6 +98,18 @@ ZEEKCTL_RUN_DEPENDS=	${LOCALBASE}/bin/bash:shells/bash \
 
 .include <bsd.port.options.mk>
 
+.if ${PORT_OPTIONS:MDEBUG}
+CMAKE_BUILD_TYPE=	Debug
+STRIP=
+.elif ${PORT_OPTIONS:MMINSIZEREL}
+CMAKE_BUILD_TYPE=	MinSizeRel
+.elif ${PORT_OPTIONS:MRELEASE}
+CMAKE_BUILD_TYPE=	Release
+.elif ${PORT_OPTIONS:MRELWITHDEBINFO}
+CMAKE_BUILD_TYPE=	RelWithDebInfo
+STRIP=
+.endif
+
 .if ${PORT_OPTIONS:MZEEKCTL}
 USE_RC_SUBR=	zeek
 .endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105110211.14B2BDFc021900>