From ac7f38faf9145ec47d9f2cd08fd0a356232bec3fbd9517efa342ff4f0e3d9b7b Mon Sep 17 00:00:00 2001 From: OBS User mrdocs Date: Thu, 6 Jan 2011 16:48:30 +0000 Subject: [PATCH] Accepting request 57255 from home:gladiac:branches:devel:tools reviewed ok Thanks OBS-URL: https://build.opensuse.org/request/show/57255 OBS-URL: https://build.opensuse.org/package/show/devel:tools/cppcheck?expand=0&rev=19 --- cppcheck.changes | 6 ++++++ cppcheck.spec | 37 +++++++++++++++++++++++++++++++------ 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/cppcheck.changes b/cppcheck.changes index 03892cf..b48be14 100644 --- a/cppcheck.changes +++ b/cppcheck.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 6 13:48:46 CET 2011 - asn@cynapses.org + +- Added a seperate package for the gui. +- Added cppcheck-htmlreport. + ------------------------------------------------------------------- Sun Oct 3 22:58:13 UTC 2010 - adam@mizerski.pl diff --git a/cppcheck.spec b/cppcheck.spec index cc416ed..66414f0 100644 --- a/cppcheck.spec +++ b/cppcheck.spec @@ -1,5 +1,7 @@ # norootforbuild +BuildRequires: gcc-c++ libqt4-devel python + Name: cppcheck Version: 1.46.1 Release: 0 @@ -8,18 +10,21 @@ Group: Development/Languages/C and C++ Url: http://cppcheck.wiki.sourceforge.net/ Source: http://downloads.sourceforge.net/cppcheck/cppcheck-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: gcc-c++ -BuildRequires: libqt4-devel Summary: A tool for static C/C++ code analysis +Requires: python-pygments %description -This program tries to detect bugs that your C/C++ compiler don't see. Cppcheck is versatile. You can check non-standard code that includes various compiler extensions, inline assembly code, etc. Checking covers for example these errors: +This program tries to detect bugs that your C/C++ compiler don't see. Cppcheck +is versatile. You can check non-standard code that includes various compiler +extensions, inline assembly code, etc. Checking covers for example these +errors: * Out of bounds * Uninitialized member variable 'classname::varname' * Using 'memfunc' on class * Using 'memfunc' on struct that contains a 'std::classname' - * Class Base which is inherited by class Derived does not have a virtual destructor + * Class Base which is inherited by class Derived does not have a virtual + destructor * Memory leak: varname * Resource leak: varname * Deallocating a deallocated pointer: varname @@ -29,21 +34,36 @@ This program tries to detect bugs that your C/C++ compiler don't see. Cppcheck i * Unsigned division. The result will be wrong. * Unusual pointer arithmetic +%package gui +License: GNU GPL v3 or later +Group: Development/Languages/C and C++ +Summary: A tool for static C/C++ code analysis +Requires: cppcheck + +%description gui +This is the gui for Cppcheck, a program to detect bugs that your C/C++ compiler +don't see. + %prep %setup -q %build CXXFLAGS="-DNDEBUG %optflags" %__make %{_smp_mflags} -cd gui +pushd gui qmake %__make %{_smp_mflags} +popd %check %__make %{_smp_mflags} test %install %makeinstall -%__install -Dm 0755 gui/cppcheck-gui %{buildroot}%{_bindir}/cppcheck-gui +%{__install} -m 0755 gui/cppcheck-gui %{buildroot}%{_bindir}/cppcheck-gui + +pushd htmlreport +%{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot} +popd %clean test "%{buildroot}" != "/" && %__rm -rf %{buildroot} @@ -52,6 +72,11 @@ test "%{buildroot}" != "/" && %__rm -rf %{buildroot} %defattr(-,root,root) %doc AUTHORS %{_bindir}/cppcheck +%{_bindir}/cppcheck-htmlreport +%{python_sitelib}/cppcheck*.egg-info + +%files gui +%defattr(-,root,root) %{_bindir}/cppcheck-gui %changelog