git: 8cd078ded8e3 - main - security/cyrus-sasl2: Add OPIE option for FreeBSD 14 and later.

From: Hajimu UMEMOTO <ume_at_FreeBSD.org>
Date: Fri, 19 Jan 2024 18:04:43 UTC
The branch main has been updated by ume:

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

commit 8cd078ded8e3dd35a53c9499f4f7107b11cceeb0
Author:     Hajimu UMEMOTO <ume@FreeBSD.org>
AuthorDate: 2024-01-19 18:01:50 +0000
Commit:     Hajimu UMEMOTO <ume@FreeBSD.org>
CommitDate: 2024-01-19 18:04:24 +0000

    security/cyrus-sasl2: Add OPIE option for FreeBSD 14 and later.
    
    Reported by:    Jonathan Chen <jonc@chen.org.nz>
---
 security/cyrus-sasl2/Makefile        | 6 ++++--
 security/cyrus-sasl2/Makefile.common | 9 +++++++++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/security/cyrus-sasl2/Makefile b/security/cyrus-sasl2/Makefile
index 3cb484f52c9f..f9e59316137c 100644
--- a/security/cyrus-sasl2/Makefile
+++ b/security/cyrus-sasl2/Makefile
@@ -1,4 +1,4 @@
-PORTREVISION=	3
+PORTREVISION=	4
 
 COMMENT=	RFC 2222 SASL (Simple Authentication and Security Layer)
 WWW=		https://www.cyrusimap.org/sasl/
@@ -11,7 +11,8 @@ CYRUS_CONFIGURE_ARGS=	--with-saslauthd=${SASLAUTHD_RUNPATH}
 NO_OPTIONS_SORT=	yes
 OPTIONS_DEFINE=		ALWAYSTRUE AUTHDAEMOND DOCS KEEP_DB_OPEN \
 			OBSOLETE_CRAM_ATTR OBSOLETE_DIGEST_ATTR \
-			SASLDB_IN_VAR
+			OPIE SASLDB_IN_VAR
+OPTIONS_EXCLUDE_FreeBSD_13=	OPIE
 OPTIONS_RADIO=		SASLDB
 OPTIONS_RADIO_SASLDB=	BDB1 BDB GDBM LMDB
 OPTIONS_GROUP=		PLUGIN
@@ -30,6 +31,7 @@ OBSOLETE_CRAM_ATTR_DESC=cmusaslsecretCRAM-MD5 auxprop property
 OBSOLETE_CRAM_ATTR_CONFIGURE_OFF=--enable-obsolete_cram_attr=no
 OBSOLETE_DIGEST_ATTR_DESC=cmusaslsecretDIGEST-MD5 auxprop property
 OBSOLETE_DIGEST_ATTR_CONFIGURE_OFF=--enable-obsolete_digest_attr=no
+OPIE_DESC=		Use OPIE with OTP
 SASLDB_DESC=		SASLdb auxprop plugin
 BDB_USES=		bdb
 BDB_CONFIGURE_ON=	--with-dblib=berkeley \
diff --git a/security/cyrus-sasl2/Makefile.common b/security/cyrus-sasl2/Makefile.common
index 90f627525f40..604328fd8e03 100644
--- a/security/cyrus-sasl2/Makefile.common
+++ b/security/cyrus-sasl2/Makefile.common
@@ -102,6 +102,15 @@ SASLDB_NAME=	sasldb2
 SASLDB=	"@comment "
 .endif
 
+.if ${OPSYS} == FreeBSD && ${OSREL:R} >= 14
+.if ${PORT_OPTIONS:MOPIE} && ${PORT_OPTIONS:MOTP}
+CONFIGURE_ARGS+=--with-opie=${LOCALBASE}
+LIB_DEPENDS+=	libopie.so:security/opie
+.else
+CONFIGURE_ARGS+=--without-opie
+.endif
+.endif
+
 SUB_FILES=	pkg-deinstall pkg-install pkg-message
 SUB_LIST=	CYRUS_USER=${CYRUS_USER} CYRUS_GROUP=${CYRUS_GROUP} \
 		SASLDB_DIR=${SASLDB_DIR} SASLDB_NAME=${SASLDB_NAME}