git: c34f92ae7950 - main - mail/cyrus-imapd34: disable http and https services in cyrus.conf, when HTTP is not enabled

From: Hajimu UMEMOTO <ume_at_FreeBSD.org>
Date: Sun, 10 Apr 2022 04:46:54 UTC
The branch main has been updated by ume:

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

commit c34f92ae7950c05dd13b1286cac07414f503ab1d
Author:     Hajimu UMEMOTO <ume@FreeBSD.org>
AuthorDate: 2022-04-10 04:45:04 +0000
Commit:     Hajimu UMEMOTO <ume@FreeBSD.org>
CommitDate: 2022-04-10 04:45:04 +0000

    mail/cyrus-imapd34: disable http and https services in cyrus.conf, when HTTP is not enabled
    
    PR:             263168
---
 mail/cyrus-imapd34/Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/mail/cyrus-imapd34/Makefile b/mail/cyrus-imapd34/Makefile
index 4e65663a74a2..21ae2fd10255 100644
--- a/mail/cyrus-imapd34/Makefile
+++ b/mail/cyrus-imapd34/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	cyrus-imapd
 PORTVERSION=	3.4.3
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	mail
 MASTER_SITES=	https://github.com/cyrusimap/cyrus-imapd/releases/download/${PORTNAME}-${PORTVERSION}/
 PKGNAMESUFFIX=	${CYRUS_IMAPD_VER}
@@ -166,6 +166,8 @@ CYRUS_PERL_MAN3=Cyrus::Annotator::Daemon Cyrus::Annotator::Message \
 
 INSTALL_TARGET=	install-strip
 
+REINPLACE_ARGS=	-i ''
+
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MHTTP} || ${PORT_OPTIONS:MSQLITE}
@@ -217,6 +219,10 @@ post-install:
 	${SED} -e 's,/run/cyrus/socket,/var/imap/socket,' \
 		${WRKSRC}/doc/examples/cyrus_conf/normal.conf \
 		> ${STAGEDIR}${EXAMPLESDIR}/cyrus.conf
+.if !${PORT_OPTIONS:MHTTP}
+	${REINPLACE_CMD} -e 's/^\(  http\)/#\1/' \
+		${STAGEDIR}${EXAMPLESDIR}/cyrus.conf
+.endif
 .for f in mkimap masssievec translatesieve
 	${INSTALL_SCRIPT} ${WRKSRC}/tools/${f} \
 		${STAGEDIR}${CYRUS_PREFIX}/sbin/${f}