git: 71cc74d1f104 - main - mail/opendmarc: Add dns/public_suffix_list to RUN_DEPENDS

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Sun, 04 May 2025 23:13:37 UTC
The branch main has been updated by vvd:

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

commit 71cc74d1f1047c2124ea6f8751111c30dfa51295
Author:     Yasuhito FUTATSUKI <freebsd-bug-report-yf@yf.bsdclub.org>
AuthorDate: 2025-05-04 23:08:48 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2025-05-04 23:08:48 +0000

    mail/opendmarc: Add dns/public_suffix_list to RUN_DEPENDS
    
    OpenDMARC uses public_suffix_list.dat for checking organizational
    domains. Make public_suffix_list install automatically.
    
    PR:     280931
---
 mail/opendmarc/Makefile                                    |  9 +++++++--
 mail/opendmarc/files/patch-opendmarc_opendmarc.conf.sample | 10 ++++++++++
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/mail/opendmarc/Makefile b/mail/opendmarc/Makefile
index 078c9b8d52ef..e3064382bd2e 100644
--- a/mail/opendmarc/Makefile
+++ b/mail/opendmarc/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	opendmarc
 PORTVERSION=	1.4.2
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	mail security
 MASTER_SITES=	GH
 
@@ -14,7 +14,8 @@ LICENSE_COMB=	multi
 RUN_DEPENDS=	p5-Switch>=0:lang/p5-Switch \
 		p5-DBI>=0:databases/p5-DBI \
 		${DBD_MYSQL} \
-		p5-HTTP-Message>=0:www/p5-HTTP-Message
+		p5-HTTP-Message>=0:www/p5-HTTP-Message \
+		public_suffix_list>=0:dns/public_suffix_list
 
 USES=		cpe libtool mysql perl5 shebangfix autoreconf
 LICENSE_FILE_SENDMAIL=	${WRKSRC}/LICENSE.Sendmail
@@ -55,6 +56,10 @@ PORTDOCS=	*
 .include "${PORTSDIR}/mail/sendmail/bsd.milter.mk"
 CONFIGURE_ARGS+=	--with-milter=${MILTERBASE}
 
+post-patch:
+	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
+		${WRKSRC}/opendmarc/opendmarc.conf.sample
+
 post-install:
 	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/mail
 	${INSTALL_DATA} \
diff --git a/mail/opendmarc/files/patch-opendmarc_opendmarc.conf.sample b/mail/opendmarc/files/patch-opendmarc_opendmarc.conf.sample
new file mode 100644
index 000000000000..96c7f823d274
--- /dev/null
+++ b/mail/opendmarc/files/patch-opendmarc_opendmarc.conf.sample
@@ -0,0 +1,10 @@
+--- opendmarc/opendmarc.conf.sample.orig	2021-12-20 06:40:37 UTC
++++ opendmarc/opendmarc.conf.sample
+@@ -294,6 +294,7 @@
+ ##  One location to retrieve the file from is https://publicsuffix.org/list/
+ #
+ # PublicSuffixList path
++PublicSuffixList %%PREFIX%%/share/public_suffix_list/public_suffix_list.dat
+ 
+ ##  RecordAllMessages { true | false }
+ ##  	default "false"