Add htmlreport tool.
This commit is contained in:
commit
ffc0bdb036
24
cppcheck-1.83-cmake.patch
Normal file
24
cppcheck-1.83-cmake.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
diff -up cppcheck-1.83/CMakeLists.txt.qt5cmake cppcheck-1.83/CMakeLists.txt
|
||||||
|
--- cppcheck-1.83/CMakeLists.txt.qt5cmake 2018-06-02 14:01:44.339998373 +0200
|
||||||
|
+++ cppcheck-1.83/CMakeLists.txt 2018-06-02 14:01:44.370997858 +0200
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
project(CppCheck)
|
||||||
|
-cmake_minimum_required(VERSION 2.8.4)
|
||||||
|
+cmake_minimum_required(VERSION 2.8.11)
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
diff -up cppcheck-1.83/gui/CMakeLists.txt.qt5cmake cppcheck-1.83/gui/CMakeLists.txt
|
||||||
|
--- cppcheck-1.83/gui/CMakeLists.txt.qt5cmake 2018-06-02 14:01:44.372997824 +0200
|
||||||
|
+++ cppcheck-1.83/gui/CMakeLists.txt 2018-06-02 14:02:04.869656720 +0200
|
||||||
|
@@ -24,8 +24,8 @@ if (BUILD_GUI)
|
||||||
|
target_link_libraries(cppcheck-gui pcre)
|
||||||
|
endif()
|
||||||
|
target_link_libraries(cppcheck-gui tinyxml2)
|
||||||
|
- qt5_use_modules(cppcheck-gui ${GUI_QT_COMPONENTS})
|
||||||
|
-
|
||||||
|
+ target_link_libraries(cppcheck-gui Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::LinguistTools)
|
||||||
|
+
|
||||||
|
install(TARGETS cppcheck-gui RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications)
|
||||||
|
install(FILES ${qms} DESTINATION share/${PROJECT_NAME}/lang/ COMPONENT applications)
|
||||||
|
|
@ -3,9 +3,8 @@
|
|||||||
|
|
||||||
Name: cppcheck
|
Name: cppcheck
|
||||||
Version: 1.83
|
Version: 1.83
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Tool for static C/C++ code analysis
|
Summary: Tool for static C/C++ code analysis
|
||||||
Group: Development/Languages
|
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
URL: http://cppcheck.wiki.sourceforge.net/
|
URL: http://cppcheck.wiki.sourceforge.net/
|
||||||
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
||||||
@ -16,6 +15,8 @@ Patch0: cppcheck-1.83-tinyxml.patch
|
|||||||
Patch1: cppcheck-1.81-translations.patch
|
Patch1: cppcheck-1.81-translations.patch
|
||||||
# Set location of config files
|
# Set location of config files
|
||||||
Patch2: cppcheck-1.78-cfgdir.patch
|
Patch2: cppcheck-1.78-cfgdir.patch
|
||||||
|
# Use modern qt5 cmake
|
||||||
|
Patch3: cppcheck-1.83-cmake.patch
|
||||||
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: pcre-devel
|
BuildRequires: pcre-devel
|
||||||
@ -47,18 +48,32 @@ errors in the code (i.e. have zero false positives).
|
|||||||
%if %{gui}
|
%if %{gui}
|
||||||
%package gui
|
%package gui
|
||||||
Summary: Graphical user interface for cppcheck
|
Summary: Graphical user interface for cppcheck
|
||||||
Group: Applications/Engineering
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description gui
|
%description gui
|
||||||
This package contains the graphical user interface for cppcheck.
|
This package contains the graphical user interface for cppcheck.
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%package htmlreport
|
||||||
|
Summary: HTML reporting for cppcheck
|
||||||
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
%if 0%{?rhel} > 0 && 0%{?rhel} < 8
|
||||||
|
# RHEL packages aren't versioned
|
||||||
|
Requires: python-pygments
|
||||||
|
%else
|
||||||
|
Requires: python2-pygments
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description htmlreport
|
||||||
|
This package contains the Python utility for generating html reports
|
||||||
|
from xml files first generated using cppcheck.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .tinyxml
|
%patch0 -p1 -b .tinyxml
|
||||||
%patch1 -p1 -b .translations
|
%patch1 -p1 -b .translations
|
||||||
%patch2 -p1 -b .cfgdir
|
%patch2 -p1 -b .cfgdir
|
||||||
|
%patch3 -p1 -b .qt5cmake
|
||||||
# Make sure bundled tinyxml is not used
|
# Make sure bundled tinyxml is not used
|
||||||
rm -r externals/tinyxml
|
rm -r externals/tinyxml
|
||||||
|
|
||||||
@ -89,6 +104,10 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/cppcheck-gui.desktop
|
|||||||
install -D -p -m 644 gui/cppcheck-gui.png %{buildroot}%{_datadir}/pixmaps/cppcheck-gui.png
|
install -D -p -m 644 gui/cppcheck-gui.png %{buildroot}%{_datadir}/pixmaps/cppcheck-gui.png
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# Install htmlreport
|
||||||
|
install -D -p -m 755 htmlreport/cppcheck-htmlreport %{buildroot}%{_bindir}/cppcheck-htmlreport
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
cd objdir-%{_target_platform}/bin
|
cd objdir-%{_target_platform}/bin
|
||||||
./testrunner -g -q
|
./testrunner -g -q
|
||||||
@ -108,7 +127,13 @@ cd objdir-%{_target_platform}/bin
|
|||||||
%{_datadir}/icons/hicolor/scalable/apps/cppcheck-gui.svg
|
%{_datadir}/icons/hicolor/scalable/apps/cppcheck-gui.svg
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%files htmlreport
|
||||||
|
%{_bindir}/cppcheck-htmlreport
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jun 02 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.83-3
|
||||||
|
- Add htmlreport tool.
|
||||||
|
|
||||||
* Thu May 17 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.83-2
|
* Thu May 17 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.83-2
|
||||||
- Qt5 is available on RHEL 7 after all, re-enable gui in EPEL 7.
|
- Qt5 is available on RHEL 7 after all, re-enable gui in EPEL 7.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user