Include GUI.
This commit is contained in:
parent
aec3384010
commit
19d3766880
@ -1,12 +1,32 @@
|
||||
diff -up cppcheck-1.70/gui/CMakeLists.txt.orig cppcheck-1.70/gui/CMakeLists.txt
|
||||
--- cppcheck-1.70/gui/CMakeLists.txt.orig 2015-11-05 10:38:42.248204919 -0800
|
||||
+++ cppcheck-1.70/gui/CMakeLists.txt 2015-11-05 10:45:01.897795689 -0800
|
||||
diff -up cppcheck-1.70/gui/CMakeLists.txt.translations cppcheck-1.70/gui/CMakeLists.txt
|
||||
--- cppcheck-1.70/gui/CMakeLists.txt.translations 2015-11-05 11:37:19.343945331 -0800
|
||||
+++ cppcheck-1.70/gui/CMakeLists.txt 2015-11-05 11:37:19.344945349 -0800
|
||||
@@ -26,7 +26,7 @@ if (BUILD_GUI)
|
||||
add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms})
|
||||
|
||||
install(TARGETS cppcheck-gui RUNTIME DESTINATION bin COMPONENT applications)
|
||||
- install(FILES ${qms} DESTINATION bin COMPONENT applications)
|
||||
+ install(FILES ${qms} DESTINATION share/${PROJECT_NAME}/ COMPONENT applications)
|
||||
+ install(FILES ${qms} DESTINATION share/${PROJECT_NAME}/lang/ COMPONENT applications)
|
||||
|
||||
set(CMAKE_AUTOMOC OFF)
|
||||
|
||||
diff -up cppcheck-1.70/gui/translationhandler.cpp.translations cppcheck-1.70/gui/translationhandler.cpp
|
||||
--- cppcheck-1.70/gui/translationhandler.cpp.translations 2015-09-04 11:04:31.000000000 -0700
|
||||
+++ cppcheck-1.70/gui/translationhandler.cpp 2015-11-05 11:38:34.991299374 -0800
|
||||
@@ -106,15 +106,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) {
|
||||
translationFile += ".qm";
|
||||
|
11
cppcheck.desktop
Normal file
11
cppcheck.desktop
Normal file
@ -0,0 +1,11 @@
|
||||
[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;
|
||||
|
@ -1,11 +1,12 @@
|
||||
Name: cppcheck
|
||||
Version: 1.70
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?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
|
||||
@ -21,6 +22,7 @@ BuildRequires: docbook-style-xsl
|
||||
BuildRequires: libxslt
|
||||
BuildRequires: qt4-devel
|
||||
BuildRequires: cmake
|
||||
BuildRequires: desktop-file-utils
|
||||
|
||||
%description
|
||||
Cppcheck is a static analysis tool for C/C++ code. Unlike C/C++
|
||||
@ -68,9 +70,13 @@ install -D -p -m 644 cppcheck.1 %{buildroot}%{_mandir}/man1/cppcheck.1
|
||||
rm -rf %{buildroot}%{_includedir}/CppCheck
|
||||
rm %{buildroot}%{_libdir}/libCppCheck.*
|
||||
|
||||
# Install desktop file
|
||||
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
|
||||
# Install logo
|
||||
install -D -p -m 644 gui/icon.png %{buildroot}%{_datadir}/pixmaps/cppcheck.png
|
||||
|
||||
%check
|
||||
# Config is not available in the system-wide directory - delete executables and recompile
|
||||
find . -name \*.o -delete
|
||||
# CMake build doesn't have check...
|
||||
CXXFLAGS="%{optflags} -DNDEBUG $(pcre-config --cflags)" \
|
||||
LDFLAGS="$RPM_LD_FLAGS" LIBS=-ltinyxml2 make TINYXML= \
|
||||
CFGDIR=$(pwd)/cfg \
|
||||
@ -89,9 +95,14 @@ rm -rf %{buildroot}
|
||||
|
||||
%files gui
|
||||
%{_bindir}/cppcheck-gui
|
||||
%{_datadir}/applications/cppcheck.desktop
|
||||
%{_datadir}/pixmaps/cppcheck.png
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Nov 5 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.70-2
|
||||
- Include GUI (BZ #1278318).
|
||||
|
||||
* Mon Sep 21 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.70-1
|
||||
- Update to 1.70.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user