Compare commits

...

46 Commits

Author SHA1 Message Date
Steve Grubb dc3a190b2f Revert "Update to 2.10"
This reverts commit 2fd9c1984d.
2023-02-02 19:01:48 -05:00
Steve Grubb 2fd9c1984d Update to 2.10
Drop python3 patch as new version uses python3
2023-02-02 18:09:51 -05:00
Fedora Release Engineering b16bda44e7 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 00:35:14 +00:00
Steve Grubb 1f301daa60 SPDX Migration 2023-01-13 10:03:49 -05:00
Rich Mattes c2a89aefa3 Rebuild for tinyxml2-9.0.0 2022-09-25 14:40:13 -04:00
Wolfgang Stöggl c375328a31 Update to 2.9 2022-08-28 16:34:32 +02:00
Fedora Release Engineering 411869e6e3 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-20 23:39:47 +00:00
Wolfgang Stöggl 69bb397641 Update to 2.8.2 2022-07-16 06:22:17 +02:00
Wolfgang Stöggl cbf882a9c7 Update to 2.8
- Remove z3-devel, see upstream:
  https://github.com/danmar/cppcheck/commit/8f386e1
2022-05-25 06:14:16 +02:00
Jerry James 84ec457e0a Rebuild for z3 4.8.17 2022-05-19 13:41:06 -06:00
Wolfgang Stöggl 055678f7d2 Update to 2.7.4
- Remove patch:
  cppcheck-2.7.3-tinyxml2.patch
2022-03-25 21:31:10 +01:00
Wolfgang Stöggl bc53bd0890 Update tinyxml2 patch and add upstream link
- Do not use z3 in case of i686. The i686 build fails since
  z3-4.8.15-1
2022-03-23 22:26:24 +01:00
Wolfgang Stöggl ef547dcd11 Simplify cppcheck-2.7.3-tinyxml2.patch 2022-03-19 17:20:53 +01:00
Wolfgang Stöggl 9e60ef3b47 Update to 2.7.3
- Update tinyxml2 patch:
  cppcheck-2.7.3-tinyxml2.patch
- Remove patch:
  cppcheck-2.7-disable-test-testmathlib-tostring.patch
2022-03-19 15:21:17 +01:00
Wolfgang Stöggl 84bdb32ee3 Update to 2.7
- Add the following patches:
  cppcheck-2.7-tinyxml2.patch
  cppcheck-2.7-disable-test-testmathlib-tostring.patch
- Remove patch:
  cppcheck-2.5-disable-test-testexprengine-array7.patch
2022-02-09 21:00:27 +01:00
Fedora Release Engineering d2128a85bc - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-19 23:54:57 +00:00
Wolfgang Stöggl c0747da1f3 Update to 2.6
- Remove the following patch, which is not needed anymore in 2.6:
  cppcheck-2.5-fix_failed_to_load_translation_for_English.patch
- Remove -DNO_UNIX_SIGNAL_HANDLING to CXXFLAGS, due to new upstream
  fix: https://github.com/danmar/cppcheck/commit/8869ee3
- Restore execute permission of python files.
  Fixes rpmlint errors (8x): E: non-executable-script
2021-10-02 21:05:33 +02:00
Wolfgang Stöggl 6f85fa2223 Fix Failed to load translation for English
- Add patch:
  cppcheck-2.5-fix_failed_to_load_translation_for_English.patch
- Fixes: #1983599
2021-07-23 21:54:42 +02:00
Fedora Release Engineering e2c1dbb34c - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 20:03:59 +00:00
Fedora Release Engineering 9fe67b5a23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 15:08:44 +00:00
Wolfgang Stöggl 82d93b85ab Update to 2.5
- Remove the following patches, which are not needed anymore in 2.5:
  cppcheck-2.3-Fix-issue-10024-FP-nullPointerRedundantCheck-when-us.patch
  cppcheck-2.3-gcc11.patch
- Add patch: cppcheck-2.5-disable-test-testexprengine-array7.patch
- Add -DNO_UNIX_SIGNAL_HANDLING to CXXFLAGS
2021-07-04 21:34:39 +02:00
Tomas Hrnciar 259fc737cb BuildRequire setuptools explicitly
See https://fedoraproject.org/wiki/Changes/Reduce_dependencies_on_python3-setuptools
2021-04-19 13:18:31 +02:00
Ondrej Mosnacek 2295200e13 Backport a fix for nullPointerRedundantCheck
Add a patch backported from upstream that fixes a bug which breaks the
build of libkcapi (https://bugzilla.redhat.com/show_bug.cgi?id=1923600).

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
2021-02-02 14:23:24 +01:00
Fedora Release Engineering efc659ef4d - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 02:37:49 +00:00
Wolfgang Stöggl 43e9f529a3 Add year to changelog entry 2021-01-05 20:51:26 +01:00
Timm Bäder 8e28e7a662 Explicitly disable oss-fuzz
oss-fuzz is never built when non-clang compilers are in use, but when
using clang and a system-wide tinyxml2 installation, cmake prints a
confusing error message. Disable it explicitly.
2021-01-05 18:37:53 +01:00
Tom Stellard 72b381084e Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2020-12-17 03:56:54 +00:00
Wolfgang Stöggl c17ed7fd3f Update to 2.3
- Remove the following patches, which are not needed anymore in 2.3:
  cppcheck-2.2-tinyxml.patch
  cppcheck-2.2-exprengine.patch
  cppcheck-2.2-online-help.patch
  cppcheck-2.2-online-help_q_readonly.patch
- Update patch:
  cppcheck-2.3-gcc11.patch
- Add -DUSE_BUNDLED_TINYXML2=OFF to cmake
2020-12-05 21:16:27 +01:00
Wolfgang Stöggl 60fb113809 Add cppcheck-2.2-online-help_q_readonly.patch
- Add patch from merged upstream PR concerning Qt online-help:
  https://github.com/danmar/cppcheck/pull/2890
- Remove workaround for timestamp of online-help.qch
2020-11-09 12:51:55 +01:00
Wolfgang Stöggl 8b7b1c4cbd Ensure stored timestamp of online-help.qch is UTC
Make sure, that the timestamp of online-help.qch, which is stored
inside online-help.qhc, is in UTC. This is not relevant when the rpm
is built as usual on servers using UTC, but on systems with a different
local timezone.
2020-10-23 21:40:30 +02:00
Wolfgang Stöggl 295c9c21fd Fix missing Contents and Index in Qt help file
Adjust the timestamp of online-help.qch to the value expected by
online-help.qhc
- The rpm is built on servers using UTC. Get this UTC timestamp and
  apply it to the file under the local TZ
- Further details:
  9693940dad (commitcomment-43482215)
2020-10-22 20:20:10 +02:00
Jeff Law 3b49bcefb2 Finish last change 2020-10-13 17:05:30 -06:00
Jeff Law 755aeefb31 Fix missing #include for gcc-11 2020-10-13 17:03:42 -06:00
Wolfgang Stöggl 7148cf7978 Fix Helpfile 'online-help.qhc' was not found
- Add patch: cppcheck-2.2-online-help.patch
- Allow building under F31 and F32 by adding
  %%undefine __cmake_in_source_build
2020-10-11 08:33:34 +02:00
Wolfgang Stöggl 5073703177 Update to 2.2
- Add BR qt5-qttools-devel
- Update patches:
  cppcheck-2.2-tinyxml.patch
  cppcheck-2.2-translations.patch
- Add patch:
  cppcheck-2.2-exprengine.patch
2020-10-04 18:57:40 +02:00
Wolfgang Stöggl 27cade0386 Prepare for Cppcheck 2.2: Rename patch files 2020-10-04 18:52:57 +02:00
Susi Lehtola 563456da8e Gui package is always built. 2020-08-18 12:42:08 +02:00
Wolfgang Stöggl def5035db3 Fix FTBFS #1863368
- Use %cmake_build and %cmake_install macros to fix FTBFS (#1863368)
- Rearrange BuildRequires:
  Put qt5-qtbase-devel and qt5-linguist inside if %{gui}
  Move cmake, python3-devel and z3-devel out of if %{gui}
2020-08-04 19:28:32 +02:00
Fedora Release Engineering c2bf8eebba - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-08-01 00:28:41 +00:00
Fedora Release Engineering 256e13b8c3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-27 14:39:10 +00:00
Susi Lehtola 061eacf9ca No need for EPEL specifics in spec since cppcheck is included in RHEL8. 2020-06-17 11:48:46 +02:00
Wolfgang Stöggl 4bdd5ae4e2 Enable Z3 on Fedora builds
Remark: Z3 is not available under epel 7 or epel 8
However, add general support for epel 8 to the spec file
in addition to epel 7 using "%if 0%{?rhel} >= 7"
2020-06-16 20:29:28 +02:00
Susi Lehtola 2035cd292a Update to 2.1. 2020-06-15 11:54:59 +02:00
Susi Lehtola 5690ed9b1d No qt5-devel, add cmake patch 2020-05-11 11:09:39 +02:00
Susi Lehtola d4ec6a9894 Update to 2.0. 2020-05-11 10:46:49 +02:00
Fedora Release Engineering 275919b43c - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-28 14:54:44 +00:00
5 changed files with 156 additions and 150 deletions

12
.gitignore vendored
View File

@ -41,3 +41,15 @@ cppcheck-1.44.tar.bz2
/cppcheck-1.88.tar.gz
/cppcheck-1.89.tar.gz
/cppcheck-1.90.tar.gz
/cppcheck-2.0.tar.gz
/cppcheck-2.1.tar.gz
/cppcheck-2.2.tar.gz
/cppcheck-2.3.tar.gz
/cppcheck-2.5.tar.gz
/cppcheck-2.6.tar.gz
/cppcheck-2.7.tar.gz
/cppcheck-2.7.3.tar.gz
/cppcheck-2.7.4.tar.gz
/cppcheck-2.8.tar.gz
/cppcheck-2.8.2.tar.gz
/cppcheck-2.9.tar.gz

View File

@ -1,84 +0,0 @@
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/)
include_directories(${PROJECT_SOURCE_DIR}/externals/simplecpp/)
file(GLOB hdrs "*.h")
@@ -8,7 +7,7 @@ file(GLOB mainfile "main.cpp")
list(REMOVE_ITEM srcs ${mainfile})
add_library(cli_objs OBJECT ${hdrs} ${srcs})
-add_executable(cppcheck ${hdrs} ${mainfile} $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
+add_executable(cppcheck ${hdrs} ${mainfile} $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:simplecpp_objs>)
if (HAVE_RULES)
find_library(PCRE_LIBRARY pcre)
target_link_libraries(cppcheck ${PCRE_LIBRARY})
@@ -18,6 +17,7 @@ endif()
if (WIN32 AND NOT BORLAND)
target_link_libraries(cppcheck Shlwapi.lib)
endif()
+target_link_libraries(cppcheck tinyxml2)
install(TARGETS cppcheck
RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
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()
-add_subdirectory(externals/tinyxml)
add_subdirectory(externals/simplecpp)
add_subdirectory(lib) # CppCheck Library
add_subdirectory(cli) # Client application
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()
include_directories(${PROJECT_SOURCE_DIR}/lib/)
- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/)
file(GLOB hdrs "*.h")
file(GLOB srcs "*.cpp")
@@ -20,11 +19,11 @@ if (BUILD_GUI)
QT5_ADD_RESOURCES(resources "gui.qrc")
QT5_ADD_TRANSLATION(qms ${tss})
- add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
+ add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:simplecpp_objs>)
if (HAVE_RULES)
target_link_libraries(cppcheck-gui pcre)
endif()
- target_link_libraries(cppcheck-gui Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport)
+ target_link_libraries(cppcheck-gui tinyxml2 Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport)
if(WITH_QCHART)
target_compile_definitions (cppcheck-gui PRIVATE HAVE_QCHART )
target_link_libraries(cppcheck-gui Qt5::Charts)
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)
include_directories(${PROJECT_SOURCE_DIR}/externals/simplecpp/)
file(GLOB hdrs "*.h")
file(GLOB srcs "*.cpp")
- add_executable(testrunner ${hdrs} ${srcs} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
+ add_executable(testrunner ${hdrs} ${srcs} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:simplecpp_objs>)
if (HAVE_RULES)
target_link_libraries(testrunner pcre)
endif()
+ target_link_libraries(testrunner tinyxml2)
add_custom_target(copy_cfg ALL
COMMENT "Copying cfg files")

View File

@ -1,7 +1,7 @@
diff -urp cppcheck-1.89.orig/gui/CMakeLists.txt cppcheck-1.89/gui/CMakeLists.txt
--- cppcheck-1.89.orig/gui/CMakeLists.txt 2019-12-07 13:41:32.651559443 -0500
+++ cppcheck-1.89/gui/CMakeLists.txt 2019-12-07 13:45:16.037535529 -0500
@@ -30,7 +30,7 @@ if (BUILD_GUI)
diff -urp cppcheck-2.2.orig/gui/CMakeLists.txt cppcheck-2.2/gui/CMakeLists.txt
--- cppcheck-2.2.orig/gui/CMakeLists.txt 2020-10-03 11:05:53.000000000 +0200
+++ cppcheck-2.2/gui/CMakeLists.txt 2020-10-04 07:18:23.309796000 +0200
@@ -40,7 +40,7 @@ if (BUILD_GUI)
endif()
install(TARGETS cppcheck-gui RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications)
@ -10,12 +10,12 @@ diff -urp cppcheck-1.89.orig/gui/CMakeLists.txt cppcheck-1.89/gui/CMakeLists.txt
install(FILES cppcheck-gui.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
diff -urp cppcheck-1.89.orig/gui/translationhandler.cpp cppcheck-1.89/gui/translationhandler.cpp
--- cppcheck-1.89.orig/gui/translationhandler.cpp 2019-09-01 09:01:12.000000000 -0400
+++ cppcheck-1.89/gui/translationhandler.cpp 2019-12-07 13:46:47.085525782 -0500
@@ -116,15 +116,7 @@ bool TranslationHandler::setLanguage(con
if (datadir.isEmpty())
datadir = appPath;
diff -urp cppcheck-2.2.orig/gui/translationhandler.cpp cppcheck-2.2/gui/translationhandler.cpp
--- cppcheck-2.2.orig/gui/translationhandler.cpp 2020-10-03 11:05:53.000000000 +0200
+++ cppcheck-2.2/gui/translationhandler.cpp 2020-10-04 07:19:44.765892500 +0200
@@ -113,15 +113,7 @@ bool TranslationHandler::setLanguage(con
QString datadir = getDataDir();
- QString translationFile;
- if (QFile::exists(datadir + "/lang/" + mTranslations[index].mFilename + ".qm"))
@ -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

View File

@ -1,45 +1,34 @@
# Gui built in all branches
%global gui 1
%undefine __cmake_in_source_build
Name: cppcheck
Version: 1.90
Version: 2.9
Release: 4%{?dist}
Summary: Tool for static C/C++ code analysis
License: GPLv3+
License: GPL-3.0
URL: http://cppcheck.wiki.sourceforge.net/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Source0: https://github.com/danmar/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
# Use system tinyxml2
Patch0: cppcheck-1.90-tinyxml.patch
# Fix location of translations
Patch1: cppcheck-1.89-translations.patch
Patch0: cppcheck-2.2-translations.patch
# Select python3 explicitly
Patch2: cppcheck-1.88-htmlreport-python3.patch
Patch1: 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
BuildRequires: zlib-devel
%if %{gui}
%if 0%{?rhel} == 7
# no qt5-devel metapackage!
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-linguist
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: cmake3
%else
BuildRequires: qt5-devel
BuildRequires: python3-devel
BuildRequires: cmake
%endif
%else
Obsoletes: %{name}-gui < %{version}-%{release}
%endif
BuildRequires: python3-setuptools
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qttools-devel
BuildRequires: qt5-linguist
BuildRequires: make
%description
Cppcheck is a static analysis tool for C/C++ code. Unlike C/C++
@ -48,24 +37,17 @@ errors in the code. Cppcheck primarily detects the types of bugs that
the compilers normally do not detect. The goal is to detect only real
errors in the code (i.e. have zero false positives).
%if %{gui}
%package gui
Summary: Graphical user interface for cppcheck
Requires: %{name}%{?_isa} = %{version}-%{release}
%description gui
This package contains the graphical user interface for cppcheck.
%endif
%package htmlreport
Summary: HTML reporting for cppcheck
Requires: %{name}%{?_isa} = %{version}-%{release}
%if 0%{?rhel} == 7
# RHEL packages aren't versioned
Requires: python%{python3_pkgversion}-pygments
%else
Requires: python3-pygments
%endif
%description htmlreport
This package contains the Python utility for generating html reports
@ -73,11 +55,13 @@ from xml files first generated using cppcheck.
%prep
%setup -q
%patch0 -p1 -b .tinyxml
%patch1 -p1 -b .translations
%patch2 -p1 -b .python3
# Make sure bundled tinyxml is not used
rm -r externals/tinyxml
%patch0 -p1 -b .translations
%patch1 -p1 -b .python3
# Make sure bundled tinyxml2 is not used
rm -r externals/tinyxml2
# Generate the Qt online-help file
cd gui/help
qhelpgenerator-qt5 online-help.qhcp -o online-help.qhc
%build
# Manuals
@ -86,35 +70,28 @@ 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}
# Upstream doesn't support shared libraries (unversioned solib)
%if 0%{?rhel} == 7
%cmake3 .. -DCMAKE_BUILD_TYPE=Release -DUSE_MATCHCOMPILER=yes -DHAVE_RULES=yes -DBUILD_GUI=%{gui} -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTS=yes -DFILESDIR=%{_datadir}/Cppcheck
%else
%cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_MATCHCOMPILER=yes -DHAVE_RULES=yes -DBUILD_GUI=%{gui} -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTS=yes -DFILESDIR=%{_datadir}/Cppcheck
%endif
# SMP make doesn't seem to work
make cppcheck
%cmake -DCMAKE_BUILD_TYPE=Release -DUSE_MATCHCOMPILER=yes -DHAVE_RULES=yes -DBUILD_GUI=1 -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTS=yes -DFILESDIR=%{_datadir}/Cppcheck -DUSE_BUNDLED_TINYXML2=OFF -DENABLE_OSS_FUZZ=OFF
%cmake_build
%install
rm -rf %{buildroot}
make -C objdir-%{_target_platform} DESTDIR=%{buildroot} install
%cmake_install
install -D -p -m 644 cppcheck.1 %{buildroot}%{_mandir}/man1/cppcheck.1
%if %{gui}
# Install desktop file
desktop-file-validate %{buildroot}%{_datadir}/applications/cppcheck-gui.desktop
# Install logo
install -D -p -m 644 gui/cppcheck-gui.png %{buildroot}%{_datadir}/pixmaps/cppcheck-gui.png
%endif
# Install the Qt online-help file
install -D -p -m 644 gui/help/online-help.qhc %{buildroot}%{_datadir}/Cppcheck/help/online-help.qhc
install -D -p -m 644 gui/help/online-help.qch %{buildroot}%{_datadir}/Cppcheck/help/online-help.qch
# Install htmlreport
install -D -p -m 755 htmlreport/cppcheck-htmlreport %{buildroot}%{_bindir}/cppcheck-htmlreport
# Restore execute permission of python files
grep -l "#\!/usr/bin/env python3" %{buildroot}%{_datadir}/Cppcheck/addons/*.py | xargs chmod +x
%check
cd objdir-%{_target_platform}/bin
cd %{_vpath_builddir}/bin
./testrunner -g -q
%files
@ -124,19 +101,120 @@ cd objdir-%{_target_platform}/bin
%{_bindir}/cppcheck
%{_mandir}/man1/cppcheck.1*
%if %{gui}
%files gui
%{_bindir}/cppcheck-gui
%{_datadir}/applications/cppcheck-gui.desktop
%{_datadir}/pixmaps/cppcheck-gui.png
%{_datadir}/icons/hicolor/64x64/apps/cppcheck-gui.png
%{_datadir}/icons/hicolor/scalable/apps/cppcheck-gui.svg
%endif
%files htmlreport
%{_bindir}/cppcheck-htmlreport
%changelog
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.9-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jan 13 2023 Steve Grubb <sgrubb@redhat.com> - 2.9-3
- SPDX Migration
* Sun Sep 25 2022 Rich Mattes <richmattes@gmail.com> - 2.9-2
- Rebuild for tinyxml2-9.0.0
* Sun Aug 28 2022 Wolfgang Stöggl <c72578@yahoo.de> - 2.9-1
- Update to 2.9
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sat Jul 16 2022 Wolfgang Stöggl <c72578@yahoo.de> - 2.8.2-1
- Update to 2.8.2
* Wed May 25 2022 Wolfgang Stöggl <c72578@yahoo.de> - 2.8-1
- Update to 2.8
* Thu May 19 2022 Jerry James <loganjerry@gmail.com> - 2.7.4-2
- Rebuild for z3 4.8.17
* Fri Mar 25 2022 Wolfgang Stöggl <c72578@yahoo.de> - 2.7.4-1
- Update to 2.7.4
* Wed Mar 23 2022 Wolfgang Stöggl <c72578@yahoo.de> - 2.7.3-2
- Update tinyxml2 patch, add upstream link and rebuild
* Sat Mar 19 2022 Wolfgang Stöggl <c72578@yahoo.de> - 2.7.3-1
- Update to 2.7.3.
* Tue Feb 08 2022 Wolfgang Stöggl <c72578@yahoo.de> - 2.7-1
- Update to 2.7.
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Sat Oct 02 2021 Wolfgang Stöggl <c72578@yahoo.de> - 2.6-1
- Update to 2.6.
* Fri Jul 23 2021 Wolfgang Stöggl <c72578@yahoo.de> - 2.5-3
- Fix Failed to load translation for English (#1983599)
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Sun Jul 04 2021 Wolfgang Stöggl <c72578@yahoo.de> - 2.5-1
- Update to 2.5.
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jan 05 2021 Timm Bäder <tbaeder@redhat.com> - 2.3-2
- Explicitly disable oss-fuzz
* Sat Dec 05 2020 Wolfgang Stöggl <c72578@yahoo.de> - 2.3-1
- Update to 2.3.
* Sun Nov 08 2020 Wolfgang Stöggl <c72578@yahoo.de> - 2.2-5
- Add cppcheck-2.2-online-help_q_readonly.patch
* Thu Oct 22 2020 Wolfgang Stöggl <c72578@yahoo.de> - 2.2-4
- Fix missing Contents and Index in Qt online-help file
* Tue Oct 13 2020 Jeff Law <law@redhat.com> - 2.2-3
- Fix missing #include for gcc-11
* Sun Oct 11 2020 Wolfgang Stöggl <c72578@yahoo.de> - 2.2-2
- Fix Helpfile 'online-help.qhc' was not found
* Sun Oct 04 2020 Wolfgang Stöggl <c72578@yahoo.de> - 2.2-1
- Update to 2.2.
* Tue Aug 18 2020 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.1-7
- Gui package is always built.
* Tue Aug 04 2020 Wolfgang Stöggl <c72578@yahoo.de> - 2.1-6
- Fix FTBFS #1863368
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-5
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jun 16 2020 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.1-3
- Drop EPEL specifics since cppcheck is included in RHEL8.
* Tue Jun 16 2020 Wolfgang Stöggl <c72578@yahoo.de> - 2.1-2
- Enable Z3 on Fedora builds.
* Mon Jun 15 2020 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.1-1
- Update to 2.1.
* Mon May 11 2020 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.0-1
- Update to 2.0.
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.90-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Dec 24 2019 Wolfgang Stöggl <c72578@yahoo.de> - 1.90-4
- Use python3 on EPEL7

View File

@ -1 +1 @@
SHA512 (cppcheck-1.90.tar.gz) = 9d78ed05af3d46f399de1a993859cf41ec3abc9cd869e1e85c10af7f70e00487ada0c0134d049e0ace50b3f4913680b4f0e4fa94a5fde13833285879994303db
SHA512 (cppcheck-2.9.tar.gz) = 69204a7ceac087470201482894e6422b99d0849f08641e80b2e341c9d164a1d2095e3a08a1fba2e9fa681783d07fe7277b30ea0cc0bf582431b5d13ab2f58c1f