2014-01-12 02:24:21 +01:00
|
|
|
#
|
|
|
|
# spec file for package cppcheck
|
|
|
|
#
|
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
2009-02-20 17:30:26 +01:00
|
|
|
|
2014-01-12 02:24:21 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
2011-01-06 17:48:30 +01:00
|
|
|
|
2010-06-01 23:32:29 +02:00
|
|
|
Name: cppcheck
|
2015-05-15 18:40:26 +02:00
|
|
|
Version: 1.69
|
2010-08-22 19:03:01 +02:00
|
|
|
Release: 0
|
2014-01-12 02:24:21 +01:00
|
|
|
License: GPL-3.0+
|
|
|
|
Summary: A tool for static C/C++ code analysis
|
|
|
|
Url: http://cppcheck.sourceforge.net/
|
2010-06-01 23:32:29 +02:00
|
|
|
Group: Development/Languages/C and C++
|
|
|
|
Source: http://downloads.sourceforge.net/cppcheck/cppcheck-%{version}.tar.bz2
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2014-01-12 02:24:21 +01:00
|
|
|
BuildRequires: docbook-xsl-stylesheets
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: pcre-devel
|
|
|
|
BuildRequires: python
|
|
|
|
BuildRequires: xsltproc
|
|
|
|
Requires: python
|
|
|
|
Requires: python-Pygments
|
|
|
|
Requires: python-xml
|
2011-08-08 06:45:14 +02:00
|
|
|
|
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
|
|
|
|
Summary: A tool for static C/C++ code analysis
|
2014-01-12 02:24:21 +01:00
|
|
|
Group: Development/Languages/C and C++
|
2012-12-26 05:18:24 +01:00
|
|
|
BuildRequires: libqt4-devel >= 4.8.0
|
2014-01-12 02:24:21 +01:00
|
|
|
Requires: cppcheck
|
|
|
|
|
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
|
2014-01-12 02:24:21 +01:00
|
|
|
make %{?_smp_mflags} \
|
|
|
|
CXXFLAGS="-DNDEBUG %{optflags}" \
|
|
|
|
SRCDIR=build \
|
2014-01-13 14:01:10 +01:00
|
|
|
CFGDIR=%{_datadir}/%{name} \
|
2014-01-12 02:24:21 +01:00
|
|
|
HAVE_RULES=yes
|
|
|
|
|
2011-01-06 17:48:30 +01:00
|
|
|
pushd gui
|
2014-01-12 02:24:21 +01:00
|
|
|
qmake \
|
|
|
|
QMAKE_CXXFLAGS="-DNDEBUG %{optflags}" \
|
|
|
|
HAVE_RULES=yes
|
|
|
|
make %{?_smp_mflags}
|
2011-01-06 17:48:30 +01:00
|
|
|
popd
|
2009-02-20 17:30:26 +01:00
|
|
|
|
2014-01-12 02:24:21 +01:00
|
|
|
make man \
|
|
|
|
DB2MAN=%{_datadir}/xml/docbook/stylesheet/nwalsh/current/manpages/docbook.xsl
|
|
|
|
|
2009-02-20 17:30:26 +01:00
|
|
|
%check
|
2014-01-12 02:24:21 +01:00
|
|
|
make %{?_smp_mflags} test \
|
|
|
|
CXXFLAGS="-DNDEBUG %{optflags}" \
|
|
|
|
HAVE_RULES=yes
|
2009-02-20 17:30:26 +01:00
|
|
|
|
|
|
|
%install
|
2014-01-12 02:24:21 +01:00
|
|
|
install -m 0755 -D cppcheck %{buildroot}%{_bindir}/cppcheck
|
|
|
|
install -m 0755 -D htmlreport/cppcheck-htmlreport %{buildroot}%{_bindir}/cppcheck-htmlreport
|
|
|
|
install -m 0755 -D gui/cppcheck-gui %{buildroot}%{_bindir}/cppcheck-gui
|
|
|
|
install -m 0644 -D cppcheck.1 %{buildroot}%{_mandir}/man1/cppcheck.1
|
2014-01-13 14:01:10 +01:00
|
|
|
install -d %{buildroot}%{_datadir}/%{name}
|
|
|
|
install -m 0644 cfg/*.cfg %{buildroot}%{_datadir}/%{name}
|
2009-02-20 17:30:26 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2014-01-12 02:24:21 +01:00
|
|
|
%doc AUTHORS COPYING
|
2009-02-20 17:30:26 +01:00
|
|
|
%{_bindir}/cppcheck
|
2011-01-06 17:48:30 +01:00
|
|
|
%{_bindir}/cppcheck-htmlreport
|
2014-01-13 14:01:10 +01:00
|
|
|
%{_datadir}/%{name}/
|
2014-01-12 02:24:21 +01:00
|
|
|
%{_mandir}/man1/cppcheck.1*
|
2011-01-06 17:48:30 +01:00
|
|
|
|
|
|
|
%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
|