From e4d330bbdc82f346bc31f109ebff0d71154362d0 Mon Sep 17 00:00:00 2001 From: Nuno Teixeira Date: Tue, 28 Mar 2023 11:46:13 +0100 Subject: [PATCH] devel/rgbds: Fix build with clang - yank _POSIX_C_SOURCE because it breaks the build See also: https://github.com/gbdev/rgbds/issues/1091 https://github.com/gbdev/rgbds/issues/1111 Reported by: danfe, gerald --- devel/rgbds/Makefile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/devel/rgbds/Makefile b/devel/rgbds/Makefile index 3685a85a54d7c..bd6d4fd332400 100644 --- a/devel/rgbds/Makefile +++ b/devel/rgbds/Makefile @@ -1,6 +1,6 @@ PORTNAME= rgbds DISTVERSION= 0.6.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel games MASTER_SITES= https://github.com/gbdev/rgbds/releases/download/v${DISTVERSION}/ @@ -14,14 +14,13 @@ LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libpng.so:graphics/png USES= bison compiler:c11 dos2unix pkgconfig -USE_GCC= yes # clang >10 fails to build, https://github.com/gbdev/rgbds/issues/1091 MAKE_ARGS= Q= # verbose builds WRKSRC= ${WRKDIR}/rgbds do-configure: -# yank _POSIX_C_SOURCE when there is no support for _ISOC11_SOURCE - @cd ${WRKSRC}; ${PRINTF} '#include \nint main(){static_assert(1, "");}' | \ - ${CC} -std=gnu11 -D_POSIX_C_SOURCE=200809L -D_ISOC11_SOURCE -xc - 2>/dev/null || \ - ${REINPLACE_CMD} 's,-D_POSIX_C_SOURCE=200809L,,' ${WRKSRC}/Makefile +# yank _POSIX_C_SOURCE because it breaks the build, see also: +# https://github.com/gbdev/rgbds/issues/1091 +# https://github.com/gbdev/rgbds/issues/1111 + ${REINPLACE_CMD} 's,-D_POSIX_C_SOURCE=200809L,,' ${WRKSRC}/Makefile .include