From 24b64980f86181441847d6f82a336eb7fafa5f03 Mon Sep 17 00:00:00 2001 From: Steve Grubb Date: Thu, 22 Jun 2023 16:30:26 -0400 Subject: [PATCH] Update to 2.11 --- .gitignore | 1 + cppcheck-1.88-htmlreport-python3.patch | 27 ------------------- ....patch => cppcheck-2.11-translations.patch | 20 +++++++------- cppcheck-2.11-versions.patch | 12 +++++++++ cppcheck.spec | 19 +++++++------ sources | 2 +- 6 files changed, 35 insertions(+), 46 deletions(-) delete mode 100644 cppcheck-1.88-htmlreport-python3.patch rename cppcheck-2.2-translations.patch => cppcheck-2.11-translations.patch (59%) create mode 100644 cppcheck-2.11-versions.patch diff --git a/.gitignore b/.gitignore index 40d15a3..de097af 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,4 @@ cppcheck-1.44.tar.bz2 /cppcheck-2.8.tar.gz /cppcheck-2.8.2.tar.gz /cppcheck-2.9.tar.gz +/cppcheck-2.11.tar.gz diff --git a/cppcheck-1.88-htmlreport-python3.patch b/cppcheck-1.88-htmlreport-python3.patch deleted file mode 100644 index 7bca2b7..0000000 --- a/cppcheck-1.88-htmlreport-python3.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -up cppcheck-1.88/htmlreport/cppcheck-htmlreport.python3 cppcheck-1.88/htmlreport/cppcheck-htmlreport ---- cppcheck-1.88/htmlreport/cppcheck-htmlreport.python3 2019-06-29 09:51:25.000000000 +0200 -+++ cppcheck-1.88/htmlreport/cppcheck-htmlreport 2019-08-14 11:02:23.791627296 +0200 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - - from __future__ import unicode_literals - -diff -up cppcheck-1.88/htmlreport/setup.py.python3 cppcheck-1.88/htmlreport/setup.py ---- cppcheck-1.88/htmlreport/setup.py.python3 2019-06-29 09:51:25.000000000 +0200 -+++ cppcheck-1.88/htmlreport/setup.py 2019-08-14 11:02:28.570423533 +0200 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - - from setuptools import setup - -diff -up cppcheck-1.88/htmlreport/test_htmlreport.py.python3 cppcheck-1.88/htmlreport/test_htmlreport.py ---- cppcheck-1.88/htmlreport/test_htmlreport.py.python3 2019-06-29 09:51:25.000000000 +0200 -+++ cppcheck-1.88/htmlreport/test_htmlreport.py 2019-08-14 11:02:20.296776345 +0200 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - """Test cppcheck-htmlreport.""" - - import os diff --git a/cppcheck-2.2-translations.patch b/cppcheck-2.11-translations.patch similarity index 59% rename from cppcheck-2.2-translations.patch rename to cppcheck-2.11-translations.patch index 796d078..413c93e 100644 --- a/cppcheck-2.2-translations.patch +++ b/cppcheck-2.11-translations.patch @@ -1,7 +1,7 @@ -diff -urp cppcheck-2.2.orig/gui/CMakeLists.txt cppcheck-2.2/gui/CMakeLists.txt ---- cppcheck-2.2.orig/gui/CMakeLists.txt 2020-10-03 11:05:53.000000000 +0200 -+++ cppcheck-2.2/gui/CMakeLists.txt 2020-10-04 07:18:23.309796000 +0200 -@@ -40,7 +40,7 @@ if (BUILD_GUI) +diff -urp cppcheck-2.11.orig/gui/CMakeLists.txt cppcheck-2.11/gui/CMakeLists.txt +--- cppcheck-2.11.orig/gui/CMakeLists.txt 2023-06-22 05:07:56.000000000 -0400 ++++ cppcheck-2.11/gui/CMakeLists.txt 2023-06-22 15:34:50.096373560 -0400 +@@ -70,7 +70,7 @@ CheckOptions: endif() install(TARGETS cppcheck-gui RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications) @@ -10,10 +10,10 @@ diff -urp cppcheck-2.2.orig/gui/CMakeLists.txt cppcheck-2.2/gui/CMakeLists.txt install(FILES cppcheck-gui.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications) -diff -urp cppcheck-2.2.orig/gui/translationhandler.cpp cppcheck-2.2/gui/translationhandler.cpp ---- cppcheck-2.2.orig/gui/translationhandler.cpp 2020-10-03 11:05:53.000000000 +0200 -+++ cppcheck-2.2/gui/translationhandler.cpp 2020-10-04 07:19:44.765892500 +0200 -@@ -113,15 +113,7 @@ bool TranslationHandler::setLanguage(con +diff -urp cppcheck-2.11.orig/gui/translationhandler.cpp cppcheck-2.11/gui/translationhandler.cpp +--- cppcheck-2.11.orig/gui/translationhandler.cpp 2023-06-22 05:07:56.000000000 -0400 ++++ cppcheck-2.11/gui/translationhandler.cpp 2023-06-22 15:34:50.096373560 -0400 +@@ -99,15 +99,7 @@ bool TranslationHandler::setLanguage(con QString datadir = getDataDir(); @@ -28,5 +28,5 @@ diff -urp cppcheck-2.2.orig/gui/translationhandler.cpp cppcheck-2.2/gui/translat - translationFile = appPath + "/" + mTranslations[index].mFilename + ".qm"; + QString translationFile("/usr/share/Cppcheck/lang/" + mTranslations[index].mFilename + ".qm"); - if (!mTranslator->load(translationFile) && !failure) { - //If it failed, lets check if the default file exists + if (!mTranslator->load(translationFile)) { + failure = true; diff --git a/cppcheck-2.11-versions.patch b/cppcheck-2.11-versions.patch new file mode 100644 index 0000000..e7deeef --- /dev/null +++ b/cppcheck-2.11-versions.patch @@ -0,0 +1,12 @@ +diff -urp cppcheck-2.11.orig/cmake/versions.cmake cppcheck-2.11/cmake/versions.cmake +--- cppcheck-2.11.orig/cmake/versions.cmake 2023-06-22 05:07:56.000000000 -0400 ++++ cppcheck-2.11/cmake/versions.cmake 2023-06-22 15:43:59.383790291 -0400 +@@ -3,7 +3,7 @@ SET(VERSION "2.11") + STRING(REGEX MATCHALL "[0-9]+" VERSION_PARTS "${VERSION}") + LIST(GET VERSION_PARTS 0 VERSION_MAJOR) + LIST(GET VERSION_PARTS 1 VERSION_MINOR) +-LIST(GET VERSION_PARTS 2 VERSION_PATCH) ++#LIST(GET VERSION_PARTS 2 VERSION_PATCH) + SET(SOVERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") + + # Postfix of so's: diff --git a/cppcheck.spec b/cppcheck.spec index 49f4dbe..bc0663b 100644 --- a/cppcheck.spec +++ b/cppcheck.spec @@ -1,17 +1,17 @@ %undefine __cmake_in_source_build Name: cppcheck -Version: 2.9 -Release: 4%{?dist} +Version: 2.11 +Release: 1%{?dist} Summary: Tool for static C/C++ code analysis License: GPL-3.0 URL: http://cppcheck.wiki.sourceforge.net/ Source0: https://github.com/danmar/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz # Fix location of translations -Patch0: cppcheck-2.2-translations.patch -# Select python3 explicitly -Patch1: cppcheck-1.88-htmlreport-python3.patch +Patch0: cppcheck-2.11-translations.patch +# Cmake was erroring out with LIST index: 2 out of range (-2, 1) +Patch1: cppcheck-2.11-versions.patch BuildRequires: gcc-c++ BuildRequires: pcre-devel @@ -27,7 +27,7 @@ BuildRequires: python3-setuptools BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qttools-devel BuildRequires: qt5-linguist -BuildRequires: make +BuildRequires: make %description @@ -55,8 +55,8 @@ from xml files first generated using cppcheck. %prep %setup -q -%patch0 -p1 -b .translations -%patch1 -p1 -b .python3 +%patch -P0 -p1 -b .translations +%patch -P1 -p1 -b .python3 # Make sure bundled tinyxml2 is not used rm -r externals/tinyxml2 # Generate the Qt online-help file @@ -112,6 +112,9 @@ cd %{_vpath_builddir}/bin %{_bindir}/cppcheck-htmlreport %changelog +* Thu Jun 22 2023 Steve Grubb - 2.11-1 +- Update to 2.11 + * Thu Jan 19 2023 Fedora Release Engineering - 2.9-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/sources b/sources index 0999ab9..7d775b6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cppcheck-2.9.tar.gz) = 69204a7ceac087470201482894e6422b99d0849f08641e80b2e341c9d164a1d2095e3a08a1fba2e9fa681783d07fe7277b30ea0cc0bf582431b5d13ab2f58c1f +SHA512 (cppcheck-2.11.tar.gz) = 04e558f5cf75af6383757106b9d777dce724db134b73db71d2f0b4f428ca0ca79fc94ce1d3e88a5dd7985d093e9a4163f05679b4b37ccf3e7405f68e439d7fd6