SHA256
1
0
forked from pool/cppcheck
cppcheck/cppcheck.spec
Martin Pluskal e70987f28d Accepting request 642826 from home:jubalh:branches:devel:tools
- Update to 1.85:
  Changes from 1.83:
  Command line:
  - fixes in parser
  - Improved loading of platform files.
  GUI:
  - few minor improvements in user interface
  - Code preview
  - Added MISRA addon integration
  - Platform can be selected in project settings
  - Fixed issue when loading xml results file
  Addons:
  - We are now officially releasing our MISRA addon. So far it supports MISRA C 2012.
  Changes from 1.85:
  General:
  - We are modernizing the Cppcheck code. Support for MSVC 2010 and GCC 4.4 is dropped.
    You now need a compiler that is at least as good as MSVC 2013 or GCC 4.6.
  Checking improvements:
  - New check: Suggest STL algorithms instead of hard-coded for loops
  - New check: Warn about ineffective algorithms (same iterator passed)
  - New check: Mismatching iterators used together in operators
  - Container (STL/Qt/WxWidgets/etc) access out of bounds
  - Improved the checkers that warns about same/opposite expressions, track variable values better.
  - Variable scope: warn about references also
  Graphical user interface:
  - You can specify undefines in the project file dialog
  - Fixed configuration of suppressions
  - Windows: Fixed issue of wrong/no theme being applied to UI elements
  Misra:
  - support per file excludes from cppcheck

OBS-URL: https://build.opensuse.org/request/show/642826
OBS-URL: https://build.opensuse.org/package/show/devel:tools/cppcheck?expand=0&rev=53
2018-10-18 10:38:02 +00:00

117 lines
3.5 KiB
RPMSpec

#
# spec file for package cppcheck
#
# Copyright (c) 2018 SUSE LINUX 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: cppcheck
Version: 1.85
Release: 0
Summary: A tool for static C/C++ code analysis
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
URL: http://cppcheck.sourceforge.net/
Source: https://downloads.sourceforge.net/cppcheck/cppcheck-%{version}.tar.bz2
BuildRequires: docbook-xsl-stylesheets
BuildRequires: gcc-c++
BuildRequires: pcre-devel
BuildRequires: python
BuildRequires: xsltproc
Requires: python
Requires: python-Pygments
Requires: python-xml
%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
Summary: A tool for static C/C++ code analysis
Group: Development/Languages/C and C++
BuildRequires: pkgconfig
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Widgets)
Requires: cppcheck
%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
make %{?_smp_mflags} \
CXXFLAGS="-DNDEBUG %{optflags}" \
SRCDIR=build \
CFGDIR=%{_datadir}/%{name} \
HAVE_RULES=yes
pushd gui
%qmake5 \
QMAKE_CXXFLAGS="-DNDEBUG %{optflags}" \
HAVE_RULES=yes
%make_jobs
popd
make man \
DB2MAN=%{_datadir}/xml/docbook/stylesheet/nwalsh/current/manpages/docbook.xsl
%check
make %{?_smp_mflags} test \
CXXFLAGS="-DNDEBUG %{optflags}" \
HAVE_RULES=yes
%install
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
install -d %{buildroot}%{_datadir}/%{name}
install -m 0644 cfg/*.cfg %{buildroot}%{_datadir}/%{name}
%files
%doc AUTHORS
%license COPYING
%{_bindir}/cppcheck
%{_bindir}/cppcheck-htmlreport
%{_datadir}/%{name}/
%{_mandir}/man1/cppcheck.1*
%files gui
%{_bindir}/cppcheck-gui
%changelog