diff --git a/.gitignore b/.gitignore index 9fd22e7..ea8b33f 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,6 @@ cppcheck-1.44.tar.bz2 /cppcheck-1.73.tar.bz2 /cppcheck-1.74.tar.bz2 /cppcheck-1.75.tar.bz2 +/cppcheck-1.77.tar.bz2 +/cppcheck-1.78.tar.bz2 +/cppcheck-1.79.tar.bz2 diff --git a/cppcheck-1.75-tinyxml.patch b/cppcheck-1.77-tinyxml.patch similarity index 91% rename from cppcheck-1.75-tinyxml.patch rename to cppcheck-1.77-tinyxml.patch index 603734a..673d053 100644 --- a/cppcheck-1.75-tinyxml.patch +++ b/cppcheck-1.77-tinyxml.patch @@ -32,32 +32,6 @@ diff -up cppcheck-1.75/CMakeLists.txt.tinyxml cppcheck-1.75/CMakeLists.txt add_subdirectory(lib) # CppCheck Library add_subdirectory(cli) # Client application diff -up cppcheck-1.75/gui/CMakeLists.txt.tinyxml cppcheck-1.75/gui/CMakeLists.txt ---- cppcheck-1.75/gui/CMakeLists.txt.tinyxml 2016-08-06 18:49:40.000000000 +0200 -+++ cppcheck-1.75/gui/CMakeLists.txt 2016-08-09 06:44:44.234147074 +0200 -@@ -11,7 +11,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") -@@ -21,12 +20,12 @@ if (BUILD_GUI) - QT4_ADD_RESOURCES(resources "gui.qrc") - QT4_ADD_TRANSLATION(qms ${tss}) - -- add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $ $ $) -+ add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $ $) - target_link_libraries(cppcheck-gui ${QT_LIBRARIES}) - if (HAVE_RULES) - target_link_libraries(cppcheck-gui pcre) - endif() -- -+ target_link_libraries(cppcheck-gui tinyxml2) - - install(TARGETS cppcheck-gui RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications) - install(FILES ${qms} DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications) -diff -up cppcheck-1.75/test/CMakeLists.txt.tinyxml cppcheck-1.75/test/CMakeLists.txt --- cppcheck-1.75/test/CMakeLists.txt.tinyxml 2016-08-09 06:43:08.155146498 +0200 +++ cppcheck-1.75/test/CMakeLists.txt 2016-08-09 06:45:26.020153572 +0200 @@ -1,16 +1,16 @@ @@ -79,3 +53,28 @@ diff -up cppcheck-1.75/test/CMakeLists.txt.tinyxml cppcheck-1.75/test/CMakeLists add_custom_target(copy_cfg ALL COMMENT "Copying cfg files") +--- cppcheck-1.77/gui/CMakeLists.txt.orig 2017-01-31 12:46:53.394879690 -0600 ++++ cppcheck-1.77/gui/CMakeLists.txt 2017-01-31 12:47:57.626549785 -0600 +@@ -11,7 +11,6 @@ + endif() + + include_directories(${PROJECT_SOURCE_DIR}/lib/) +- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/) + + file(GLOB hdrs "*.h") + file(GLOB srcs "*.cpp") +@@ -21,12 +20,13 @@ + QT4_ADD_RESOURCES(resources "gui.qrc") + QT4_ADD_TRANSLATION(qms ${tss}) + +- add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $ $ $) ++ add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $ $) + target_link_libraries(cppcheck-gui ${QT_LIBRARIES}) + if (HAVE_RULES) + target_link_libraries(cppcheck-gui pcre) + endif() + ++ target_link_libraries(cppcheck-gui tinyxml2) + + install(TARGETS cppcheck-gui RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications) + install(FILES ${qms} DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications) diff --git a/cppcheck-1.78-cfgdir.patch b/cppcheck-1.78-cfgdir.patch new file mode 100644 index 0000000..f42f0bb --- /dev/null +++ b/cppcheck-1.78-cfgdir.patch @@ -0,0 +1,16 @@ +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") diff --git a/cppcheck-1.75-translations.patch b/cppcheck-1.79-translations.patch similarity index 60% rename from cppcheck-1.75-translations.patch rename to cppcheck-1.79-translations.patch index fafebcb..f4531dc 100644 --- a/cppcheck-1.75-translations.patch +++ b/cppcheck-1.79-translations.patch @@ -1,18 +1,18 @@ -diff -up cppcheck-1.75/gui/CMakeLists.txt.translations cppcheck-1.75/gui/CMakeLists.txt ---- cppcheck-1.75/gui/CMakeLists.txt.translations 2016-08-09 06:46:30.206146245 +0200 -+++ cppcheck-1.75/gui/CMakeLists.txt 2016-08-09 06:47:27.829146179 +0200 -@@ -28,7 +28,7 @@ if (BUILD_GUI) +diff -up cppcheck-1.79/gui/CMakeLists.txt.translations cppcheck-1.79/gui/CMakeLists.txt +--- cppcheck-1.79/gui/CMakeLists.txt.translations 2017-05-18 05:09:44.643624491 +0200 ++++ cppcheck-1.79/gui/CMakeLists.txt 2017-05-18 05:09:44.651624352 +0200 +@@ -29,7 +29,7 @@ if (BUILD_GUI) target_link_libraries(cppcheck-gui tinyxml2) 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) - set(CMAKE_AUTOMOC OFF) + install(FILES cppcheck-gui.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications) -diff -up cppcheck-1.75/gui/translationhandler.cpp.translations cppcheck-1.75/gui/translationhandler.cpp ---- cppcheck-1.75/gui/translationhandler.cpp.translations 2016-08-06 18:49:40.000000000 +0200 -+++ cppcheck-1.75/gui/translationhandler.cpp 2016-08-09 06:46:30.207146245 +0200 +diff -up cppcheck-1.79/gui/translationhandler.cpp.translations cppcheck-1.79/gui/translationhandler.cpp +--- cppcheck-1.79/gui/translationhandler.cpp.translations 2017-05-18 05:09:44.649624387 +0200 ++++ cppcheck-1.79/gui/translationhandler.cpp 2017-05-18 05:14:16.716915424 +0200 @@ -116,15 +116,7 @@ bool TranslationHandler::SetLanguage(con if (datadir.isEmpty()) datadir = appPath; @@ -29,4 +29,4 @@ diff -up cppcheck-1.75/gui/translationhandler.cpp.translations cppcheck-1.75/gui + QString translationFile("/usr/share/CppCheck/lang/" + mTranslations[index].mFilename + ".qm"); if (!mTranslator->load(translationFile) && !failure) { - translationFile += ".qm"; + //If it failed, lets check if the default file exists diff --git a/cppcheck.desktop b/cppcheck.desktop deleted file mode 100644 index 06c7311..0000000 --- a/cppcheck.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Name=CppCheck -GenericName=C++ Source code analyzer -Comment=Perform static code analysis on your C++ programs -Exec=cppcheck-gui -Icon=cppcheck -Terminal=false -Type=Application -StartupNotify=true -Categories=Development;Utility;Qt; - diff --git a/cppcheck.spec b/cppcheck.spec index 4536363..78eb8ad 100644 --- a/cppcheck.spec +++ b/cppcheck.spec @@ -1,18 +1,19 @@ Name: cppcheck -Version: 1.75 +Version: 1.79 Release: 1%{?dist} Summary: Tool for static C/C++ code analysis Group: Development/Languages License: GPLv3+ URL: http://cppcheck.wiki.sourceforge.net/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2 -Source1: cppcheck.desktop BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) # Use system tinyxml2 -Patch0: cppcheck-1.75-tinyxml.patch +Patch0: cppcheck-1.77-tinyxml.patch # Fix location of translations -Patch1: cppcheck-1.75-translations.patch +Patch1: cppcheck-1.79-translations.patch +# Set location of config files +Patch2: cppcheck-1.78-cfgdir.patch BuildRequires: pcre-devel BuildRequires: tinyxml2-devel >= 2.1.0 @@ -42,6 +43,7 @@ This package contains the graphical user interface for cppcheck. %setup -q %patch0 -p1 -b .tinyxml %patch1 -p1 -b .translations +%patch2 -p1 -b .cfgdir # Make sure bundled tinyxml is not used rm -r externals/tinyxml @@ -56,7 +58,7 @@ xsltproc --nonet -o man/manual.html \ mkdir objdir-%{_target_platform} cd objdir-%{_target_platform} # Upstream doesn't support shared libraries (unversioned solib) -%cmake .. -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=1 -DBUILD_GUI=1 -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTS=1 +%cmake .. -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=1 -DBUILD_GUI=1 -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTS=1 -DCFGDIR=%{_datadir}/CppCheck # SMP make doesn't seem to work make cppcheck @@ -66,9 +68,9 @@ make -C objdir-%{_target_platform} DESTDIR=%{buildroot} install install -D -p -m 644 cppcheck.1 %{buildroot}%{_mandir}/man1/cppcheck.1 # Install desktop file -desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1} +desktop-file-validate %{buildroot}%{_datadir}/applications/cppcheck-gui.desktop # Install logo -install -D -p -m 644 gui/icon.png %{buildroot}%{_datadir}/pixmaps/cppcheck.png +install -D -p -m 644 gui/cppcheck-gui.png %{buildroot}%{_datadir}/pixmaps/cppcheck-gui.png %check cd objdir-%{_target_platform}/bin @@ -85,11 +87,33 @@ rm -rf %{buildroot} %files gui %{_bindir}/cppcheck-gui -%{_datadir}/applications/cppcheck.desktop -%{_datadir}/pixmaps/cppcheck.png +%{_datadir}/applications/cppcheck-gui.desktop +%{_datadir}/pixmaps/cppcheck-gui.png +%{_datadir}/icons/hicolor/64x64/apps/cppcheck-gui.png +%{_datadir}/icons/hicolor/scalable/apps/cppcheck-gui.svg %changelog +* Wed May 17 2017 Susi Lehtola - 1.79-1 +- Update to 1.79. + +* Sun Apr 09 2017 Susi Lehtola - 1.78-1 +- Make cppcheck able to find its configs once again (bug 1427788). +- Update to 1.78. + +* Mon Feb 27 2017 Mamoru TASAKA - 1.77-4 +- Remove Patch2: fixed in gcc side (gcc-7.0.1-10.fc26) + (ref: bug 1423312) + +* Fri Feb 17 2017 Mamoru TASAKA - 1.77-3 +- Fix FTBFS with gcc7 (bug 1423312, upstream ticket 7910) + +* Fri Feb 10 2017 Fedora Release Engineering - 1.77-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Jan 31 2017 Jon Ciesla - 1.77-1 +- 1.77. + * Mon Aug 08 2016 Susi Lehtola - 1.75-1 - Update to 1.75. diff --git a/sources b/sources index 122b189..d741cfc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -645572cdef2b439d19adc317171b9bf4 cppcheck-1.75.tar.bz2 +SHA512 (cppcheck-1.79.tar.bz2) = 766649b685d60b057752a49eda46f5bb42681c01c32169e83f85ea6f5d3302b572a2d484c1cee1380fd304489d5a32f83eb59a72ceefb1b787031e84bf3a2676