git: a79ba32c2ce9 - main - x11-wm/subtle: Fix build with llvm16

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Sun, 06 Aug 2023 21:53:18 UTC
The branch main has been updated by bofh:

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

commit a79ba32c2ce95911b11dbb6e8143f74dd355444f
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-08-06 21:39:08 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-08-06 21:53:05 +0000

    x11-wm/subtle: Fix build with llvm16
    
    Approved by:    portmgr (blanket)
    Sponsored by:   The FreeBSD Foundation
---
 x11-wm/subtle/Makefile | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/x11-wm/subtle/Makefile b/x11-wm/subtle/Makefile
index 8b3515300900..3b0689645b29 100644
--- a/x11-wm/subtle/Makefile
+++ b/x11-wm/subtle/Makefile
@@ -19,14 +19,21 @@ MAKE_CMD=	rake -v
 MAKEFILE=	Rakefile
 ALL_TARGET=	build
 
+.include <bsd.port.pre.mk>
+
 post-patch:
 	@${REINPLACE_CMD} -e 1d ${WRKSRC}/data/subtler/runner.rb
 	@${REINPLACE_CMD} -e 's,File\.exists\?,File.exist?,' \
 		${WRKSRC}/data/sur/server.rb
 	@${REINPLACE_CMD} -e 's,/etc/xdg,${LOCALBASE}&,' \
 		${WRKSRC}/src/subtle/ruby.c
+.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 160
+	@${REINPLACE_CMD} -e '/cflags/s/-Wall/-Wall -Wno-error=incompatible-function-pointer-types /g' \
+		${WRKSRC}/Rakefile
+.endif
+
 
 do-configure:
 	@cd ${WRKSRC} && ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} config
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>