Compare commits
10 Commits
e0b6dc876c
...
bb72118e3b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb72118e3b | ||
|
|
02699de685 | ||
|
|
a7dc7bf87b | ||
|
|
e211c1324f | ||
|
|
9a79450896 | ||
|
|
4cd419d601 | ||
|
|
3479131696 | ||
|
|
33c34d30df | ||
|
|
d939205330 | ||
|
|
898695168f |
@ -1,16 +0,0 @@
|
|||||||
diff -up cppcheck-1.78/CMakeLists.txt.orig cppcheck-1.78/CMakeLists.txt
|
|
||||||
diff -up cppcheck-1.78/cmake/options.cmake.orig cppcheck-1.78/cmake/options.cmake
|
|
||||||
--- cppcheck-1.78/cmake/options.cmake.orig 2017-04-01 11:05:13.000000000 +0200
|
|
||||||
+++ cppcheck-1.78/cmake/options.cmake 2017-04-09 14:13:30.130818011 +0200
|
|
||||||
@@ -23,6 +23,11 @@ option(ANALYZE_DATAFLOW "Clang dynam
|
|
||||||
option(WARNINGS_ARE_ERRORS "Treat warnings as errors" OFF)
|
|
||||||
option(WARNINGS_ANSI_ISO "Issue all the mandatory diagnostics Listed in C standard" ON)
|
|
||||||
|
|
||||||
+option(CFGDIR "Configuration file directory" OFF)
|
|
||||||
+if(CFGDIR)
|
|
||||||
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCFG=${CFGDIR}")
|
|
||||||
+endif(CFGDIR)
|
|
||||||
+
|
|
||||||
set(USE_MATCHCOMPILER "Auto" CACHE STRING "Usage of match compliler")
|
|
||||||
set_property(CACHE USE_MATCHCOMPILER PROPERTY STRINGS Auto Off On Verify)
|
|
||||||
if (USE_MATCHCOMPILER STREQUAL "Auto")
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
diff -up cppcheck-1.81/gui/CMakeLists.txt.translations cppcheck-1.81/gui/CMakeLists.txt
|
|
||||||
--- cppcheck-1.81/gui/CMakeLists.txt.translations 2017-10-18 16:41:50.647580110 +0200
|
|
||||||
+++ cppcheck-1.81/gui/CMakeLists.txt 2017-10-18 16:42:38.432882931 +0200
|
|
||||||
@@ -27,7 +27,7 @@ if (BUILD_GUI)
|
|
||||||
qt5_use_modules(cppcheck-gui ${GUI_QT_COMPONENTS})
|
|
||||||
|
|
||||||
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 share/${PROJECT_NAME}/lang/ COMPONENT applications)
|
|
||||||
|
|
||||||
install(FILES cppcheck-gui.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
|
|
||||||
|
|
||||||
diff -up cppcheck-1.81/gui/translationhandler.cpp.translations cppcheck-1.81/gui/translationhandler.cpp
|
|
||||||
--- cppcheck-1.81/gui/translationhandler.cpp.translations 2017-10-07 23:11:39.000000000 +0200
|
|
||||||
+++ cppcheck-1.81/gui/translationhandler.cpp 2017-10-18 16:41:50.649580081 +0200
|
|
||||||
@@ -116,15 +116,7 @@ bool TranslationHandler::setLanguage(con
|
|
||||||
if (datadir.isEmpty())
|
|
||||||
datadir = appPath;
|
|
||||||
|
|
||||||
- QString translationFile;
|
|
||||||
- if (QFile::exists(datadir + "/lang/" + mTranslations[index].mFilename + ".qm"))
|
|
||||||
- translationFile = datadir + "/lang/" + mTranslations[index].mFilename + ".qm";
|
|
||||||
-
|
|
||||||
- else if (QFile::exists(datadir + "/" + mTranslations[index].mFilename + ".qm"))
|
|
||||||
- translationFile = datadir + "/" + mTranslations[index].mFilename + ".qm";
|
|
||||||
-
|
|
||||||
- else
|
|
||||||
- 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
|
|
||||||
@ -1,38 +0,0 @@
|
|||||||
diff -up cppcheck-1.83/cmake/findDependencies.cmake.qt5cmake cppcheck-1.83/cmake/findDependencies.cmake
|
|
||||||
--- cppcheck-1.83/cmake/findDependencies.cmake.qt5cmake 2018-04-02 09:02:50.000000000 +0200
|
|
||||||
+++ cppcheck-1.83/cmake/findDependencies.cmake 2018-06-02 16:50:28.656036644 +0200
|
|
||||||
@@ -1,6 +1,8 @@
|
|
||||||
if (BUILD_GUI)
|
|
||||||
- set(GUI_QT_COMPONENTS Core Gui Widgets PrintSupport)
|
|
||||||
- find_package(Qt5 COMPONENTS ${GUI_QT_COMPONENTS})
|
|
||||||
+ find_package(Qt5Core)
|
|
||||||
+ find_package(Qt5Gui)
|
|
||||||
+ find_package(Qt5Widgets)
|
|
||||||
+ find_package(Qt5PrintSupport)
|
|
||||||
find_package(Qt5LinguistTools)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
diff -up cppcheck-1.83/CMakeLists.txt.qt5cmake cppcheck-1.83/CMakeLists.txt
|
|
||||||
--- cppcheck-1.83/CMakeLists.txt.qt5cmake 2018-06-02 16:47:11.038242820 +0200
|
|
||||||
+++ cppcheck-1.83/CMakeLists.txt 2018-06-02 16:47:11.070242301 +0200
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
project(CppCheck)
|
|
||||||
-cmake_minimum_required(VERSION 2.8.4)
|
|
||||||
+cmake_minimum_required(VERSION 2.8.11)
|
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
|
||||||
|
|
||||||
diff -up cppcheck-1.83/gui/CMakeLists.txt.qt5cmake cppcheck-1.83/gui/CMakeLists.txt
|
|
||||||
--- cppcheck-1.83/gui/CMakeLists.txt.qt5cmake 2018-06-02 16:47:11.049242641 +0200
|
|
||||||
+++ cppcheck-1.83/gui/CMakeLists.txt 2018-06-02 16:47:24.622022436 +0200
|
|
||||||
@@ -24,8 +24,8 @@ if (BUILD_GUI)
|
|
||||||
target_link_libraries(cppcheck-gui pcre)
|
|
||||||
endif()
|
|
||||||
target_link_libraries(cppcheck-gui tinyxml2)
|
|
||||||
- qt5_use_modules(cppcheck-gui ${GUI_QT_COMPONENTS})
|
|
||||||
-
|
|
||||||
+ target_link_libraries(cppcheck-gui Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport)
|
|
||||||
+
|
|
||||||
install(TARGETS cppcheck-gui RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications)
|
|
||||||
install(FILES ${qms} DESTINATION share/${PROJECT_NAME}/lang/ COMPONENT applications)
|
|
||||||
|
|
||||||
@ -1,78 +0,0 @@
|
|||||||
--- cppcheck-1.83.orig/cli/CMakeLists.txt 2018-04-02 03:02:50.000000000 -0400
|
|
||||||
+++ cppcheck-1.83.orig/cli/CMakeLists.txt 2018-04-12 12:46:04.990212969 -0400
|
|
||||||
@@ -1,5 +1,4 @@
|
|
||||||
include_directories(${PROJECT_SOURCE_DIR}/lib/)
|
|
||||||
-include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/)
|
|
||||||
include_directories(${PROJECT_SOURCE_DIR}/externals/simplecpp/)
|
|
||||||
|
|
||||||
file(GLOB hdrs "*.h")
|
|
||||||
@@ -8,13 +7,14 @@
|
|
||||||
list(REMOVE_ITEM srcs ${mainfile})
|
|
||||||
|
|
||||||
add_library(cli_objs OBJECT ${hdrs} ${srcs})
|
|
||||||
-add_executable(cppcheck ${hdrs} ${mainfile} $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
|
||||||
+add_executable(cppcheck ${hdrs} ${mainfile} $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
|
||||||
if (HAVE_RULES)
|
|
||||||
target_link_libraries(cppcheck pcre)
|
|
||||||
endif()
|
|
||||||
if (MSVC)
|
|
||||||
target_link_libraries(cppcheck Shlwapi.lib)
|
|
||||||
endif()
|
|
||||||
+target_link_libraries(cppcheck tinyxml2)
|
|
||||||
|
|
||||||
install(TARGETS cppcheck
|
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
|
|
||||||
--- cppcheck-1.83.orig/CMakeLists.txt 2018-04-02 03:02:50.000000000 -0400
|
|
||||||
+++ cppcheck-1.83.orig/CMakeLists.txt 2018-04-12 12:45:04.959219411 -0400
|
|
||||||
@@ -16,7 +16,6 @@
|
|
||||||
enable_testing()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
-add_subdirectory(externals/tinyxml)
|
|
||||||
add_subdirectory(externals/simplecpp)
|
|
||||||
add_subdirectory(lib) # CppCheck Library
|
|
||||||
add_subdirectory(cli) # Client application
|
|
||||||
--- cppcheck-1.83.orig/gui/CMakeLists.txt 2018-04-02 03:02:50.000000000 -0400
|
|
||||||
+++ cppcheck-1.83.orig/gui/CMakeLists.txt 2018-04-12 12:45:04.959219411 -0400
|
|
||||||
@@ -10,7 +10,6 @@
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include_directories(${PROJECT_SOURCE_DIR}/lib/)
|
|
||||||
- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/)
|
|
||||||
|
|
||||||
file(GLOB hdrs "*.h")
|
|
||||||
file(GLOB srcs "*.cpp")
|
|
||||||
@@ -20,10 +19,11 @@
|
|
||||||
QT5_ADD_RESOURCES(resources "gui.qrc")
|
|
||||||
QT5_ADD_TRANSLATION(qms ${tss})
|
|
||||||
|
|
||||||
- add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
|
||||||
+ add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
|
||||||
if (HAVE_RULES)
|
|
||||||
target_link_libraries(cppcheck-gui pcre)
|
|
||||||
endif()
|
|
||||||
+ target_link_libraries(cppcheck-gui tinyxml2)
|
|
||||||
qt5_use_modules(cppcheck-gui ${GUI_QT_COMPONENTS})
|
|
||||||
|
|
||||||
install(TARGETS cppcheck-gui RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications)
|
|
||||||
--- cppcheck-1.83.orig/test/CMakeLists.txt 2018-04-02 03:02:50.000000000 -0400
|
|
||||||
+++ cppcheck-1.83.orig/test/CMakeLists.txt 2018-04-12 12:45:04.959219411 -0400
|
|
||||||
@@ -1,16 +1,16 @@
|
|
||||||
if (BUILD_TESTS)
|
|
||||||
|
|
||||||
include_directories(${PROJECT_SOURCE_DIR}/lib/ ${PROJECT_SOURCE_DIR}/cli/)
|
|
||||||
- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml)
|
|
||||||
include_directories(${PROJECT_SOURCE_DIR}/externals/simplecpp/)
|
|
||||||
|
|
||||||
file(GLOB hdrs "*.h")
|
|
||||||
file(GLOB srcs "*.cpp")
|
|
||||||
|
|
||||||
- add_executable(testrunner ${hdrs} ${srcs} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
|
||||||
+ add_executable(testrunner ${hdrs} ${srcs} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
|
||||||
if (HAVE_RULES)
|
|
||||||
target_link_libraries(testrunner pcre)
|
|
||||||
endif()
|
|
||||||
+ target_link_libraries(testrunner tinyxml2)
|
|
||||||
|
|
||||||
add_custom_target(copy_cfg ALL
|
|
||||||
COMMENT "Copying cfg files")
|
|
||||||
Binary file not shown.
BIN
cppcheck-2.13.2.tar.gz
Normal file
BIN
cppcheck-2.13.2.tar.gz
Normal file
Binary file not shown.
32
cppcheck-2.2-translations.patch
Normal file
32
cppcheck-2.2-translations.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
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)
|
||||||
|
- install(FILES ${qms} DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications)
|
||||||
|
+ install(FILES ${qms} DESTINATION share/${PROJECT_NAME}/lang COMPONENT applications)
|
||||||
|
|
||||||
|
install(FILES cppcheck-gui.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
- QString translationFile;
|
||||||
|
- if (QFile::exists(datadir + "/lang/" + mTranslations[index].mFilename + ".qm"))
|
||||||
|
- translationFile = datadir + "/lang/" + mTranslations[index].mFilename + ".qm";
|
||||||
|
-
|
||||||
|
- else if (QFile::exists(datadir + "/" + mTranslations[index].mFilename + ".qm"))
|
||||||
|
- translationFile = datadir + "/" + mTranslations[index].mFilename + ".qm";
|
||||||
|
-
|
||||||
|
- else
|
||||||
|
- translationFile = appPath + "/" + mTranslations[index].mFilename + ".qm";
|
||||||
|
+ QString translationFile("/usr/share/Cppcheck/lang/" + mTranslations[index].mFilename + ".qm");
|
||||||
|
|
||||||
|
if (!mTranslator->load(translationFile)) {
|
||||||
|
failure = true;
|
||||||
@ -1,19 +1,19 @@
|
|||||||
Name: cppcheck
|
Name: cppcheck
|
||||||
Version: 1.83
|
Version: 2.13.2
|
||||||
Release: 6
|
Release: 1
|
||||||
Summary: Tool for static C/C++ code analysis
|
Summary: Tool for static C/C++ code analysis
|
||||||
License: GPLv3+
|
License: GPL-3.0-or-later
|
||||||
URL: http://cppcheck.wiki.sourceforge.net/
|
URL: http://cppcheck.wiki.sourceforge.net/
|
||||||
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/danmar/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
Patch0000: cppcheck-1.83-tinyxml.patch
|
Patch0000: cppcheck-2.2-translations.patch
|
||||||
Patch0001: cppcheck-1.81-translations.patch
|
|
||||||
Patch0002: cppcheck-1.78-cfgdir.patch
|
|
||||||
Patch0003: cppcheck-1.83-cmake.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
|
Requires: python3-pygments python3-unversioned-command
|
||||||
Provides: %{name}-htmlreport = %{version}-%{release}
|
Provides: %{name}-htmlreport = %{version}-%{release}
|
||||||
Obsoletes: %{name}-htmlreport < %{version}-%{release}
|
Obsoletes: %{name}-htmlreport < %{version}-%{release}
|
||||||
|
|
||||||
@ -29,18 +29,18 @@ Documentation for cppcheck
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
rm -r externals/tinyxml
|
rm -r externals/tinyxml2
|
||||||
|
cd gui/help
|
||||||
|
qhelpgenerator-qt5 online-help.qhcp -o online-help.qhc
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%make_build DB2MAN=%{_datadir}/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl man
|
%make_build DB2MAN=%{_datadir}/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl man
|
||||||
xsltproc --nonet -o man/manual.html \
|
xsltproc --nonet -o man/manual.html %{_datadir}/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl man/manual-ja.docbook
|
||||||
%{_datadir}/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl \
|
|
||||||
man/manual.docbook
|
|
||||||
|
|
||||||
mkdir objdir-%{_target_platform}
|
mkdir objdir-%{_target_platform}
|
||||||
cd 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
|
%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 cppcheck
|
%make_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install -C objdir-%{_target_platform}
|
%make_install -C objdir-%{_target_platform}
|
||||||
@ -53,15 +53,32 @@ cd objdir-%{_target_platform}/bin
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%doc AUTHORS COPYING
|
%doc AUTHORS COPYING
|
||||||
%{_datadir}/CppCheck/
|
%{_datadir}/Cppcheck/
|
||||||
%{_bindir}/cppcheck
|
%{_bindir}/cppcheck
|
||||||
%{_bindir}/cppcheck-htmlreport
|
%{_bindir}/cppcheck-htmlreport
|
||||||
|
%exclude %{_libdir}/*
|
||||||
|
%exclude %{_usrsrc}/*
|
||||||
|
|
||||||
%files help
|
%files help
|
||||||
%doc man/manual.html
|
%doc man/manual.html
|
||||||
%{_mandir}/man1/cppcheck.1*
|
%{_mandir}/man1/cppcheck.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Feb 1 2024 liyanan <liyanan61@h-partners.com> - 2.13.2-1
|
||||||
|
- Upgrade to version 2.13.2.
|
||||||
|
|
||||||
|
* 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 <tc@openeuler.org> - 2.6.3-1
|
||||||
|
- Upgrade to version 2.6.3
|
||||||
|
|
||||||
|
* Tue Aug 10 2021 Shenmei Tu <tushenmei@huawei.com> - 1.83-8
|
||||||
|
- bugfix-SIGSTKSZ-not-constant.patch
|
||||||
|
|
||||||
|
* Thu Mar 04 2021 maminjie <maminjie1@huawei.com> - 1.83-7
|
||||||
|
- Add requires python3-unversioned-command to resolve compatibility
|
||||||
|
|
||||||
* Fri Sep 11 2020 wutao <wutao61@huawei.com> - 1.83-6
|
* Fri Sep 11 2020 wutao <wutao61@huawei.com> - 1.83-6
|
||||||
- change requires to python3
|
- change requires to python3
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user