From 34b026b15a672161911b77b6d4921447e138ef4c Mon Sep 17 00:00:00 2001 From: Alexey Dokuchaev Date: Wed, 28 Jun 2023 10:14:20 +0000 Subject: [PATCH] Try to fix the build of four of my ports against Clang 16 It now defaults to ISO C++17 which does not allow `register' storage class specifier [-Wregister]. Reported by: pkg-fallout --- audio/deadbeef/Makefile | 7 +++---- devel/smooth/Makefile | 2 ++ graphics/fotoxx/Makefile | 2 +- misc/swissfileknife/Makefile | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/audio/deadbeef/Makefile b/audio/deadbeef/Makefile index b74c159bb0c8d..d6253a6b0f074 100644 --- a/audio/deadbeef/Makefile +++ b/audio/deadbeef/Makefile @@ -206,11 +206,10 @@ PLIST_SUB+= MP3="@comment " PLIST_SUB+= MP3="" .endif -.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400091 -CPPFLAGS+= -Dregister= -.endif - post-patch: + @${REINPLACE_CMD} -e 's,register ,,' \ + ${WRKSRC}/plugins/adplug/adplug/rix.cpp \ + ${WRKSRC}/plugins/adplug/libbinio/binio.cpp # Do not link to libsupc++ which may be PIC-unsafe (breaks 64-bit arches) @${REINPLACE_CMD} -e 's, -lsupc++,,' \ ${WRKSRC}/plugins/adplug/Makefile.in \ diff --git a/devel/smooth/Makefile b/devel/smooth/Makefile index 6b404cfba9584..6efbd50613c97 100644 --- a/devel/smooth/Makefile +++ b/devel/smooth/Makefile @@ -23,6 +23,8 @@ USE_XORG= x11 MAKE_ARGS= config="systemlibcpuid systemlibwebp" post-extract: + @${REINPLACE_CMD} -e 's,register ,,' \ + ${WRKSRC}/classes/gui/dialogs/colordlg.cpp # Prevent accidental build/use of bundled libraries' code/headers @${RM} -r ${WRKSRC}/libraries/fribidi ${WRKSRC}/libraries/lib* \ ${WRKSRC}/libraries/v8 ${WRKSRC}/libraries/zlib diff --git a/graphics/fotoxx/Makefile b/graphics/fotoxx/Makefile index ca3855b6a0a56..20b198cdc883b 100644 --- a/graphics/fotoxx/Makefile +++ b/graphics/fotoxx/Makefile @@ -22,7 +22,7 @@ RUN_DEPENDS= xdg-open:devel/xdg-utils \ USES= desktop-file-utils gmake gnome jpeg pkgconfig USE_GNOME= cairo glib20 gdkpixbuf2 gtk30 ALL_TARGET= fotoxx -CXXFLAGS+= -Wno-writable-strings +CXXFLAGS+= -Wno-register -Wno-writable-strings WRKSRC= ${WRKDIR}/${PORTNAME} diff --git a/misc/swissfileknife/Makefile b/misc/swissfileknife/Makefile index 602e4c0d402e0..6abe7935a5bdd 100644 --- a/misc/swissfileknife/Makefile +++ b/misc/swissfileknife/Makefile @@ -26,6 +26,7 @@ post-patch: || defined(__FreeBSD__),' \ ${WRKSRC}/sfk.cpp ${WRKSRC}/sfkext.cpp @${REINPLACE_CMD} -e '/_STDINT_H/,+6d' ${WRKSRC}/sfkmatch.hpp + @${REINPLACE_CMD} -e 's,^ *register, ,' ${WRKSRC}/sfkpack.cpp post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR}