2009-02-20 17:30:26 +01:00
|
|
|
# norootforbuild
|
|
|
|
|
2011-04-11 21:41:15 +02:00
|
|
|
BuildRequires: gcc-c++ libqt4-devel pcre-devel python
|
2011-01-06 17:48:30 +01:00
|
|
|
|
2010-06-01 23:32:29 +02:00
|
|
|
Name: cppcheck
|
2011-08-08 05:48:12 +02:00
|
|
|
Version: 1.49
|
2010-08-22 19:03:01 +02:00
|
|
|
Release: 0
|
2010-06-01 23:32:29 +02:00
|
|
|
License: GNU GPL v3 or later
|
|
|
|
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
|
|
|
|
Summary: A tool for static C/C++ code analysis
|
2011-08-08 06:45:14 +02:00
|
|
|
Requires: python-pygments
|
|
|
|
|
2009-02-20 17:30:26 +01:00
|
|
|
%description
|
2011-01-06 17:48:30 +01:00
|
|
|
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:
|
2009-02-20 17:30:26 +01:00
|
|
|
|
|
|
|
* Out of bounds
|
|
|
|
* Uninitialized member variable 'classname::varname'
|
|
|
|
* Using 'memfunc' on class
|
|
|
|
* Using 'memfunc' on struct that contains a 'std::classname'
|
2011-01-06 17:48:30 +01:00
|
|
|
* Class Base which is inherited by class Derived does not have a virtual
|
|
|
|
destructor
|
2009-02-20 17:30:26 +01:00
|
|
|
* Memory leak: varname
|
|
|
|
* Resource leak: varname
|
|
|
|
* Deallocating a deallocated pointer: varname
|
|
|
|
* Using 'varname' after it is deallocated / released
|
|
|
|
* Invalid radix in call to strtol or strtoul. Must be 0 or 2-36
|
|
|
|
* Overlapping data buffer varname
|
|
|
|
* Unsigned division. The result will be wrong.
|
|
|
|
* Unusual pointer arithmetic
|
|
|
|
|
2011-01-06 17:48:30 +01:00
|
|
|
%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
|
2011-08-08 06:45:14 +02:00
|
|
|
BuildRequires: python-qt-devel
|
2011-01-06 17:48:30 +01:00
|
|
|
%description gui
|
2011-08-08 06:45:14 +02:00
|
|
|
|
2011-01-06 17:48:30 +01:00
|
|
|
This is the gui for Cppcheck, a program to detect bugs that your C/C++ compiler
|
2011-08-08 06:45:14 +02:00
|
|
|
doesn't see.
|
2011-01-06 17:48:30 +01:00
|
|
|
|
2009-02-20 17:30:26 +01:00
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
2010-10-04 07:52:21 +02:00
|
|
|
CXXFLAGS="-DNDEBUG %optflags" %__make %{_smp_mflags}
|
2011-01-06 17:48:30 +01:00
|
|
|
pushd gui
|
2010-06-01 23:32:29 +02:00
|
|
|
qmake
|
|
|
|
%__make %{_smp_mflags}
|
2011-01-06 17:48:30 +01:00
|
|
|
popd
|
2009-02-20 17:30:26 +01:00
|
|
|
|
|
|
|
%check
|
2010-06-01 23:32:29 +02:00
|
|
|
%__make %{_smp_mflags} test
|
2009-02-20 17:30:26 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
%makeinstall
|
2011-01-06 17:48:30 +01:00
|
|
|
%{__install} -m 0755 gui/cppcheck-gui %{buildroot}%{_bindir}/cppcheck-gui
|
|
|
|
|
|
|
|
pushd htmlreport
|
|
|
|
%{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
|
|
popd
|
2009-02-20 17:30:26 +01:00
|
|
|
|
|
|
|
%clean
|
|
|
|
test "%{buildroot}" != "/" && %__rm -rf %{buildroot}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2010-06-01 23:32:29 +02:00
|
|
|
%doc AUTHORS
|
2009-02-20 17:30:26 +01:00
|
|
|
%{_bindir}/cppcheck
|
2011-01-06 17:48:30 +01:00
|
|
|
%{_bindir}/cppcheck-htmlreport
|
|
|
|
%{python_sitelib}/cppcheck*.egg-info
|
|
|
|
|
|
|
|
%files gui
|
|
|
|
%defattr(-,root,root)
|
2010-06-01 23:32:29 +02:00
|
|
|
%{_bindir}/cppcheck-gui
|
2010-12-29 10:33:04 +01:00
|
|
|
|
|
|
|
%changelog
|