git: 31d521a0740f - main - textproc/apertium: Fix build with llvm16

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Mon, 26 Jun 2023 12:16:17 UTC
The branch main has been updated by bofh:

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

commit 31d521a0740f7680ef3b266adfa1ba943f92d322
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-06-26 11:51:42 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-06-26 12:16:01 +0000

    textproc/apertium: Fix build with llvm16
    
    Sponsored by:   The FreeBSD Foundation
---
 textproc/apertium/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/textproc/apertium/Makefile b/textproc/apertium/Makefile
index 3e66788a38f9..0a7034a9fbae 100644
--- a/textproc/apertium/Makefile
+++ b/textproc/apertium/Makefile
@@ -44,4 +44,12 @@ INSTALL_TARGET=	install-strip
 
 CFLAGS+=	-I${LOCALBASE}/include/utf8cpp
 
+.include <bsd.port.options.mk>
+
+post-patch:
+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400091
+	@${REINPLACE_CMD} -e 's|std::unary_function|std::__unary_function|' \
+		${WRKSRC}/apertium/perceptron_spec.h
+.endif
+
 .include <bsd.port.mk>