diff options
author | Nuno Teixeira <eduardo@FreeBSD.org> | 2023-03-28 10:46:13 +0000 |
---|---|---|
committer | Nuno Teixeira <eduardo@FreeBSD.org> | 2023-03-28 10:46:13 +0000 |
commit | e4d330bbdc82f346bc31f109ebff0d71154362d0 (patch) | |
tree | 4442e83f9ea234932ce61f2563f050584f563819 | |
parent | dcf820e2039dd759a3ac3156e4ffa3dfa4a9393c (diff) | |
download | ports-e4d330bbdc82f346bc31f109ebff0d71154362d0.tar.gz ports-e4d330bbdc82f346bc31f109ebff0d71154362d0.zip |
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
-rw-r--r-- | devel/rgbds/Makefile | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/devel/rgbds/Makefile b/devel/rgbds/Makefile index 3685a85a54d7..bd6d4fd33240 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 <assert.h>\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 <bsd.port.mk> |