aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuhammad Moinur Rahman <bofh@FreeBSD.org>2023-08-06 17:36:38 +0000
committerMuhammad Moinur Rahman <bofh@FreeBSD.org>2023-08-06 18:30:37 +0000
commit1be2301c64abd5c75520fc395246d1ca9bd931c1 (patch)
treebdf59c344f60d440ab7f8edee258a4845ed22a37
parent5ce30817806f36fb55b5ffee52f20802fdd7855a (diff)
downloadports-1be2301c64abd5c75520fc395246d1ca9bd931c1.tar.gz
ports-1be2301c64abd5c75520fc395246d1ca9bd931c1.zip
devel/ptlib: Fix build with llvm16
Approved by: portmgr (blanket) Sponsored by: The FreeBSD Foundation
-rw-r--r--devel/ptlib/Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/devel/ptlib/Makefile b/devel/ptlib/Makefile
index e53c9ca8c6c6..3d3a124ff396 100644
--- a/devel/ptlib/Makefile
+++ b/devel/ptlib/Makefile
@@ -117,8 +117,20 @@ CONFIGURE_ARGS+= --disable-dc
#PLIST_SUB+= DC1394="@comment "
#.endif
+.include <bsd.port.pre.mk>
+
+.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 160
+CPPFLAGS+= -Dregister= -Wno-error=dynamic-exception-spec
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's/RTF_WASCLONED/0x20000/' ${WRKSRC}/src/ptlib/unix/socket.cxx
+.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 160
+ @${REINPLACE_CMD} -e 's|auto_ptr|unique_ptr|' \
+ ${WRKSRC}/include/ptlib/psharedptr.h
+ @${REINPLACE_CMD} -e 's|public binary_function|public __binary_function|' \
+ ${WRKSRC}/include/ptlib/pprocess.h
+.endif
pre-configure:
(cd ${WRKSRC}/plugins/ && ${AUTORECONF} -fi)
@@ -135,4 +147,4 @@ post-install-DEBUG-on:
${LN} -sf libpt_d.so.${PORTVERSION} ${STAGEDIR}${PREFIX}/lib/libpt_d.so.${PVERSION_MAJOR}
${LN} -sf libpt_d.so.${PORTVERSION} ${STAGEDIR}${PREFIX}/lib/libpt_d.so.${PVERSION_MINOR}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>