diff --git a/devel/cppcheck/Makefile b/devel/cppcheck/Makefile index 365be3a3601e..b7dfd7f82843 100644 --- a/devel/cppcheck/Makefile +++ b/devel/cppcheck/Makefile @@ -1,80 +1,80 @@ PORTNAME= cppcheck -DISTVERSION= 2.21.0 +DISTVERSION= 2.21.1 CATEGORIES= devel MAINTAINER= amdmi3@FreeBSD.org COMMENT= Tool for static C/C++ code analysis WWW= https://cppcheck.sourceforge.io/ \ https://github.com/danmar/cppcheck LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libtinyxml2.so:textproc/tinyxml2 BUILD_DEPENDS= ${LOCALBASE}/include/boost/container/small_vector.hpp:devel/boost-libs USES= compiler:c++11-lib cpe shebangfix tar:bzip2 CPE_VENDOR= cppchecksolutions USE_GITHUB= yes GH_ACCOUNT= danmar SHEBANG_FILES= htmlreport/cppcheck-htmlreport CMAKE_OFF= USE_BUNDLED_TINYXML2 CMAKE_ON= USE_BOOST PORTDATA= * OPTIONS_DEFINE= RULES HTMLREPORT MANPAGES MATCHCOMPILER GUI CHARTS TEST OPTIONS_DEFAULT= RULES HTMLREPORT MANPAGES MATCHCOMPILER GUI OPTIONS_SUB= yes RULES_DESC= User-defined rule support (requires PCRE) RULES_CMAKE_BOOL= HAVE_RULES RULES_LIB_DEPENDS= libpcre.so:devel/pcre RULES_USES= localbase:ldflags TEST_CMAKE_BOOL= BUILD_TESTS BUILD_TESTING TEST_IMPLIES= GUI TEST_USES= cmake:testing TEST_USES_OFF= cmake HTMLREPORT_DESC= Install cppcheck-htmlreport HTMLREPORT_USES= python:${PYUSE:C/ /,/W} HTMLREPORT_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pygments>0:textproc/py-pygments@${PY_FLAVOR} HTMLREPORT_VARS= PYUSE+=run MANPAGES_BUILD_DEPENDS= xsltproc:textproc/libxslt \ ${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:textproc/docbook-xsl MATCHCOMPILER_DESC= Build-time optimizations via Python MATCHCOMPILER_CMAKE_ON= -DUSE_MATCHCOMPILER=On MATCHCOMPILER_CMAKE_OFF=-DUSE_MATCHCOMPILER=Off MATCHCOMPILER_USES= python:${PYUSE:C/ /,/W} MATCHCOMPILER_VARS= PYUSE+=build GUI_DESC= Build the Qt GUI application GUI_CMAKE_BOOL= BUILD_GUI GUI_USES= qt:6 GUI_USE= QT=base,tools:build CHARTS_DESC= Enable QtCharts usage in the GUI CHARTS_CMAKE_BOOL= WITH_QCHART CHARTS_IMPLIES= GUI CHARTS_USE= QT=charts post-patch: @${REINPLACE_CMD} -e 's|%%WRKSRC%%|${WRKSRC}|' ${WRKSRC}/test/testfilelister.cpp post-install-HTMLREPORT-on: ${INSTALL_SCRIPT} ${WRKSRC}/htmlreport/cppcheck-htmlreport ${STAGEDIR}${PREFIX}/bin post-build-MANPAGES-on: cd ${WRKSRC}/man && ${LOCALBASE}/bin/xsltproc --nonet --param man.charmap.use.subset "0" \ ${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl cppcheck.1.xml post-install-MANPAGES-on: ${INSTALL_MAN} ${WRKSRC}/man/cppcheck.1 ${STAGEDIR}${PREFIX}/share/man/man1 do-test-TEST-on: cd ${BUILD_WRKSRC} && ${SETENV} ${TEST_ENV} ctest .include diff --git a/devel/cppcheck/distinfo b/devel/cppcheck/distinfo index 64d3fa9b7091..1f330e7ba34a 100644 --- a/devel/cppcheck/distinfo +++ b/devel/cppcheck/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1780578101 -SHA256 (danmar-cppcheck-2.21.0_GH0.tar.gz) = f028ff75ca5372738f3737c8b3e8611426a6526b6aea2ef01301ab0f5902f044 -SIZE (danmar-cppcheck-2.21.0_GH0.tar.gz) = 4029561 +TIMESTAMP = 1788547749 +SHA256 (danmar-cppcheck-2.21.1_GH0.tar.gz) = ba750bd872ad7c01f951ff2d9dc8c68ea5852654545ec7a62a4c318d690c8e22 +SIZE (danmar-cppcheck-2.21.1_GH0.tar.gz) = 4029648 diff --git a/devel/cppcheck/files/patch-CMakeLists.txt b/devel/cppcheck/files/patch-CMakeLists.txt index 6e20ccc0962e..d797d12c4d6b 100644 --- a/devel/cppcheck/files/patch-CMakeLists.txt +++ b/devel/cppcheck/files/patch-CMakeLists.txt @@ -1,9 +1,9 @@ --- CMakeLists.txt.orig 2025-07-20 10:15:59 UTC +++ CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.13) --project(Cppcheck VERSION 2.21.0 LANGUAGES CXX) -+project(cppcheck VERSION 2.21.0 LANGUAGES CXX) +-project(Cppcheck VERSION 2.21.1 LANGUAGES CXX) ++project(cppcheck VERSION 2.21.1 LANGUAGES CXX) include(cmake/options.cmake) diff --git a/devel/cppcheck/files/patch-test_testcppcheck.cpp b/devel/cppcheck/files/patch-test_testcppcheck.cpp new file mode 100644 index 000000000000..4bd621deba95 --- /dev/null +++ b/devel/cppcheck/files/patch-test_testcppcheck.cpp @@ -0,0 +1,20 @@ +--- test/testcppcheck.cpp.orig 2026-06-20 16:49:32 UTC ++++ test/testcppcheck.cpp +@@ -597,7 +597,7 @@ class TestCppcheck : public TestFixture { (private) + + void purgedConfiguration() const + { +- ScopedFile test_file("test.cpp", ++ ScopedFile test_file("test_purged.cpp", + "#ifdef X\n" + "#endif\n" + "int main() {}\n"); +@@ -618,7 +618,7 @@ class TestCppcheck : public TestFixture { (private) + // the internal errorlist is cleared after each check() call + ASSERT_EQUALS(1, errorLogger.errmsgs.size()); + auto it = errorLogger.errmsgs.cbegin(); +- ASSERT_EQUALS("test.cpp:0:0: information: The configuration 'X=X' was not checked because its code equals another one. [purgedConfiguration]", ++ ASSERT_EQUALS("test_purged.cpp:0:0: information: The configuration 'X=X' was not checked because its code equals another one. [purgedConfiguration]", + it->toString(false, templateFormat, "")); + } +