diff --git a/.gitignore b/.gitignore index 2c63d63..c22be97 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ cppcheck-1.44.tar.bz2 /cppcheck-1.89.tar.gz /cppcheck-1.90.tar.gz /cppcheck-2.0.tar.gz +/cppcheck-2.1.tar.gz diff --git a/809a769.patch b/809a769.patch deleted file mode 100644 index b20148b..0000000 --- a/809a769.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 809a769c690d8ab6fef293e41a29c8490512866e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= -Date: Sun, 10 May 2020 15:38:01 +0200 -Subject: [PATCH] Try to make Travis happy - ---- - cmake/versions.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cmake/versions.cmake b/cmake/versions.cmake -index 4c6c27fd9d..adf6393cc7 100644 ---- a/cmake/versions.cmake -+++ b/cmake/versions.cmake -@@ -1,5 +1,5 @@ - # Version for libraries CPP --SET(VERSION "2.0") -+SET(VERSION "2.0.0") - STRING(REGEX MATCHALL "[0-9]" VERSION_PARTS "${VERSION}") - LIST(GET VERSION_PARTS 0 VERSION_MAJOR) - LIST(GET VERSION_PARTS 1 VERSION_MINOR) diff --git a/cppcheck-1.90-tinyxml.patch b/cppcheck-1.90-tinyxml.patch deleted file mode 100644 index 69faf37..0000000 --- a/cppcheck-1.90-tinyxml.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff -urp a/cli/CMakeLists.txt b/cli/CMakeLists.txt ---- a/cli/CMakeLists.txt 2019-12-21 11:51:10.000000000 +0100 -+++ b/cli/CMakeLists.txt 2019-12-21 23:29:02.266101262 +0100 -@@ -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 a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt 2019-12-21 11:51:10.000000000 +0100 -+++ b/CMakeLists.txt 2019-12-21 23:30:07.419801154 +0100 -@@ -21,7 +21,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 a/gui/CMakeLists.txt b/gui/CMakeLists.txt ---- a/gui/CMakeLists.txt 2019-12-21 11:51:10.000000000 +0100 -+++ b/gui/CMakeLists.txt 2019-12-21 23:33:01.688541115 +0100 -@@ -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 a/test/CMakeLists.txt b/test/CMakeLists.txt ---- a/test/CMakeLists.txt 2019-12-21 11:51:10.000000000 +0100 -+++ b/test/CMakeLists.txt 2019-12-21 23:34:50.432203245 +0100 -@@ -12,16 +12,16 @@ if (BUILD_TESTS) - add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -j ${CTEST_PARALLEL_LEVEL} -C ${CMAKE_CFG_INTDIR} --timeout 90) - - 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-2.1-tinyxml.patch b/cppcheck-2.1-tinyxml.patch new file mode 100644 index 0000000..18cf85e --- /dev/null +++ b/cppcheck-2.1-tinyxml.patch @@ -0,0 +1,90 @@ +diff -up cppcheck-2.1/cli/CMakeLists.txt.orig cppcheck-2.1/cli/CMakeLists.txt +--- cppcheck-2.1/cli/CMakeLists.txt.orig 2020-06-13 18:08:37.000000000 +0200 ++++ cppcheck-2.1/cli/CMakeLists.txt 2020-06-15 11:52:39.095165469 +0200 +@@ -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) + target_link_libraries(cppcheck ${PCRE_LIBRARY}) + endif() +@@ -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 -up cppcheck-2.1/CMakeLists.txt.orig cppcheck-2.1/CMakeLists.txt +--- cppcheck-2.1/CMakeLists.txt.orig 2020-06-13 18:08:37.000000000 +0200 ++++ cppcheck-2.1/CMakeLists.txt 2020-06-15 11:52:39.099165304 +0200 +@@ -23,7 +23,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 -up cppcheck-2.1/gui/CMakeLists.txt.orig cppcheck-2.1/gui/CMakeLists.txt +--- cppcheck-2.1/gui/CMakeLists.txt.orig 2020-06-13 18:08:37.000000000 +0200 ++++ cppcheck-2.1/gui/CMakeLists.txt 2020-06-15 11:53:24.866217469 +0200 +@@ -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,14 +19,14 @@ 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_LIBRARY}) + endif() + if (USE_Z3) + target_link_libraries(cppcheck-gui ${Z3_LIBRARIES}) + 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 -up cppcheck-2.1/test/CMakeLists.txt.orig cppcheck-2.1/test/CMakeLists.txt +--- cppcheck-2.1/test/CMakeLists.txt.orig 2020-06-15 11:52:39.108164933 +0200 ++++ cppcheck-2.1/test/CMakeLists.txt 2020-06-15 11:54:10.167286593 +0200 +@@ -13,19 +13,19 @@ if (BUILD_TESTS) + add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -j ${CTEST_PARALLEL_LEVEL} -C ${CMAKE_CFG_INTDIR} --timeout 90) + + 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_LIBRARY}) + endif() + if (USE_Z3) + target_link_libraries(testrunner ${Z3_LIBRARIES}) + endif() ++ target_link_libraries(testrunner tinyxml2) + + add_custom_target(copy_cfg ALL + COMMENT "Copying cfg files") diff --git a/cppcheck.spec b/cppcheck.spec index a7848c2..87e79a7 100644 --- a/cppcheck.spec +++ b/cppcheck.spec @@ -2,7 +2,7 @@ %global gui 1 Name: cppcheck -Version: 2.0 +Version: 2.1 Release: 1%{?dist} Summary: Tool for static C/C++ code analysis License: GPLv3+ @@ -10,12 +10,11 @@ URL: http://cppcheck.wiki.sourceforge.net/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz # Use system tinyxml2 -Patch0: cppcheck-1.90-tinyxml.patch +Patch0: cppcheck-2.1-tinyxml.patch # Fix location of translations Patch1: cppcheck-1.89-translations.patch # Select python3 explicitly Patch2: cppcheck-1.88-htmlreport-python3.patch -Patch3: https://github.com/danmar/cppcheck/commit/809a769.patch BuildRequires: gcc-c++ BuildRequires: pcre-devel @@ -76,7 +75,6 @@ from xml files first generated using cppcheck. %patch0 -p1 -b .tinyxml %patch1 -p1 -b .translations %patch2 -p1 -b .python3 -%patch3 -p1 -b .cmake # Make sure bundled tinyxml is not used rm -r externals/tinyxml @@ -138,6 +136,9 @@ cd objdir-%{_target_platform}/bin %{_bindir}/cppcheck-htmlreport %changelog +* Mon Jun 15 2020 Susi Lehtola - 2.1-1 +- Update to 2.1. + * Mon May 11 2020 Susi Lehtola - 2.0-1 - Update to 2.0. diff --git a/sources b/sources index 72970df..fe2e414 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cppcheck-2.0.tar.gz) = 9f559564f875c2818e8b997aa3a3cc74e685169ebe829f3a41f20cd266b08cb7685efd5c266d877ada59576b8bf49ec04aead9f77d5781d3e0eb7a5d881ef281 +SHA512 (cppcheck-2.1.tar.gz) = 5001486c0f5dd2149c733df6167e274217dba6e248f525aba0f1523c92f44ad119b7e4c5655ccc812567ccf9ab11bcaaa35aa165d5d256212802f69594a581b8