git: 29c816e91254 - main - devel/cppcheck: update 2.12.1 → 2.13.4

From: Dmitry Marakasov <amdmi3_at_FreeBSD.org>
Date: Tue, 27 Feb 2024 21:15:26 UTC
The branch main has been updated by amdmi3:

URL: https://cgit.FreeBSD.org/ports/commit/?id=29c816e91254421d2df96a97c4688d0896800db6

commit 29c816e91254421d2df96a97c4688d0896800db6
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2024-02-27 21:14:58 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2024-02-27 21:15:20 +0000

    devel/cppcheck: update 2.12.1 → 2.13.4
---
 devel/cppcheck/Makefile                             |  5 ++++-
 devel/cppcheck/distinfo                             |  6 +++---
 devel/cppcheck/files/patch-cli_cppcheckexecutor.cpp | 13 +++++++++++++
 devel/cppcheck/files/patch-test_testfilelister.cpp  | 11 +++++++++++
 devel/cppcheck/files/patch-test_testother.cpp       | 18 ++++++++++++++++++
 5 files changed, 49 insertions(+), 4 deletions(-)

diff --git a/devel/cppcheck/Makefile b/devel/cppcheck/Makefile
index e27a22f486fd..5fec5569fbf2 100644
--- a/devel/cppcheck/Makefile
+++ b/devel/cppcheck/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	cppcheck
-PORTVERSION=	2.12.1
+PORTVERSION=	2.13.4
 CATEGORIES=	devel
 
 MAINTAINER=	amdmi3@FreeBSD.org
@@ -58,6 +58,9 @@ 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
 
diff --git a/devel/cppcheck/distinfo b/devel/cppcheck/distinfo
index 0d6560fcceb6..196c3a5af8c6 100644
--- a/devel/cppcheck/distinfo
+++ b/devel/cppcheck/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1695753260
-SHA256 (danmar-cppcheck-2.12.1_GH0.tar.gz) = 2a3d4ba1179419612183ab3d6aed6d3b18be75e98cd6f138ea8e2020905dced2
-SIZE (danmar-cppcheck-2.12.1_GH0.tar.gz) = 3579702
+TIMESTAMP = 1709055380
+SHA256 (danmar-cppcheck-2.13.4_GH0.tar.gz) = d6ea064ebab76c6aa000795440479767d8d814dd29405918df4c1bbfcd6cb86c
+SIZE (danmar-cppcheck-2.13.4_GH0.tar.gz) = 3646131
diff --git a/devel/cppcheck/files/patch-cli_cppcheckexecutor.cpp b/devel/cppcheck/files/patch-cli_cppcheckexecutor.cpp
new file mode 100644
index 000000000000..03645dc3a08b
--- /dev/null
+++ b/devel/cppcheck/files/patch-cli_cppcheckexecutor.cpp
@@ -0,0 +1,13 @@
+--- cli/cppcheckexecutor.cpp.orig	2024-02-16 08:46:10 UTC
++++ cli/cppcheckexecutor.cpp
+@@ -64,6 +64,10 @@
+ #include <windows.h>
+ #endif
+ 
++#if !defined(WIN32) && !defined(__MINGW32__)
++#include <sys/wait.h> // WIFEXITETED and friends
++#endif
++
+ class CmdLineLoggerStd : public CmdLineLogger
+ {
+ public:
diff --git a/devel/cppcheck/files/patch-test_testfilelister.cpp b/devel/cppcheck/files/patch-test_testfilelister.cpp
new file mode 100644
index 000000000000..a02dbdbf18ce
--- /dev/null
+++ b/devel/cppcheck/files/patch-test_testfilelister.cpp
@@ -0,0 +1,11 @@
+--- test/testfilelister.cpp.orig	2024-02-16 08:46:10 UTC
++++ test/testfilelister.cpp
+@@ -43,7 +43,7 @@ class TestFileLister : public TestFixture { (private)
+ 
+     // TODO: generate file list instead
+     static std::string findBaseDir() {
+-        std::string basedir;
++        std::string basedir = "%%WRKSRC%%/";
+         while (!Path::isDirectory(Path::join(basedir, ".github"))) {
+             const std::string abspath = Path::getAbsoluteFilePath(basedir);
+             basedir += "../";
diff --git a/devel/cppcheck/files/patch-test_testother.cpp b/devel/cppcheck/files/patch-test_testother.cpp
new file mode 100644
index 000000000000..6ee71403f6f7
--- /dev/null
+++ b/devel/cppcheck/files/patch-test_testother.cpp
@@ -0,0 +1,18 @@
+--- test/testother.cpp.orig	2024-02-16 08:46:10 UTC
++++ test/testother.cpp
+@@ -2173,6 +2173,7 @@ class TestOther : public TestFixture { (private)
+               "}\n");
+         ASSERT_EQUALS("[test.cpp:1]: (performance) Function parameter 't' should be passed by const reference.\n", errout.str());
+ 
++#ifndef __i386__
+         check("struct S {\n" // #12138
+               "    union {\n"
+               "        int a = 0;\n"
+@@ -2191,6 +2192,7 @@ class TestOther : public TestFixture { (private)
+               "    if (s.x > s.y) {}\n"
+               "}\n");
+         ASSERT_EQUALS("", errout.str());
++#endif
+ 
+         check("struct S { std::list<int> l; };\n" // #12147
+               "class C { public: std::list<int> l; };\n"