Compare commits
2 Commits
rawhide
...
main-riscv
Author | SHA1 | Date |
---|---|---|
David Abdurachmanov | 3adb2729f6 | |
David Abdurachmanov | fddddb3a48 |
|
@ -2,7 +2,7 @@
|
|||
|
||||
Name: cppcheck
|
||||
Version: 2.9
|
||||
Release: 1%{?dist}
|
||||
Release: 1.0.riscv64%{?dist}
|
||||
Summary: Tool for static C/C++ code analysis
|
||||
License: GPLv3+
|
||||
URL: http://cppcheck.wiki.sourceforge.net/
|
||||
|
@ -24,9 +24,11 @@ BuildRequires: tinyxml2-devel >= 2.1.0
|
|||
BuildRequires: zlib-devel
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
%ifnarch riscv64
|
||||
BuildRequires: qt5-qtbase-devel
|
||||
BuildRequires: qt5-qttools-devel
|
||||
BuildRequires: qt5-linguist
|
||||
%endif
|
||||
BuildRequires: make
|
||||
|
||||
|
||||
|
@ -37,12 +39,14 @@ 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).
|
||||
|
||||
%ifnarch riscv64
|
||||
%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
|
||||
|
@ -60,8 +64,10 @@ from xml files first generated using cppcheck.
|
|||
# Make sure bundled tinyxml2 is not used
|
||||
rm -r externals/tinyxml2
|
||||
# Generate the Qt online-help file
|
||||
%ifnarch riscv64
|
||||
cd gui/help
|
||||
qhelpgenerator-qt5 online-help.qhcp -o online-help.qhc
|
||||
%endif
|
||||
|
||||
%build
|
||||
# Manuals
|
||||
|
@ -71,13 +77,20 @@ pandoc man/reference-cfg-format.md -o man/reference-cfg-format.html -s --number-
|
|||
|
||||
# Binaries
|
||||
# Upstream doesn't support shared libraries (unversioned solib)
|
||||
%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 -DCMAKE_BUILD_TYPE=Release -DUSE_MATCHCOMPILER=yes -DHAVE_RULES=yes \
|
||||
%ifnarch riscv64
|
||||
-DBUILD_GUI=1 \
|
||||
%else
|
||||
-DBUILD_GUI=0 \
|
||||
%endif
|
||||
-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}
|
||||
%cmake_install
|
||||
install -D -p -m 644 cppcheck.1 %{buildroot}%{_mandir}/man1/cppcheck.1
|
||||
%ifnarch riscv64
|
||||
# Install desktop file
|
||||
desktop-file-validate %{buildroot}%{_datadir}/applications/cppcheck-gui.desktop
|
||||
# Install logo
|
||||
|
@ -85,6 +98,7 @@ install -D -p -m 644 gui/cppcheck-gui.png %{buildroot}%{_datadir}/pixmaps/cppche
|
|||
# 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
|
||||
%endif
|
||||
# Install htmlreport
|
||||
install -D -p -m 755 htmlreport/cppcheck-htmlreport %{buildroot}%{_bindir}/cppcheck-htmlreport
|
||||
# Restore execute permission of python files
|
||||
|
@ -101,17 +115,22 @@ cd %{_vpath_builddir}/bin
|
|||
%{_bindir}/cppcheck
|
||||
%{_mandir}/man1/cppcheck.1*
|
||||
|
||||
%ifnarch riscv64
|
||||
%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
|
||||
* Tue Sep 13 2022 David Abdurachmanov <davidlt@rivosinc.com> - 2.9-1.0.riscv64
|
||||
- Disable QT based GUI on riscv64
|
||||
|
||||
* Sun Aug 28 2022 Wolfgang Stöggl <c72578@yahoo.de> - 2.9-1
|
||||
- Update to 2.9
|
||||
|
||||
|
|
Loading…
Reference in New Issue