diff --git a/.gitignore b/.gitignore index d322cc2..9fc15b4 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ cppcheck-1.44.tar.bz2 /cppcheck-1.85.tar.gz /cppcheck-1.86.tar.gz /cppcheck-1.87.tar.gz +/cppcheck-1.88.tar.gz diff --git a/cppcheck-1.84-translations.patch b/cppcheck-1.84-translations.patch deleted file mode 100644 index 09a66a4..0000000 --- a/cppcheck-1.84-translations.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -urp cppcheck-1.84.orig/gui/CMakeLists.txt cppcheck-1.84/gui/CMakeLists.txt ---- cppcheck-1.84.orig/gui/CMakeLists.txt 2018-08-13 13:29:29.082264726 -0400 -+++ cppcheck-1.84/gui/CMakeLists.txt 2018-08-13 13:32:21.181246257 -0400 -@@ -26,7 +26,7 @@ if (BUILD_GUI) - target_link_libraries(cppcheck-gui tinyxml2 Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport) - - 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-1.84.orig/gui/translationhandler.cpp cppcheck-1.84/gui/translationhandler.cpp ---- cppcheck-1.84.orig/gui/translationhandler.cpp 2018-06-10 16:41:03.000000000 -0400 -+++ cppcheck-1.84/gui/translationhandler.cpp 2018-08-13 13:30:45.279256549 -0400 -@@ -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 diff --git a/cppcheck-1.87-tinyxml.patch b/cppcheck-1.87-tinyxml.patch deleted file mode 100644 index d20a6f2..0000000 --- a/cppcheck-1.87-tinyxml.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff -urp cppcheck-1.87.orig/cli/CMakeLists.txt cppcheck-1.87/cli/CMakeLists.txt ---- cppcheck-1.87.orig/cli/CMakeLists.txt 2019-02-09 03:31:27.000000000 -0500 -+++ cppcheck-1.87/cli/CMakeLists.txt 2019-02-09 13:31:37.543470390 -0500 -@@ -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,7 +7,7 @@ file(GLOB mainfile "main.cpp") - list(REMOVE_ITEM srcs ${mainfile}) - - add_library(cli_objs OBJECT ${hdrs} ${srcs}) --add_executable(cppcheck ${hdrs} ${mainfile} $ $ $ $) -+add_executable(cppcheck ${hdrs} ${mainfile} $ $ $) - if (HAVE_RULES) - find_library(PCRE_LIBRARY pcre) - target_link_libraries(cppcheck ${PCRE_LIBRARY}) -@@ -18,6 +17,7 @@ endif() - if (WIN32 AND NOT BORLAND) - target_link_libraries(cppcheck Shlwapi.lib) - endif() -+target_link_libraries(cppcheck tinyxml2) - - install(TARGETS cppcheck - RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} -diff -urp cppcheck-1.87.orig/CMakeLists.txt cppcheck-1.87/CMakeLists.txt ---- cppcheck-1.87.orig/CMakeLists.txt 2019-02-09 03:31:27.000000000 -0500 -+++ cppcheck-1.87/CMakeLists.txt 2019-02-09 13:30:01.410480706 -0500 -@@ -16,7 +16,6 @@ if (BUILD_TESTS) - enable_testing() - endif() - --add_subdirectory(externals/tinyxml) - add_subdirectory(externals/simplecpp) - add_subdirectory(lib) # CppCheck Library - add_subdirectory(cli) # Client application -diff -urp cppcheck-1.87.orig/gui/CMakeLists.txt cppcheck-1.87/gui/CMakeLists.txt ---- cppcheck-1.87.orig/gui/CMakeLists.txt 2019-02-09 03:31:27.000000000 -0500 -+++ cppcheck-1.87/gui/CMakeLists.txt 2019-02-09 13:30:01.410480706 -0500 -@@ -10,7 +10,6 @@ if (BUILD_GUI) - endif() - - include_directories(${PROJECT_SOURCE_DIR}/lib/) -- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/) - - file(GLOB hdrs "*.h") - file(GLOB srcs "*.cpp") -@@ -20,11 +19,11 @@ if (BUILD_GUI) - QT5_ADD_RESOURCES(resources "gui.qrc") - QT5_ADD_TRANSLATION(qms ${tss}) - -- add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $ $ $) -+ add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $ $) - if (HAVE_RULES) - target_link_libraries(cppcheck-gui pcre) - endif() -- target_link_libraries(cppcheck-gui Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport) -+ target_link_libraries(cppcheck-gui tinyxml2 Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport) - - install(TARGETS cppcheck-gui RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications) - install(FILES ${qms} DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications) -diff -urp cppcheck-1.87.orig/test/CMakeLists.txt cppcheck-1.87/test/CMakeLists.txt ---- cppcheck-1.87.orig/test/CMakeLists.txt 2019-02-09 03:31:27.000000000 -0500 -+++ cppcheck-1.87/test/CMakeLists.txt 2019-02-09 13:30:01.410480706 -0500 -@@ -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} $ $ $ $) -+ add_executable(testrunner ${hdrs} ${srcs} $ $ $) - if (HAVE_RULES) - target_link_libraries(testrunner pcre) - endif() -+ target_link_libraries(testrunner tinyxml2) - - add_custom_target(copy_cfg ALL - COMMENT "Copying cfg files") diff --git a/cppcheck-1.88-tinyxml.patch b/cppcheck-1.88-tinyxml.patch new file mode 100644 index 0000000..c51ce0e --- /dev/null +++ b/cppcheck-1.88-tinyxml.patch @@ -0,0 +1,84 @@ +diff -urp cppcheck-1.88.orig/cli/CMakeLists.txt cppcheck-1.88/cli/CMakeLists.txt +--- cppcheck-1.88.orig/cli/CMakeLists.txt 2019-06-29 03:51:25.000000000 -0400 ++++ cppcheck-1.88/cli/CMakeLists.txt 2019-07-01 20:38:10.056775258 -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,7 +7,7 @@ file(GLOB mainfile "main.cpp") + list(REMOVE_ITEM srcs ${mainfile}) + + add_library(cli_objs OBJECT ${hdrs} ${srcs}) +-add_executable(cppcheck ${hdrs} ${mainfile} $ $ $ $) ++add_executable(cppcheck ${hdrs} ${mainfile} $ $ $) + if (HAVE_RULES) + find_library(PCRE_LIBRARY pcre) + target_link_libraries(cppcheck ${PCRE_LIBRARY}) +@@ -18,6 +17,7 @@ endif() + if (WIN32 AND NOT BORLAND) + target_link_libraries(cppcheck Shlwapi.lib) + endif() ++target_link_libraries(cppcheck tinyxml2) + + install(TARGETS cppcheck + RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} +diff -urp cppcheck-1.88.orig/CMakeLists.txt cppcheck-1.88/CMakeLists.txt +--- cppcheck-1.88.orig/CMakeLists.txt 2019-06-29 03:51:25.000000000 -0400 ++++ cppcheck-1.88/CMakeLists.txt 2019-07-01 20:38:10.078775256 -0400 +@@ -19,7 +19,6 @@ if (BUILD_TESTS) + enable_testing() + endif() + +-add_subdirectory(externals/tinyxml) + add_subdirectory(externals/simplecpp) + add_subdirectory(lib) # CppCheck Library + add_subdirectory(cli) # Client application +diff -urp cppcheck-1.88.orig/gui/CMakeLists.txt cppcheck-1.88/gui/CMakeLists.txt +--- cppcheck-1.88.orig/gui/CMakeLists.txt 2019-06-29 03:51:25.000000000 -0400 ++++ cppcheck-1.88/gui/CMakeLists.txt 2019-07-01 20:41:48.862751778 -0400 +@@ -10,7 +10,6 @@ if (BUILD_GUI) + endif() + + include_directories(${PROJECT_SOURCE_DIR}/lib/) +- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/) + + file(GLOB hdrs "*.h") + file(GLOB srcs "*.cpp") +@@ -20,11 +19,11 @@ if (BUILD_GUI) + QT5_ADD_RESOURCES(resources "gui.qrc") + QT5_ADD_TRANSLATION(qms ${tss}) + +- add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $ $ $) ++ add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $ $) + if (HAVE_RULES) + target_link_libraries(cppcheck-gui pcre) + endif() +- target_link_libraries(cppcheck-gui Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport) ++ target_link_libraries(cppcheck-gui tinyxml2 Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport) + if(WITH_QCHART) + target_compile_definitions (cppcheck-gui PRIVATE HAVE_QCHART ) + target_link_libraries(cppcheck-gui Qt5::Charts) +diff -urp cppcheck-1.88.orig/test/CMakeLists.txt cppcheck-1.88/test/CMakeLists.txt +--- cppcheck-1.88.orig/test/CMakeLists.txt 2019-06-29 03:51:25.000000000 -0400 ++++ cppcheck-1.88/test/CMakeLists.txt 2019-07-01 20:43:12.299742824 -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} $ $ $ $) ++ add_executable(testrunner ${hdrs} ${srcs} $ $ $) + if (HAVE_RULES) + target_link_libraries(testrunner pcre) + endif() ++ target_link_libraries(testrunner tinyxml2) + + add_custom_target(copy_cfg ALL + COMMENT "Copying cfg files") diff --git a/cppcheck-1.88-translations.patch b/cppcheck-1.88-translations.patch new file mode 100644 index 0000000..70844c4 --- /dev/null +++ b/cppcheck-1.88-translations.patch @@ -0,0 +1,39 @@ +Only in cppcheck-1.88: .astylerc +Only in cppcheck-1.88: .codacy.yml +Only in cppcheck-1.88: .gitignore +diff -urp cppcheck-1.88.orig/gui/CMakeLists.txt cppcheck-1.88/gui/CMakeLists.txt +--- cppcheck-1.88.orig/gui/CMakeLists.txt 2019-07-01 20:46:32.662721323 -0400 ++++ cppcheck-1.88/gui/CMakeLists.txt 2019-07-01 20:48:29.298708807 -0400 +@@ -30,7 +30,7 @@ if (BUILD_GUI) + 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-1.88.orig/gui/translationhandler.cpp cppcheck-1.88/gui/translationhandler.cpp +--- cppcheck-1.88.orig/gui/translationhandler.cpp 2019-06-29 03:51:25.000000000 -0400 ++++ cppcheck-1.88/gui/translationhandler.cpp 2019-07-01 20:49:18.750703500 -0400 +@@ -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 +Only in cppcheck-1.88: .mailmap +Only in cppcheck-1.88: .travis_llvmcheck_suppressions +Only in cppcheck-1.88: .travis_suppressions +Only in cppcheck-1.88: .travis.yml diff --git a/cppcheck.spec b/cppcheck.spec index 9ad36a5..f7a68c3 100644 --- a/cppcheck.spec +++ b/cppcheck.spec @@ -2,7 +2,7 @@ %global gui 1 Name: cppcheck -Version: 1.87 +Version: 1.88 Release: 1%{?dist} Summary: Tool for static C/C++ code analysis License: GPLv3+ @@ -10,9 +10,9 @@ URL: http://cppcheck.wiki.sourceforge.net/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz # Use system tinyxml2 -Patch0: cppcheck-1.87-tinyxml.patch +Patch0: cppcheck-1.88-tinyxml.patch # Fix location of translations -Patch1: cppcheck-1.84-translations.patch +Patch1: cppcheck-1.88-translations.patch # Set location of config files Patch2: cppcheck-1.87-cfgdir.patch # Select python2 explicitly @@ -132,6 +132,9 @@ cd objdir-%{_target_platform}/bin %{_bindir}/cppcheck-htmlreport %changelog +* Mon Jul 01 2019 Steve Grubb - 1.88-1 +- Update to 1.88 + * Sat Feb 09 2019 Steve Grubb - 1.87-1 - Update to 1.87. diff --git a/sources b/sources index 1105b5f..7873e4a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cppcheck-1.87.tar.gz) = b0149002b40260c1488904929296403722a66b84263b41d0097c3caed28265332766c114f0d1f378ea6c7e73ab973ea71ab89c6744f6cc818f22de08933e6766 +SHA512 (cppcheck-1.88.tar.gz) = fa4ede0665546341af0ba3dae09a00b6efae09ec7838c616c580be01ff6902594d61168a059539779be0c78e1708d2bd9c8e7987dd0bb67dc8fa332a10d1de6a