git: 26fb50b82a5d - main - irc/znc: Improve and simplify port

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Tue, 24 Sep 2024 22:57:48 UTC
The branch main has been updated by diizzy:

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

commit 26fb50b82a5dab65dec324b8b50f6b8e3f48195d
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2024-09-24 22:53:27 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2024-09-24 22:53:29 +0000

    irc/znc: Improve and simplify port
    
    * Always build with ICU support
    * Remove DEBUG menu option, use ports framework instead
    * Always enable IPv6, kernel support is always enabled
    * Always enable Python module as Python is already a hard dependency
    * Do some small layout enhancements to port Makefile
    
    This also aligns it more with other distros that packages znc
    
    PR:             281346
    Approved by:    portmgr (maintainer timeout, 2+ weeks)
---
 irc/znc/Makefile  | 58 +++++++++++++++++++++++++++----------------------------
 irc/znc/pkg-plist | 22 ++++++++++-----------
 2 files changed, 39 insertions(+), 41 deletions(-)

diff --git a/irc/znc/Makefile b/irc/znc/Makefile
index f927d462d579..e6db2cc63c9d 100644
--- a/irc/znc/Makefile
+++ b/irc/znc/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	znc
 DISTVERSION=	1.9.1
+PORTREVISION=	1
 CATEGORIES=	irc
 MASTER_SITES=	https://znc.in/releases/ \
 		https://znc.in/releases/archive/
@@ -11,52 +12,49 @@ WWW=		https://wiki.znc.in/ZNC
 LICENSE=	APACHE20
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		compiler:c++17-lang cpe cmake:run iconv pathfix pkgconfig:both python
+BUILD_DEPENDS=	swig>=4.0.1:devel/swig
+LIB_DEPENDS=	libicuuc.so:devel/icu
 
+USES=		compiler:c++17-lang cpe cmake:run iconv pathfix \
+		perl5 pkgconfig:both python ssl
+USE_PERL5=	build
 USE_RC_SUBR=	znc
 
-SUB_FILES=	pkg-message
-
 USERS=		znc
 GROUPS=		znc
 
 PORTDOCS=	README.md
+SUB_FILES=	pkg-message
+
+CMAKE_ON=	WANT_ICU \
+		WANT_IPV6 \
+		WANT_OPENSSL \
+		WANT_PYTHON \
+		WANT_SWIG
+CMAKE_ARGS=	-DOPENSSL_ROOT_DIR=${OPENSSLBASE} \
+		-DWANT_PYTHON_VERSION:STRING=python-${PYTHON_VER}
 
-OPTIONS_DEFINE=		CHARSET CYRUS DEBUG DOCS IPV6 NLS OPENSSL PERL PYTHON TCL
-OPTIONS_DEFAULT=	CHARSET OPENSSL PERL PYTHON
+OPTIONS_DEFINE=		CYRUS DOCS NLS PERL TCL
+OPTIONS_DEFAULT=	PERL
 OPTIONS_SUB=		yes
 
-CHARSET_DESC=	Character encoding support via ICU
-CYRUS_DESC=	Cyrus SASL module
-DEBUG_DESC=	Debugging support
-PERL_DESC=	Perl scripting module
-PYTHON_DESC=	Python scripting module
-TCL_DESC=	Tcl scripting module
+CYRUS_DESC=		Cyrus SASL module
+PERL_DESC=		Perl scripting module
+PYTHON_DESC=		Python scripting module
+TCL_DESC=		Tcl scripting module
 
-CHARSET_CMAKE_BOOL=	WANT_ICU
-CHARSET_LIB_DEPENDS=	libicuuc.so:devel/icu
-CYRUS_CMAKE_BOOL=	WANT_CYRUS
 CYRUS_LIB_DEPENDS=	libsasl2.so:security/cyrus-sasl2
-DEBUG_VARS=		CMAKE_BUILD_TYPE=Debug
-IPV6_CMAKE_BOOL=	WANT_IPV6
-NLS_CMAKE_BOOL=		WANT_I18N
+CYRUS_CMAKE_BOOL=	WANT_CYRUS
+
 NLS_LIB_DEPENDS=	libboost_locale.so:devel/boost-libs
 NLS_USES=		gettext
-OPENSSL_CMAKE_BOOL=	WANT_OPENSSL
-OPENSSL_CMAKE_ON=	-DOPENSSL_ROOT_DIR=${OPENSSLBASE}
-OPENSSL_USES=		ssl
-PERL_BUILD_DEPENDS=	swig>=4.0.1:devel/swig
+NLS_CMAKE_BOOL=		WANT_I18N
+
+PERL_USE=		perl5=run
 PERL_CMAKE_BOOL=	WANT_PERL WANT_SWIG
-PERL_USE=		perl5=build,run
-PERL_USES=		perl5
-PYTHON_CMAKE_BOOL=	WANT_PYTHON WANT_SWIG
-PYTHON_CMAKE_ON=	-DWANT_PYTHON_VERSION:STRING=python-${PYTHON_VER}
-PYTHON_BUILD_DEPENDS=	swig>=4.0.1:devel/swig
-PYTHON_IMPLIES=		CHARSET
-PYTHON_USE=		perl5=build
-PYTHON_USES=		perl5
-TCL_CMAKE_BOOL=		WANT_TCL
+
 TCL_USES=		tcl
+TCL_CMAKE_BOOL=		WANT_TCL
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|python3|python${PYTHON_VER}|g' \
diff --git a/irc/znc/pkg-plist b/irc/znc/pkg-plist
index 5ce15f3b4450..92286676a520 100644
--- a/irc/znc/pkg-plist
+++ b/irc/znc/pkg-plist
@@ -1054,22 +1054,22 @@ share/man/man1/znc.1.gz
 %%NLS%%%%DATADIR%%/translations/pt-PT
 %%NLS%%%%DATADIR%%/translations/ru-RU
 %%NLS%%%%DATADIR%%/translations/tr-TR
-%%OPENSSL%%lib/znc/awaystore.so
-%%OPENSSL%%lib/znc/cert.so
-%%OPENSSL%%lib/znc/certauth.so
-%%OPENSSL%%lib/znc/crypt.so
-%%OPENSSL%%lib/znc/savebuff.so
-%%OPENSSL%%lib/znc/schat.so
+lib/znc/awaystore.so
+lib/znc/cert.so
+lib/znc/certauth.so
+lib/znc/crypt.so
+lib/znc/savebuff.so
+lib/znc/schat.so
 %%PERL%%lib/znc/modperl.so
 %%PERL%%lib/znc/modperl/startup.pl
 %%PERL%%lib/znc/modperl/ZNC.pm
 %%PERL%%lib/znc/modperl/ZNC.so
 %%PERL%%lib/znc/perleval.pm
-%%PYTHON%%lib/znc/pyeval.py
-%%PYTHON%%lib/znc/modpython.so
-%%PYTHON%%lib/znc/modpython/_znc_core.so
-%%PYTHON%%lib/znc/modpython/znc_core.py
-%%PYTHON%%lib/znc/modpython/znc.py
+lib/znc/pyeval.py
+lib/znc/modpython.so
+lib/znc/modpython/_znc_core.so
+lib/znc/modpython/znc_core.py
+lib/znc/modpython/znc.py
 %%TCL%%lib/znc/modtcl.so
 %%TCL%%%%DATADIR%%/modtcl/binds.tcl
 %%TCL%%%%DATADIR%%/modtcl/modtcl.tcl