New upstream version 1.90
- Drop cppcheck-1.89-manual.patch The file manual.docbook has been removed upstream - Use pandoc to create manual.html from manual.md - Add reference-cfg-format.html to doc - Use %%license macro instead of %%doc for the COPYING file - Fix typo in cppcheck-1.89-translations.patch: CppCheck/lang/ -> Cppcheck/lang/ - drop cppcheck-1.87-cfgdir.patch FILESDIR is used instead of CFGDIR since 1.89 - Update tinyxml patch to 1.90
This commit is contained in:
parent
250c014135
commit
613ef46fef
1
.gitignore
vendored
1
.gitignore
vendored
@ -40,3 +40,4 @@ cppcheck-1.44.tar.bz2
|
||||
/cppcheck-1.87.tar.gz
|
||||
/cppcheck-1.88.tar.gz
|
||||
/cppcheck-1.89.tar.gz
|
||||
/cppcheck-1.90.tar.gz
|
||||
|
@ -1,14 +0,0 @@
|
||||
diff -urp cppcheck-1.87.orig/cmake/options.cmake cppcheck-1.87/cmake/options.cmake
|
||||
--- cppcheck-1.87.orig/cmake/options.cmake 2019-02-09 03:31:27.000000000 -0500
|
||||
+++ cppcheck-1.87/cmake/options.cmake 2019-02-09 13:17:25.237561852 -0500
|
||||
@@ -22,6 +22,10 @@ option(ANALYZE_UNDEFINED "Clang dynam
|
||||
option(ANALYZE_DATAFLOW "Clang dynamic analyzer: general dynamic dataflow analysis." OFF)
|
||||
option(WARNINGS_ARE_ERRORS "Treat warnings as errors" OFF)
|
||||
option(WARNINGS_ANSI_ISO "Issue all the mandatory diagnostics Listed in C standard" ON)
|
||||
+option(CFGDIR "Configuration file directory" OFF)
|
||||
+if(CFGDIR)
|
||||
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCFG=${CFGDIR}")
|
||||
+endif(CFGDIR)
|
||||
|
||||
set(USE_MATCHCOMPILER "Auto" CACHE STRING "Usage of match compiler")
|
||||
set_property(CACHE USE_MATCHCOMPILER PROPERTY STRINGS Auto Off On Verify)
|
@ -1,12 +0,0 @@
|
||||
diff -urp cppcheck-1.89.orig/man/manual.docbook cppcheck-1.89/man/manual.docbook
|
||||
--- cppcheck-1.89.orig/man/manual.docbook 2019-09-01 09:01:12.000000000 -0400
|
||||
+++ cppcheck-1.89/man/manual.docbook 2019-12-07 14:04:54.363409384 -0500
|
||||
@@ -1217,7 +1217,7 @@ Checking pen1.c...
|
||||
</resource>
|
||||
</def></programlisting>
|
||||
|
||||
- <para>Functions that reallocate memory can be configured using a realloc tag. The input argument which points to the memory that shall be reallocated can also be configured (the default is the first argument). As an example, here is a configuration file for the fopen, freopen and fclose functions from the c standard library:
|
||||
+ <para>Functions that reallocate memory can be configured using a realloc tag. The input argument which points to the memory that shall be reallocated can also be configured (the default is the first argument). As an example, here is a configuration file for the fopen, freopen and fclose functions from the c standard library:</para>
|
||||
|
||||
<programlisting><?xml version="1.0"?>
|
||||
<def>
|
@ -26,7 +26,7 @@ diff -urp cppcheck-1.89.orig/gui/translationhandler.cpp cppcheck-1.89/gui/transl
|
||||
-
|
||||
- else
|
||||
- translationFile = appPath + "/" + mTranslations[index].mFilename + ".qm";
|
||||
+ QString translationFile("/usr/share/CppCheck/lang/" + mTranslations[index].mFilename + ".qm");
|
||||
+ QString translationFile("/usr/share/Cppcheck/lang/" + mTranslations[index].mFilename + ".qm");
|
||||
|
||||
if (!mTranslator->load(translationFile) && !failure) {
|
||||
//If it failed, lets check if the default file exists
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -urp cppcheck-1.88.orig/cli/CMakeLists.txt cppcheck-1.88/cli/CMakeLists.txt
|
||||
--- cppcheck-1.88.orig/cli/CMakeLists.txt 2019-06-29 03:51:25.000000000 -0400
|
||||
+++ cppcheck-1.88/cli/CMakeLists.txt 2019-07-01 20:38:10.056775258 -0400
|
||||
diff -urp a/cli/CMakeLists.txt b/cli/CMakeLists.txt
|
||||
--- a/cli/CMakeLists.txt 2019-12-21 11:51:10.000000000 +0100
|
||||
+++ b/cli/CMakeLists.txt 2019-12-21 23:29:02.266101262 +0100
|
||||
@@ -1,5 +1,4 @@
|
||||
include_directories(${PROJECT_SOURCE_DIR}/lib/)
|
||||
-include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/)
|
||||
@ -24,10 +24,10 @@ diff -urp cppcheck-1.88.orig/cli/CMakeLists.txt cppcheck-1.88/cli/CMakeLists.txt
|
||||
|
||||
install(TARGETS cppcheck
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
|
||||
diff -urp cppcheck-1.88.orig/CMakeLists.txt cppcheck-1.88/CMakeLists.txt
|
||||
--- cppcheck-1.88.orig/CMakeLists.txt 2019-06-29 03:51:25.000000000 -0400
|
||||
+++ cppcheck-1.88/CMakeLists.txt 2019-07-01 20:38:10.078775256 -0400
|
||||
@@ -19,7 +19,6 @@ if (BUILD_TESTS)
|
||||
diff -urp a/CMakeLists.txt b/CMakeLists.txt
|
||||
--- a/CMakeLists.txt 2019-12-21 11:51:10.000000000 +0100
|
||||
+++ b/CMakeLists.txt 2019-12-21 23:30:07.419801154 +0100
|
||||
@@ -21,7 +21,6 @@ if (BUILD_TESTS)
|
||||
enable_testing()
|
||||
endif()
|
||||
|
||||
@ -35,9 +35,9 @@ diff -urp cppcheck-1.88.orig/CMakeLists.txt cppcheck-1.88/CMakeLists.txt
|
||||
add_subdirectory(externals/simplecpp)
|
||||
add_subdirectory(lib) # CppCheck Library
|
||||
add_subdirectory(cli) # Client application
|
||||
diff -urp cppcheck-1.88.orig/gui/CMakeLists.txt cppcheck-1.88/gui/CMakeLists.txt
|
||||
--- cppcheck-1.88.orig/gui/CMakeLists.txt 2019-06-29 03:51:25.000000000 -0400
|
||||
+++ cppcheck-1.88/gui/CMakeLists.txt 2019-07-01 20:41:48.862751778 -0400
|
||||
diff -urp a/gui/CMakeLists.txt b/gui/CMakeLists.txt
|
||||
--- a/gui/CMakeLists.txt 2019-12-21 11:51:10.000000000 +0100
|
||||
+++ b/gui/CMakeLists.txt 2019-12-21 23:33:01.688541115 +0100
|
||||
@@ -10,7 +10,6 @@ if (BUILD_GUI)
|
||||
endif()
|
||||
|
||||
@ -60,11 +60,11 @@ diff -urp cppcheck-1.88.orig/gui/CMakeLists.txt cppcheck-1.88/gui/CMakeLists.txt
|
||||
if(WITH_QCHART)
|
||||
target_compile_definitions (cppcheck-gui PRIVATE HAVE_QCHART )
|
||||
target_link_libraries(cppcheck-gui Qt5::Charts)
|
||||
diff -urp cppcheck-1.88.orig/test/CMakeLists.txt cppcheck-1.88/test/CMakeLists.txt
|
||||
--- cppcheck-1.88.orig/test/CMakeLists.txt 2019-06-29 03:51:25.000000000 -0400
|
||||
+++ cppcheck-1.88/test/CMakeLists.txt 2019-07-01 20:43:12.299742824 -0400
|
||||
@@ -1,16 +1,16 @@
|
||||
if (BUILD_TESTS)
|
||||
diff -urp a/test/CMakeLists.txt b/test/CMakeLists.txt
|
||||
--- a/test/CMakeLists.txt 2019-12-21 11:51:10.000000000 +0100
|
||||
+++ b/test/CMakeLists.txt 2019-12-21 23:34:50.432203245 +0100
|
||||
@@ -12,16 +12,16 @@ if (BUILD_TESTS)
|
||||
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -j ${CTEST_PARALLEL_LEVEL} -C ${CMAKE_CFG_INTDIR} --timeout 90)
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR}/lib/ ${PROJECT_SOURCE_DIR}/cli/)
|
||||
- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml)
|
@ -2,28 +2,25 @@
|
||||
%global gui 1
|
||||
|
||||
Name: cppcheck
|
||||
Version: 1.89
|
||||
Release: 2%{?dist}
|
||||
Version: 1.90
|
||||
Release: 1%{?dist}
|
||||
Summary: Tool for static C/C++ code analysis
|
||||
License: GPLv3+
|
||||
URL: http://cppcheck.wiki.sourceforge.net/
|
||||
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
||||
|
||||
# Use system tinyxml2
|
||||
Patch0: cppcheck-1.88-tinyxml.patch
|
||||
Patch0: cppcheck-1.90-tinyxml.patch
|
||||
# Fix location of translations
|
||||
Patch1: cppcheck-1.89-translations.patch
|
||||
# Set location of config files
|
||||
Patch2: cppcheck-1.87-cfgdir.patch
|
||||
# Select python3 explicitly
|
||||
Patch3: cppcheck-1.88-htmlreport-python3.patch
|
||||
# Fixup missing </para> in manual
|
||||
Patch4: cppcheck-1.89-manual.patch
|
||||
Patch2: cppcheck-1.88-htmlreport-python3.patch
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: docbook-style-xsl
|
||||
BuildRequires: libxslt
|
||||
BuildRequires: pandoc
|
||||
BuildRequires: cmake
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: tinyxml2-devel >= 2.1.0
|
||||
@ -75,25 +72,19 @@ from xml files first generated using cppcheck.
|
||||
%setup -q
|
||||
%patch0 -p1 -b .tinyxml
|
||||
%patch1 -p1 -b .translations
|
||||
%patch2 -p1 -b .cfgdir
|
||||
%patch3 -p1 -b .python3
|
||||
%patch4 -p1 -b .manual
|
||||
%patch2 -p1 -b .python3
|
||||
# Make sure bundled tinyxml is not used
|
||||
rm -r externals/tinyxml
|
||||
|
||||
%build
|
||||
# Manuals
|
||||
make DB2MAN=%{_datadir}/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl man
|
||||
xsltproc --nonet -o man/manual.html \
|
||||
%{_datadir}/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl \
|
||||
man/manual.docbook
|
||||
make DB2MAN=%{_datadir}/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl man
|
||||
pandoc man/manual.md -o man/manual.html -s --number-sections --toc
|
||||
pandoc man/reference-cfg-format.md -o man/reference-cfg-format.html -s --number-sections --toc
|
||||
|
||||
# Binaries
|
||||
mkdir objdir-%{_target_platform}
|
||||
cd objdir-%{_target_platform}
|
||||
# Add -fsigned-char to CXXFLAGS, to make all tests pass also on armv7hl
|
||||
# aarch64 ppc64le s390x, See https://trac.cppcheck.net/ticket/9359
|
||||
export CXXFLAGS="$RPM_OPT_FLAGS -fsigned-char"
|
||||
# Upstream doesn't support shared libraries (unversioned solib)
|
||||
%cmake .. -DCMAKE_BUILD_TYPE=Release -DMATCHCOMPILER=yes -DHAVE_RULES=yes -DBUILD_GUI=%{gui} -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTS=yes -DFILESDIR=%{_datadir}/Cppcheck
|
||||
# SMP make doesn't seem to work
|
||||
@ -120,7 +111,8 @@ cd objdir-%{_target_platform}/bin
|
||||
./testrunner -g -q
|
||||
|
||||
%files
|
||||
%doc AUTHORS COPYING man/manual.html
|
||||
%doc AUTHORS man/manual.html man/reference-cfg-format.html
|
||||
%license COPYING
|
||||
%{_datadir}/Cppcheck/
|
||||
%{_bindir}/cppcheck
|
||||
%{_mandir}/man1/cppcheck.1*
|
||||
@ -138,6 +130,9 @@ cd objdir-%{_target_platform}/bin
|
||||
%{_bindir}/cppcheck-htmlreport
|
||||
|
||||
%changelog
|
||||
* Sat Dec 21 2019 Wolfgang Stöggl <c72578@yahoo.de> - 1.90-1
|
||||
- New upstream version 1.90
|
||||
|
||||
* Thu Dec 12 2019 Steve Grubb <sgrubb@redhat.com> - 1.89-2
|
||||
- Add "-fsigned-char" to CXXFLAGS, to make tests pass
|
||||
- https://trac.cppcheck.net/ticket/9359
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (cppcheck-1.89.tar.gz) = 0e8f7ae6fe70261f69954ec830c20faff37126ec41a7fdc59ce91db99313a1c99e1850656efeb7182a37fb78fbf8402b71d72a11d6189a5bede2819bdde69b9b
|
||||
SHA512 (cppcheck-1.90.tar.gz) = 9d78ed05af3d46f399de1a993859cf41ec3abc9cd869e1e85c10af7f70e00487ada0c0134d049e0ace50b3f4913680b4f0e4fa94a5fde13833285879994303db
|
||||
|
Loading…
Reference in New Issue
Block a user