Name: cppcheck Version: 1.50 Release: 2%{?dist} Summary: A tool for static C/C++ code analysis Group: Development/Languages License: GPLv3+ URL: http://cppcheck.wiki.sourceforge.net/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2 # Fix BZ #730580 Patch0: cppcheck-1.50-preprocessor.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: pcre-devel BuildRequires: tinyxml-devel %description This program tries to detect bugs that your C/C++ compiler don't see. The goal is no false positives. Your compiler can detect many problems that cppcheck don't try to detect. We recommend that you enable as many warnings as possible in your compiler. Cppcheck is versatile. You can check non-standard code that includes various compiler extensions, inline assembly code, etc. %prep %setup -q %patch0 -p1 # Make sure bundled tinyxml is not used rm -r externals/tinyxml %build # TINYXML= prevents use of bundled tinyxml %if 0%{?rhel} == 4 make CXXFLAGS="%{optflags} -I%{_includedir}/pcre -DNDEBUG -DHAVE_RULES" TINYXML= LDFLAGS="-ltinyxml -lpcre" %{?_smp_mflags} %else make CXXFLAGS="%{optflags} -DNDEBUG -DHAVE_RULES" TINYXML= LDFLAGS="-ltinyxml -lpcre" %{?_smp_mflags} %endif %install rm -rf %{buildroot} install -D -p -m 755 cppcheck %{buildroot}%{_bindir}/cppcheck %check %if 0%{?rhel} == 4 make CXXFLAGS="%{optflags} -I%{_includedir}/pcre -DNDEBUG -DHAVE_RULES" TINYXML= LDFLAGS="-ltinyxml -lpcre" %{?_smp_mflags} check %else make CXXFLAGS="%{optflags} -DNDEBUG -DHAVE_RULES" TINYXML= LDFLAGS="-ltinyxml -lpcre" %{?_smp_mflags} check %endif %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc COPYING %{_bindir}/cppcheck %changelog * Fri Aug 19 2011 Jussi Lehtola - 1.50-2 - Fix build on EPEL-4. * Sun Aug 14 2011 Jussi Lehtola - 1.50-1 - Update to 1.50. * Mon Jun 13 2011 Jussi Lehtola - 1.49-1 - Update to 1.49. * Sat Apr 30 2011 Ville Skyttä - 1.48-2 - Build with system tinyxml and support for rules. - Run test suite during build, don't include its sources in docs. - Drop readme.txt from docs, it doesn't contain useful info after installed. * Fri Apr 15 2011 Jussi Lehtola - 1.48-1 - Update to 1.48. * Tue Feb 08 2011 Fedora Release Engineering - 1.47-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Mon Feb 07 2011 Jussi Lehtola - 1.47-1 - Update to 1.47. * Thu Dec 30 2010 Jussi Lehtola - 1.46.1-1 - Update to 1.46.1. * Wed Dec 15 2010 Jussi Lehtola - 1.46-1 - Update to 1.46. * Mon Oct 4 2010 Jussi Lehtola - 1.45-1 - Update to 1.45. * Sat Jul 24 2010 Jussi Lehtola - 1.44-1 - Update to 1.44. * Sun May 9 2010 Jussi Lehtola - 1.43-1 - Update to 1.43. * Wed Mar 10 2010 Jussi Lehtola - 1.42-1 - Update to 1.42. * Mon Jan 18 2010 Jussi Lehtola - 1.40-1 - Update to 1.40. * Sun Dec 27 2009 Jussi Lehtola - 1.39-1 - Update to 1.39. * Sat Nov 07 2009 Jussi Lehtola - 1.38-1 - Update to 1.38. * Tue Sep 22 2009 Jussi Lehtola - 1.36-1 - Update to 1.36. * Fri Jul 24 2009 Fedora Release Engineering - 1.34-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Thu Jul 16 2009 Jussi Lehtola - 1.34-1 - Update to 1.34. * Mon Apr 27 2009 Jussi Lehtola - 1.31-1 - First release.