git: 4ead580be1e6 - main - mail/milter-manager: Fix build with llvm16

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Wed, 02 Aug 2023 14:17:13 UTC
The branch main has been updated by bofh:

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

commit 4ead580be1e6fee95bba2636c8edcff351ca2067
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-08-02 13:39:16 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-08-02 14:16:42 +0000

    mail/milter-manager: Fix build with llvm16
    
    - Utilize USES=localbase
    
    Approved by:    portmgr (blanket)
    Sponsored by:   The FreeBSD Foundation
---
 mail/milter-manager/Makefile | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/mail/milter-manager/Makefile b/mail/milter-manager/Makefile
index 5c2e8efe80ba..16013a7a0d13 100644
--- a/mail/milter-manager/Makefile
+++ b/mail/milter-manager/Makefile
@@ -16,8 +16,8 @@ LIB_DEPENDS=	libev.so:devel/libev
 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 ruby
+USES=		compiler:c++11-lang gettext gmake gnome libtool localbase \
+		pathfix pkgconfig ruby
 USE_GNOME=	glib20 intltool
 USE_LDCONFIG=	yes
 USE_RC_SUBR=	milter-manager
@@ -30,18 +30,22 @@ CONFIGURE_ARGS=	--with-html-dir=${DOCSDIR} \
 INSTALL_TARGET=	install-strip
 
 CFLAGS+=	-fdeclspec
-CPPFLAGS+=	-I${LOCALBASE}/include
-LIBS+=		-L${LOCALBASE}/lib
 
 PORTDOCS=	*
 PORTEXAMPLES=	*
 
 OPTIONS_DEFINE=	DOCS EXAMPLES
 
+.include <bsd.port.pre.mk>
+
+.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 160
+CFLAGS+=	-Wno-error=incompatible-function-pointer-types
+.endif
+
 post-patch:
 	@${FIND} ${WRKSRC} -type f -name Makefile.in -exec \
 	${REINPLACE_CMD} -e "s#\$$(datadir)/@PACKAGE@#${DATADIR}#" \
 			 -e "s#\$$(datarootdir)/\$$(PACKAGE)#${DATADIR}#" {} +
 	@${REINPLACE_CMD} -e "s#\\\\\$$(pkgdatadir)/sample#${EXAMPLESDIR}#" ${WRKSRC}/configure
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>