diff --git a/dev-util/cppcheck/cppcheck-2.17.1.recipe b/dev-util/cppcheck/cppcheck-2.17.1.recipe index 2cd52996c..a1f4f7467 100644 --- a/dev-util/cppcheck/cppcheck-2.17.1.recipe +++ b/dev-util/cppcheck/cppcheck-2.17.1.recipe @@ -10,7 +10,7 @@ Features: HOMEPAGE="http://cppcheck.sourceforge.io/" COPYRIGHT="2007-2025 the Cppcheck team" LICENSE="GNU GPL v3" -REVISION="1" +REVISION="2" SOURCE_URI="https://github.com/danmar/cppcheck/archive/$portVersion.tar.gz" CHECKSUM_SHA256="bfd681868248ec03855ca7c2aea7bcb1f39b8b18860d76aec805a92a967b966c" SOURCE_FILENAME="cppcheck-$portVersion.tar.gz" diff --git a/dev-util/cppcheck/patches/cppcheck-2.17.1.patchset b/dev-util/cppcheck/patches/cppcheck-2.17.1.patchset new file mode 100644 index 000000000..b957ba90f --- /dev/null +++ b/dev-util/cppcheck/patches/cppcheck-2.17.1.patchset @@ -0,0 +1,81 @@ +From fdbcdcfd5e0de75a99451eff7aecc3f1384b9cfe Mon Sep 17 00:00:00 2001 +From: Luc Schrijvers +Date: Wed, 30 Apr 2025 08:59:19 +0200 +Subject: Fix build error for tests + + +diff --git a/test/signal/test-signalhandler.cpp b/test/signal/test-signalhandler.cpp +index a3e77b0..65568a3 100644 +--- a/test/signal/test-signalhandler.cpp ++++ b/test/signal/test-signalhandler.cpp +@@ -52,7 +52,7 @@ + ++*(int*)nullptr; + } + +-#if !defined(__APPLE__) ++#if !defined(__APPLE__) && !defined(__HAIKU__) + /*static*/ int my_fpe() // NOLINT(misc-use-internal-linkage) + { + if (feenableexcept(FE_ALL_EXCEPT) == -1) +@@ -78,7 +78,7 @@ int main(int argc, const char * const argv[]) + my_abort(); + else if (strcmp(argv[1], "segv") == 0) + my_segv(); +-#if !defined(__APPLE__) ++#if !defined(__APPLE__) && !defined(__HAIKU__) + else if (strcmp(argv[1], "fpe") == 0) + return my_fpe(); + #endif +-- +2.48.1 + + +From a20e0f838202907d0dd5b2df6ae74e2469d45319 Mon Sep 17 00:00:00 2001 +From: Joachim Reichel +Date: Wed, 30 Apr 2025 10:58:42 +0200 +Subject: Install the translations in /lang instead of /usr/bin + + +diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt +index 1c1818c..153d283 100644 +--- a/gui/CMakeLists.txt ++++ b/gui/CMakeLists.txt +@@ -85,7 +85,7 @@ CheckOptions: + endif() + + install(TARGETS cppcheck-gui RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications) +- install(FILES ${qms} DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications) ++ install(FILES ${qms} DESTINATION ${FILESDIR}/lang COMPONENT applications) + + install(FILES cppcheck-gui.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications) + +-- +2.48.1 + + +From aec79ec473596aef68e2359248f4769358654188 Mon Sep 17 00:00:00 2001 +From: Joachim Reichel +Date: Wed, 30 Apr 2025 11:00:26 +0200 +Subject: Set configuration directory and python version + + +diff --git a/gui/main.cpp b/gui/main.cpp +index 91bc9e7..e974aac 100644 +--- a/gui/main.cpp ++++ b/gui/main.cpp +@@ -60,6 +60,12 @@ int main(int argc, char *argv[]) + + auto* settings = new QSettings("Cppcheck", "Cppcheck-GUI", &app); + ++ // Set some default settings ++ if( settings->value("DATADIR", QString()).toString().isEmpty()) ++ settings->setValue("DATADIR", FILESDIR); ++ if( settings->value(SETTINGS_PYTHON_PATH, QString()).toString().isEmpty()) ++ settings->setValue(SETTINGS_PYTHON_PATH, QString("/usr/bin/python3")); ++ + // Set data dir.. + const QStringList args = QApplication::arguments(); + auto it = std::find_if(args.cbegin(), args.cend(), [](const QString& arg) { +-- +2.48.1 +