# norootforbuild BuildRequires: gcc-c++ libqt4-devel pcre-devel python Name: cppcheck Version: 1.49 Release: 0 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 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: * 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 * 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 %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 BuildRequires: python-qt-devel %description gui This is the gui for Cppcheck, a program to detect bugs that your C/C++ compiler doesn't see. %prep %setup -q %build CXXFLAGS="-DNDEBUG %optflags" %__make %{_smp_mflags} pushd gui qmake %__make %{_smp_mflags} popd %check %__make %{_smp_mflags} test %install %makeinstall %{__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} %files %defattr(-,root,root) %doc AUTHORS %{_bindir}/cppcheck %{_bindir}/cppcheck-htmlreport %{python_sitelib}/cppcheck*.egg-info %files gui %defattr(-,root,root) %{_bindir}/cppcheck-gui %changelog