diff --git a/2.6.3.tar.gz b/2.6.3.tar.gz deleted file mode 100644 index 9898b5e..0000000 Binary files a/2.6.3.tar.gz and /dev/null differ 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.11.1-versions.patch b/cppcheck-2.11.1-versions.patch new file mode 100644 index 0000000..e7deeef --- /dev/null +++ b/cppcheck-2.11.1-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-2.11.1.tar.gz b/cppcheck-2.11.1.tar.gz new file mode 100644 index 0000000..d86c83b Binary files /dev/null and b/cppcheck-2.11.1.tar.gz differ diff --git a/cppcheck-2.2-translations.patch b/cppcheck-2.2-translations.patch index 796d078..3811206 100644 --- a/cppcheck-2.2-translations.patch +++ b/cppcheck-2.2-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.1.orig/gui/CMakeLists.txt cppcheck-2.11.1/gui/CMakeLists.txt +--- cppcheck-2.11.1.orig/gui/CMakeLists.txt 2023-06-22 05:07:56.000000000 -0400 ++++ cppcheck-2.11.1/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.1.orig/gui/translationhandler.cpp cppcheck-2.11.1/gui/translationhandler.cpp +--- cppcheck-2.11.1.orig/gui/translationhandler.cpp 2023-06-22 05:07:56.000000000 -0400 ++++ cppcheck-2.11.1/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.5-disable-test-testexprengine-array7.patch b/cppcheck-2.5-disable-test-testexprengine-array7.patch deleted file mode 100644 index b810b30..0000000 --- a/cppcheck-2.5-disable-test-testexprengine-array7.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/test/testexprengine.cpp b/test/testexprengine.cpp -index f23671a3d..c6069b49c 100644 ---- a/test/testexprengine.cpp -+++ b/test/testexprengine.cpp -@@ -92,7 +92,7 @@ private: - TEST_CASE(array4); - TEST_CASE(array5); - TEST_CASE(array6); -- TEST_CASE(array7); -+ // TEST_CASE(array7); - TEST_CASE(arrayInit1); - TEST_CASE(arrayInit2); - TEST_CASE(arrayInit3); diff --git a/cppcheck.spec b/cppcheck.spec index e072bdb..86361f4 100644 --- a/cppcheck.spec +++ b/cppcheck.spec @@ -1,16 +1,18 @@ Name: cppcheck -Version: 2.6.3 +Version: 2.11.1 Release: 1 Summary: Tool for static C/C++ code analysis -License: GPLv3 and LPGL-3.0-only and MIT +License: GPL-3.0 URL: http://cppcheck.wiki.sourceforge.net/ -Source0: https://github.com/danmar/cppcheck/archive/refs/tags/2.6.3.tar.gz +Source0: https://github.com/danmar/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Patch0000: cppcheck-2.2-translations.patch -Patch0001: cppcheck-1.88-htmlreport-python3.patch -Patch0002: cppcheck-2.5-disable-test-testexprengine-array7.patch +Patch0001: cppcheck-2.11.1-versions.patch -BuildRequires: gcc-c++ pcre-devel docbook-style-xsl libxslt cmake desktop-file-utils tinyxml2-devel >= 2.1.0 +BuildRequires: gcc-c++ pcre-devel docbook-style-xsl libxslt cmake desktop-file-utils tinyxml2-devel >= 2.1.0 +BuildRequires: qt5-qtbase-devel +BuildRequires: qt5-qttools-devel +BuildRequires: qt5-linguist Requires: python3-pygments python3-unversioned-command Provides: %{name}-htmlreport = %{version}-%{release} @@ -28,6 +30,9 @@ Documentation for cppcheck %prep %autosetup -p1 +rm -r externals/tinyxml2 +cd gui/help +qhelpgenerator-qt5 online-help.qhcp -o online-help.qhc %build %make_build DB2MAN=%{_datadir}/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl man @@ -35,8 +40,8 @@ xsltproc --nonet -o man/manual.html %{_datadir}/sgml/docbook/xsl-stylesheets/xht mkdir objdir-%{_target_platform} cd objdir-%{_target_platform} -%cmake .. -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=1 -DBUILD_GUI=0 -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTS=1 -DCFGDIR=%{_datadir}/CppCheck -%make_build cppcheck +%cmake .. -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=1 -DUSE_MATCHCOMPILER=yes -DBUILD_GUI=0 -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTS=1 -DCFGDIR=%{_datadir}/CppCheck -DUSE_BUNDLED_TINYXML2=OFF -DENABLE_OSS_FUZZ=OFF +%make_build %install %make_install -C objdir-%{_target_platform} @@ -60,6 +65,9 @@ cd objdir-%{_target_platform}/bin %{_mandir}/man1/cppcheck.1* %changelog +* Tue Jul 25 2023 xu_ping <707078654@qq.com> - 2.11.1-1 +- Upgrade to version 2.11.1. + * Tue Jan 18 2022 SimpleUpdate Robot - 2.6.3-1 - Upgrade to version 2.6.3