git: 19a56e6305c9 - main - devel/ice37: Fix build with llvm16

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Sun, 25 Jun 2023 21:43:16 UTC
The branch main has been updated by bofh:

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

commit 19a56e6305c9865203d71001e8b425e7fb318173
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-06-25 21:32:47 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-06-25 21:42:45 +0000

    devel/ice37: Fix build with llvm16
    
    Approved by:    portmgr (blanket)
    Sponsored by:   The FreeBSD Foundation
---
 devel/ice37/Makefile | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/devel/ice37/Makefile b/devel/ice37/Makefile
index 22c294cd64b8..306f2c099cb7 100644
--- a/devel/ice37/Makefile
+++ b/devel/ice37/Makefile
@@ -116,6 +116,23 @@ post-patch:
 		${WRKSRC}/scripts/Util.py
 	@${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g;' \
 		${WRKSRC}/scripts/Glacier2Util.py
+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400091
+	@${REINPLACE_CMD} -e 's|binary_function|__binary_function|g ; s|unary_function|__unary_function|g' \
+		${WRKSRC}/cpp/include/Ice/Proxy.h \
+		${WRKSRC}/cpp/include/IceUtil/Functional.h \
+		${WRKSRC}/cpp/src/IceGrid/AdapterCache.cpp \
+		${WRKSRC}/cpp/src/IceGrid/AllocatableObjectCache.cpp \
+		${WRKSRC}/cpp/src/IceGrid/Database.cpp \
+		${WRKSRC}/cpp/src/IceGrid/DescriptorHelper.cpp \
+		${WRKSRC}/cpp/src/IceGrid/NodeCache.cpp \
+		${WRKSRC}/cpp/src/IceGrid/ObjectCache.cpp \
+		${WRKSRC}/cpp/src/IceGrid/ServerCache.cpp \
+		${WRKSRC}/cpp/src/IceGrid/ServerI.cpp \
+		${WRKSRC}/cpp/src/IceGrid/Util.h \
+		${WRKSRC}/cpp/src/IcePatch2/Calc.cpp \
+		${WRKSRC}/cpp/src/IcePatch2Lib/Util.h \
+		${WRKSRC}/cpp/src/Slice/Parser.h
+.endif
 
 IS_JAILED_CMD=		${SYSCTL} -n security.jail.jailed
 JAILED_FILTER=		--rfilter=IceDiscovery \