From 7148cf79788dc28ed2b378a50c7865a19da4efe2 Mon Sep 17 00:00:00 2001 From: Wolfgang Stöggl Date: Oct 11 2020 06:33:34 +0000 Subject: 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 --- diff --git a/cppcheck-2.2-online-help.patch b/cppcheck-2.2-online-help.patch new file mode 100644 index 0000000..f26fb7f --- /dev/null +++ b/cppcheck-2.2-online-help.patch @@ -0,0 +1,25 @@ +From df9f6f38be7ed385b0b56d5c6101e34f717e2318 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Wolfgang=20St=C3=B6ggl?= +Date: Sun, 11 Oct 2020 03:49:27 +0200 +Subject: [PATCH] Look for Qt online-help file also in FILESDIR (#2844) + +--- + gui/helpdialog.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/gui/helpdialog.cpp b/gui/helpdialog.cpp +index 706266968b..c158c8092f 100644 +--- a/gui/helpdialog.cpp ++++ b/gui/helpdialog.cpp +@@ -33,6 +33,11 @@ static QString getHelpFile() + << datadir + << (QApplication::applicationDirPath() + "/help") + << QApplication::applicationDirPath(); ++#ifdef FILESDIR ++ const QString filesdir = FILESDIR; ++ paths << (filesdir + "/help") ++ << filesdir; ++#endif + for (QString p: paths) { + QString filename = p + "/online-help.qhc"; + if (QFileInfo(filename).exists()) diff --git a/cppcheck.spec b/cppcheck.spec index d004e3e..bf0876f 100644 --- a/cppcheck.spec +++ b/cppcheck.spec @@ -1,6 +1,8 @@ +%undefine __cmake_in_source_build + Name: cppcheck Version: 2.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Tool for static C/C++ code analysis License: GPLv3+ URL: http://cppcheck.wiki.sourceforge.net/ @@ -14,6 +16,9 @@ Patch1: cppcheck-2.2-translations.patch Patch2: cppcheck-1.88-htmlreport-python3.patch # https://github.com/danmar/cppcheck/commit/b052843 Patch3: cppcheck-2.2-exprengine.patch +# Look for Qt online-help file also in FILESDIR +# https://github.com/danmar/cppcheck/commit/df9f6f3 +Patch4: cppcheck-2.2-online-help.patch BuildRequires: gcc-c++ BuildRequires: pcre-devel @@ -60,8 +65,12 @@ from xml files first generated using cppcheck. %patch1 -p1 -b .translations %patch2 -p1 -b .python3 %patch3 -p1 -b .exprengine +%patch4 -p1 -b .online-help # Make sure bundled tinyxml is not used rm -r externals/tinyxml +# Generate the Qt online-help file +cd gui/help +qhelpgenerator-qt5 online-help.qhcp -o online-help.qhc %build # Manuals @@ -82,6 +91,9 @@ install -D -p -m 644 cppcheck.1 %{buildroot}%{_mandir}/man1/cppcheck.1 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 +# 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 @@ -108,6 +120,9 @@ cd %{_vpath_builddir}/bin %{_bindir}/cppcheck-htmlreport %changelog +* Sun Oct 11 2020 Wolfgang Stöggl - 2.2-2 +- Fix Helpfile 'online-help.qhc' was not found + * Sun Oct 04 2020 Wolfgang Stöggl - 2.2-1 - Update to 2.2.