Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Aug 2023 23:40:42 GMT
From:      Muhammad Moinur Rahman <bofh@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: f893b345ec10 - main - devel/codeworker: Fix build with llvm16
Message-ID:  <202308072340.377Neg4f052254@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bofh:

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

commit f893b345ec10f024be122861b3ea0b439ce00fd1
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-08-07 23:24:47 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-08-07 23:24:47 +0000

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

diff --git a/devel/codeworker/Makefile b/devel/codeworker/Makefile
index ba8b10632a9a..d296f616ebe5 100644
--- a/devel/codeworker/Makefile
+++ b/devel/codeworker/Makefile
@@ -13,6 +13,7 @@ LICENSE=	LGPL21
 WRKSRC=		${WRKDIR}/CodeWorker${PORTVERSION:S/./_/g}
 
 USES=		dos2unix gmake zip
+USE_CXXSTD=	c++14
 MAKE_ARGS=	CC="${CXX}" CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" LFLAGS="-lm"
 ALL_TARGET=	build
 
@@ -20,11 +21,27 @@ CFLAGS+=	-Dstricmp=strcasecmp
 
 PLIST_FILES=	bin/codeworker
 
+.include <bsd.port.options.mk>
+
+.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302507 && ${OSVERSION} < 1400000 ))
+CFLAGS+=	-Wno-error=dynamic-exception-spec
+CPPFLAGS+=	-Wno-error=dynamic-exception-spec
+CXXFLAGS+=	-Wno-error=dynamic-exception-spec
+.endif
+
 post-patch:
 	@${FIND} ${WRKSRC} -name "*.cpp" -or -name "*.h" | ${XARGS} \
 		${REINPLACE_CMD} -e \
 		's|<features.h>|<cstdio>| ; \
 		 s|(__cplusplus) \&\&|(__cplusplus) // \&\&|'
+.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302507 && ${OSVERSION} < 1400000 ))
+	@${REINPLACE_CMD} -e 's|auto_ptr|unique_ptr|g' \
+		${WRKSRC}/CppParsingTree.cpp \
+		${WRKSRC}/CppParsingTree.h
+	@${REINPLACE_CMD} -E 's|throw\(UtlException\)|noexcept\(false\)|g' \
+		${WRKSRC}/CGRuntime.cpp \
+		${WRKSRC}/CGRuntime.h
+.endif
 
 do-install:
 	(cd ${WRKSRC} && ${INSTALL_PROGRAM} codeworker ${STAGEDIR}${PREFIX}/bin)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202308072340.377Neg4f052254>