Hello community,
here is the log from the commit of package cppcheck for openSUSE:Factory checked in at 2018-12-28 12:35:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cppcheck (Old)
and /work/SRC/openSUSE:Factory/.cppcheck.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cppcheck"
Fri Dec 28 12:35:42 2018 rev:8 rq:661573 version:1.86
Changes:
--------
--- /work/SRC/openSUSE:Factory/cppcheck/cppcheck.changes 2018-12-21 08:22:25.329513644 +0100
+++ /work/SRC/openSUSE:Factory/.cppcheck.new.28833/cppcheck.changes 2018-12-28 12:35:43.299946708 +0100
@@ -1,0 +2,12 @@
+Thu Dec 27 10:03:28 UTC 2018 - Martin Pluskal
+
+- Small packaging enhancements
+
+-------------------------------------------------------------------
+Thu Dec 20 13:40:09 UTC 2018 - Christoph G
+
+- Use Python 3 instad of Python 2
+- Switch to CMake as the used build system, otherwise Python 3
+ could not be detected by plain make
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cppcheck.spec ++++++
--- /var/tmp/diff_new_pack.J8dX8F/_old 2018-12-28 12:35:43.767946381 +0100
+++ /var/tmp/diff_new_pack.J8dX8F/_new 2018-12-28 12:35:43.767946381 +0100
@@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@@ -24,14 +24,19 @@
Group: Development/Languages/C and C++
URL: http://cppcheck.sourceforge.net/
Source: https://downloads.sourceforge.net/cppcheck/cppcheck-%{version}.tar.bz2
+BuildRequires: cmake
BuildRequires: docbook-xsl-stylesheets
BuildRequires: gcc-c++
-BuildRequires: pcre-devel
-BuildRequires: python
+BuildRequires: libqt5-linguist-devel
+BuildRequires: pkgconfig
+BuildRequires: python3-base
BuildRequires: xsltproc
-Requires: python
-Requires: python-Pygments
-Requires: python-xml
+BuildRequires: pkgconfig(Qt5Core)
+BuildRequires: pkgconfig(Qt5Gui)
+BuildRequires: pkgconfig(Qt5PrintSupport)
+BuildRequires: pkgconfig(Qt5Widgets)
+BuildRequires: pkgconfig(libpcre)
+Requires: python3-Pygments
%description
This program tries to detect bugs that your C/C++ compiler don't see. Cppcheck
@@ -57,11 +62,6 @@
%package gui
Summary: A tool for static C/C++ code analysis
Group: Development/Languages/C and C++
-BuildRequires: pkgconfig
-BuildRequires: pkgconfig(Qt5Core)
-BuildRequires: pkgconfig(Qt5Gui)
-BuildRequires: pkgconfig(Qt5PrintSupport)
-BuildRequires: pkgconfig(Qt5Widgets)
Requires: cppcheck
%description gui
@@ -73,34 +73,36 @@
%setup -q
%build
-make %{?_smp_mflags} \
- CXXFLAGS="-DNDEBUG %{optflags}" \
- SRCDIR=build \
- CFGDIR=%{_datadir}/%{name} \
- HAVE_RULES=yes
-
-pushd gui
-%qmake5 \
- QMAKE_CXXFLAGS="-DNDEBUG %{optflags}" \
- HAVE_RULES=yes
+%cmake \
+ -DCMAKE_CXX_FLAGS="-DNDEBUG %{optflags}" \
+ -DBUILD_GUI=ON \
+ -DBUILD_TESTS=ON \
+ -DHAVE_RULES=yes
%make_jobs
-popd
+# does not work with CMake, directly call provided Makefile from source directory
+cd ..
make man \
DB2MAN=%{_datadir}/xml/docbook/stylesheet/nwalsh/current/manpages/docbook.xsl
+# use python3 as interpreter
+sed -i "s|env python|python3|g" htmlreport/cppcheck-htmlreport
+
%check
-make %{?_smp_mflags} test \
- CXXFLAGS="-DNDEBUG %{optflags}" \
- HAVE_RULES=yes
+export CXXFLAGS="%{optflags}"
+%make_jobs check
%install
-install -m 0755 -D cppcheck %{buildroot}%{_bindir}/cppcheck
-install -m 0755 -D htmlreport/cppcheck-htmlreport %{buildroot}%{_bindir}/cppcheck-htmlreport
-install -m 0755 -D gui/cppcheck-gui %{buildroot}%{_bindir}/cppcheck-gui
-install -m 0644 -D cppcheck.1 %{buildroot}%{_mandir}/man1/cppcheck.1
+install -Dpm 0755 build/bin/cppcheck \
+ %{buildroot}%{_bindir}/cppcheck
+install -Dpm 0755 htmlreport/cppcheck-htmlreport \
+ %{buildroot}%{_bindir}/cppcheck-htmlreport
+install -Dpm 0755 build/bin/cppcheck-gui \
+ %{buildroot}%{_bindir}/cppcheck-gui
+install -Dpm 0644 cppcheck.1 \
+ %{buildroot}%{_mandir}/man1/cppcheck.1
install -d %{buildroot}%{_datadir}/%{name}
-install -m 0644 cfg/*.cfg %{buildroot}%{_datadir}/%{name}
+install -pm 0644 cfg/*.cfg %{buildroot}%{_datadir}/%{name}
%files
%doc AUTHORS
@@ -108,7 +110,7 @@
%{_bindir}/cppcheck
%{_bindir}/cppcheck-htmlreport
%{_datadir}/%{name}/
-%{_mandir}/man1/cppcheck.1*
+%{_mandir}/man1/cppcheck.1%{?ext_man}
%files gui
%{_bindir}/cppcheck-gui