git: d43ba09205cc - 2022Q3 - mail/milter-manager: Fix runtime error with Ruby 3.0 or later

From: Yasuhiro Kimura <yasu_at_FreeBSD.org>
Date: Tue, 16 Aug 2022 23:28:50 UTC
The branch 2022Q3 has been updated by yasu:

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

commit d43ba09205cc7a4c8469cd8ce9dcd4ed0e4f478d
Author:     Yasuhiro Kimura <yasu@FreeBSD.org>
AuthorDate: 2022-08-16 16:18:52 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2022-08-16 23:28:13 +0000

    mail/milter-manager: Fix runtime error with Ruby 3.0 or later
    
    milter-manager requires rexml to run. Since Ruby 3.0 rexml is
    converted to bundled gem. But our Ruby ports don't include bundled
    gems. So fix runtime error with Ruby 3.0 or later by adding rexml port
    to RUN_DEPENDS.
    
    While here, change post-patch target so it doesn't remove bundled
    glib2 gem. Build succeeds without doing it.
    
    Reference:      https://github.com/milter-manager/milter-manager/discussions/168
    Reported by:    Aoba Dai (in freebsd-users-jp ML)
    Tested by:      Aoba Dai
    MFH:            2022Q3
    
    (cherry picked from commit a5e4acb365ad6e78b9dc40107ef5dccf3863bb20)
---
 mail/milter-manager/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mail/milter-manager/Makefile b/mail/milter-manager/Makefile
index 19fc2fce4452..83af2354b418 100644
--- a/mail/milter-manager/Makefile
+++ b/mail/milter-manager/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	milter-manager
 DISTVERSION=	2.1.6
+PORTREVISION=	1
 CATEGORIES=	mail ruby
 MASTER_SITES=	https://github.com/${PORTNAME}/${PORTNAME}/releases/download/${DISTVERSION}/
 
@@ -13,7 +14,8 @@ LICENSE_COMB=	multi
 
 BUILD_DEPENDS=	rubygem-gio2>0:devel/rubygem-gio2
 LIB_DEPENDS=	libev.so:devel/libev
-RUN_DEPENDS=	rubygem-gio2>0:devel/rubygem-gio2
+RUN_DEPENDS=	rubygem-gio2>0:devel/rubygem-gio2 \
+		rubygem-rexml>0:textproc/rubygem-rexml
 
 USES=		compiler:c++11-lang gettext gmake gnome libtool pathfix \
 		pkgconfig
@@ -43,6 +45,5 @@ post-patch:
 	${REINPLACE_CMD} -e "s#\$$(datadir)/@PACKAGE@#${DATADIR}#" \
 			 -e "s#\$$(datarootdir)/\$$(PACKAGE)#${DATADIR}#" {} +
 	@${REINPLACE_CMD} -e "s#\\\\\$$(pkgdatadir)/sample#${EXAMPLESDIR}#" ${WRKSRC}/configure
-	@${RM} -r ${WRKSRC}/binding/ruby/glib-2.2.5
 
 .include <bsd.port.mk>