This commit is contained in:
Jon Ciesla 2017-01-31 15:02:36 -06:00
parent d836748bef
commit 1121bba936
6 changed files with 50 additions and 58 deletions

1
.gitignore vendored
View File

@ -28,3 +28,4 @@ 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

View File

@ -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} $<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>)
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} $<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>)
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)

View File

@ -1,15 +1,3 @@
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)
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)
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
@ -30,3 +18,14 @@ diff -up cppcheck-1.75/gui/translationhandler.cpp.translations cppcheck-1.75/gui
if (!mTranslator->load(translationFile) && !failure) {
translationFile += ".qm";
--- cppcheck-1.77/gui/CMakeLists.txt.orig 2017-01-31 12:51:02.798598710 -0600
+++ cppcheck-1.77/gui/CMakeLists.txt 2017-01-31 12:51:50.049356022 -0600
@@ -29,7 +29,7 @@
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)
install(FILES cppcheck-gui.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)

View File

@ -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;

View File

@ -1,18 +1,17 @@
Name: cppcheck
Version: 1.75
Version: 1.77
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.77-translations.patch
BuildRequires: pcre-devel
BuildRequires: tinyxml2-devel >= 2.1.0
@ -66,9 +65,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 +84,16 @@ 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
* Tue Jan 31 2017 Jon Ciesla <limburgher@gmail.com> - 1.77-1
- 1.77.
* Mon Aug 08 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.75-1
- Update to 1.75.

View File

@ -1 +1 @@
645572cdef2b439d19adc317171b9bf4 cppcheck-1.75.tar.bz2
SHA512 (cppcheck-1.77.tar.bz2) = df8dddf7758c342d45b3393246e07eaa11a53dca19e8a0d09de04f12ea6232538941328d9ca9ac52eb425871fd1c49d55c77e6e38b40772b6f856fd1e9e99779