diff options
author | Muhammad Moinur Rahman <bofh@FreeBSD.org> | 2023-08-07 23:24:47 +0000 |
---|---|---|
committer | Muhammad Moinur Rahman <bofh@FreeBSD.org> | 2023-08-07 23:24:47 +0000 |
commit | f893b345ec10f024be122861b3ea0b439ce00fd1 (patch) | |
tree | 793cd6f875c0075f51b17d462e2c4326ce80e842 | |
parent | 06e93734178c298a0f5392b21c40b26bc5fa7c52 (diff) | |
download | ports-f893b345ec10f024be122861b3ea0b439ce00fd1.tar.gz ports-f893b345ec10f024be122861b3ea0b439ce00fd1.zip |
devel/codeworker: Fix build with llvm16
Approved by: portmgr (blanket)
Sponsored by: The FreeBSD Foundation
-rw-r--r-- | devel/codeworker/Makefile | 17 |
1 files changed, 17 insertions, 0 deletions
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) |