aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2024-02-03 13:21:20 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-02-24 11:01:04 +0000
commit30a231f8eb872f67eac8514ba96da91cc4b9f44f (patch)
treef26b71454bde820e3ac8430496ef334d59dd8a96
parentcf2f634916f80515c353fa571eac5a7679b57827 (diff)
downloadports-30a231f8eb872f67eac8514ba96da91cc4b9f44f.tar.gz
ports-30a231f8eb872f67eac8514ba96da91cc4b9f44f.zip
devel/bossa: fix build with clang 18
Clang 18 has a new warning about variable length arrays used in C++, which is emitted when building devel/bossa: src/Flasher.cpp:115:28: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension] 115 | uint8_t buffer[bufferSize]; | ^~~~~~~~~~ src/Flasher.cpp:115:28: note: read of non-const variable 'bufferSize' is not allowed in a constant expression src/Flasher.cpp:114:22: note: declared here 114 | uint32_t bufferSize = _samba.writeBufferSize(); | ^ [... more of these ...] Since refactoring the code to no longer use VLAs is rather intrusive, suppress the warnings instead. While here, pet portlint. PR: 276804 Approved by: maintainer timeout (2 weeks) MFH: 2024Q1
-rw-r--r--devel/bossa/Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/devel/bossa/Makefile b/devel/bossa/Makefile
index ddffddb09b6c..9d0e48e37107 100644
--- a/devel/bossa/Makefile
+++ b/devel/bossa/Makefile
@@ -1,5 +1,6 @@
PORTNAME= bossa
PORTVERSION= 1.9.1
+PORTREVISION= 1
CATEGORIES= devel
MAINTAINER= kevans@FreeBSD.org
@@ -9,12 +10,12 @@ WWW= https://github.com/shumatech/BOSSA
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
+USES= compiler:c++11-lang gmake
+
USE_GITHUB= yes
GH_ACCOUNT= shumatech
GH_PROJECT= ${PORTNAME:tu}
-USES= compiler:c++11-lang gmake
-
CXXFLAGS+= -I${PREFIX}/include
LDFLAGS+= -L${PREFIX}/lib
@@ -32,6 +33,12 @@ BOSSASH_DESC= Include BOSSA Shell
BOSSASH_USES= readline
BOSSASH_ALL_TARGET= bin/bossash
+.include <bsd.port.pre.mk>
+
+.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 180
+CXXFLAGS+= -Wno-vla-cxx-extension
+.endif
+
post-extract:
${REINPLACE_CMD} -e 's/wx-config/$${WX_CONFIG}/' ${WRKSRC}/Makefile
@@ -44,4 +51,4 @@ do-install-BOSSA-on:
do-install-BOSSASH-on:
${INSTALL_PROGRAM} ${WRKSRC}/bin/bossash ${STAGEDIR}${PREFIX}/bin/bossash
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>