From e13f8f241c187689369143d8c169dba338ca169f Mon Sep 17 00:00:00 2001 From: Susi Lehtola Date: Sep 11 2018 16:19:41 +0000 Subject: Update to 1.84. --- diff --git a/.gitignore b/.gitignore index e7e4b91..ecd1961 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ cppcheck-1.44.tar.bz2 /cppcheck-1.80.tar.gz /cppcheck-1.81.tar.gz /cppcheck-1.83.tar.gz +/cppcheck-1.84.tar.gz diff --git a/cppcheck-1.81-translations.patch b/cppcheck-1.81-translations.patch deleted file mode 100644 index 9e9a662..0000000 --- a/cppcheck-1.81-translations.patch +++ /dev/null @@ -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 diff --git a/cppcheck-1.83-tinyxml.patch b/cppcheck-1.83-tinyxml.patch deleted file mode 100644 index b396f48..0000000 --- a/cppcheck-1.83-tinyxml.patch +++ /dev/null @@ -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} $ $ $ $) -+add_executable(cppcheck ${hdrs} ${mainfile} $ $ $) - 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} $ $ $) -+ 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 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} $ $ $ $) -+ 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.84-tinyxml.patch b/cppcheck-1.84-tinyxml.patch new file mode 100644 index 0000000..345da60 --- /dev/null +++ b/cppcheck-1.84-tinyxml.patch @@ -0,0 +1,93 @@ +diff -ur cppcheck-1.84.orig/cli/CMakeLists.txt cppcheck-1.84/cli/CMakeLists.txt +--- cppcheck-1.84.orig/cli/CMakeLists.txt 2018-06-10 16:41:03.000000000 -0400 ++++ cppcheck-1.84/cli/CMakeLists.txt 2018-08-13 13:11:17.191381897 -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} $ $ $ $) ++add_executable(cppcheck ${hdrs} ${mainfile} $ $ $) + 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} +Only in cppcheck-1.84/cli: CMakeLists.txt.orig +Only in cppcheck-1.84/cli: CMakeLists.txt.rej +diff -ur cppcheck-1.84.orig/CMakeLists.txt cppcheck-1.84/CMakeLists.txt +--- cppcheck-1.84.orig/CMakeLists.txt 2018-06-10 16:41:03.000000000 -0400 ++++ cppcheck-1.84/CMakeLists.txt 2018-08-13 13:09:05.904395985 -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 +Only in cppcheck-1.84: .codacy.yml +Only in cppcheck-1.84: .gitignore +diff -ur cppcheck-1.84.orig/gui/CMakeLists.txt cppcheck-1.84/gui/CMakeLists.txt +--- cppcheck-1.84.orig/gui/CMakeLists.txt 2018-06-10 16:41:03.000000000 -0400 ++++ cppcheck-1.84/gui/CMakeLists.txt 2018-08-13 13:13:52.843365194 -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,11 +19,11 @@ + 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) +Only in cppcheck-1.84/gui: CMakeLists.txt.orig +Only in cppcheck-1.84/gui: CMakeLists.txt.rej +Only in cppcheck-1.84: .mailmap +diff -ur cppcheck-1.84.orig/test/CMakeLists.txt cppcheck-1.84/test/CMakeLists.txt +--- cppcheck-1.84.orig/test/CMakeLists.txt 2018-06-10 16:41:03.000000000 -0400 ++++ cppcheck-1.84/test/CMakeLists.txt 2018-08-13 13:09:05.949395981 -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") +Only in cppcheck-1.84: .travis_llvmcheck_suppressions +Only in cppcheck-1.84: .travis_suppressions +Only in cppcheck-1.84: .travis.yml diff --git a/cppcheck-1.84-translations.patch b/cppcheck-1.84-translations.patch new file mode 100644 index 0000000..09a66a4 --- /dev/null +++ b/cppcheck-1.84-translations.patch @@ -0,0 +1,32 @@ +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.spec b/cppcheck.spec index b606080..0c79789 100644 --- a/cppcheck.spec +++ b/cppcheck.spec @@ -2,17 +2,17 @@ %global gui 1 Name: cppcheck -Version: 1.83 -Release: 4%{?dist} +Version: 1.84 +Release: 1%{?dist} Summary: Tool for static C/C++ code analysis License: GPLv3+ URL: http://cppcheck.wiki.sourceforge.net/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz # Use system tinyxml2 -Patch0: cppcheck-1.83-tinyxml.patch +Patch0: cppcheck-1.84-tinyxml.patch # Fix location of translations -Patch1: cppcheck-1.81-translations.patch +Patch1: cppcheck-1.84-translations.patch # Set location of config files Patch2: cppcheck-1.78-cfgdir.patch # Use modern qt5 cmake @@ -131,6 +131,9 @@ cd objdir-%{_target_platform}/bin %{_bindir}/cppcheck-htmlreport %changelog +* Tue Sep 11 2018 Susi Lehtola - 1.84-1 +- Update to 1.84. + * Thu Jul 12 2018 Fedora Release Engineering - 1.83-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index ea82c14..c652e5f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cppcheck-1.83.tar.gz) = 1f610c6ff73401e68c5f8ad4f6f78d754e760ca79395681fe76b1248ef596fcfd471b76482f7cce690226ed745645b03d15e3f91a6d60f58e7747d36ffda3840 +SHA512 (cppcheck-1.84.tar.gz) = a14a102447a099c66e0116b23364c845175dd803d49ee1030df349107f2a8585d701c3a5bf8b285d111199bc8fb8e55e3439d8e5c7b29062f44971c90e3dd35a