From 4bdd5ae4e274918706b647b492db8b0f25362c28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20St=C3=B6ggl?= Date: Tue, 16 Jun 2020 20:29:28 +0200 Subject: [PATCH] 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" --- cppcheck.spec | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cppcheck.spec b/cppcheck.spec index 87e79a7..da543c6 100644 --- a/cppcheck.spec +++ b/cppcheck.spec @@ -3,7 +3,7 @@ Name: cppcheck Version: 2.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Tool for static C/C++ code analysis License: GPLv3+ URL: http://cppcheck.wiki.sourceforge.net/ @@ -28,13 +28,13 @@ BuildRequires: qt5-qtbase-devel BuildRequires: qt5-linguist %if %{gui} -%if 0%{?rhel} == 7 -# no qt5-devel metapackage! +%if 0%{?rhel} >= 7 BuildRequires: python%{python3_pkgversion}-devel BuildRequires: cmake3 %else BuildRequires: python3-devel BuildRequires: cmake +BuildRequires: z3-devel >= 4.7.1 %endif %else Obsoletes: %{name}-gui < %{version}-%{release} @@ -59,7 +59,7 @@ This package contains the graphical user interface for cppcheck. %package htmlreport Summary: HTML reporting for cppcheck Requires: %{name}%{?_isa} = %{version}-%{release} -%if 0%{?rhel} == 7 +%if 0%{?rhel} >= 7 # RHEL packages aren't versioned Requires: python%{python3_pkgversion}-pygments %else @@ -88,10 +88,10 @@ pandoc man/reference-cfg-format.md -o man/reference-cfg-format.html -s --number- mkdir objdir-%{_target_platform} cd objdir-%{_target_platform} # Upstream doesn't support shared libraries (unversioned solib) -%if 0%{?rhel} == 7 +%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 +%cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_MATCHCOMPILER=yes -DUSE_Z3=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 @@ -136,6 +136,9 @@ cd objdir-%{_target_platform}/bin %{_bindir}/cppcheck-htmlreport %changelog +* Tue Jun 16 2020 Wolfgang Stöggl - 2.1-2 +- Enable Z3 on Fedora builds. + * Mon Jun 15 2020 Susi Lehtola - 2.1-1 - Update to 2.1.