forked from pool/cppcheck
Accepting request 661440 from home:mathletic:branches:devel:tools
- 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 OBS-URL: https://build.opensuse.org/request/show/661440 OBS-URL: https://build.opensuse.org/package/show/devel:tools/cppcheck?expand=0&rev=57
This commit is contained in:
parent
360f7317bb
commit
5e143cf72d
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Dec 20 13:40:09 UTC 2018 - Christoph G <foss@grueninger.de>
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Dec 19 21:31:18 UTC 2018 - Christoph G <foss@grueninger.de>
|
Wed Dec 19 21:31:18 UTC 2018 - Christoph G <foss@grueninger.de>
|
||||||
|
|
||||||
|
@ -24,14 +24,14 @@ License: GPL-3.0-or-later
|
|||||||
Group: Development/Languages/C and C++
|
Group: Development/Languages/C and C++
|
||||||
URL: http://cppcheck.sourceforge.net/
|
URL: http://cppcheck.sourceforge.net/
|
||||||
Source: https://downloads.sourceforge.net/cppcheck/cppcheck-%{version}.tar.bz2
|
Source: https://downloads.sourceforge.net/cppcheck/cppcheck-%{version}.tar.bz2
|
||||||
|
BuildRequires: cmake
|
||||||
BuildRequires: docbook-xsl-stylesheets
|
BuildRequires: docbook-xsl-stylesheets
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: pcre-devel
|
BuildRequires: pcre-devel
|
||||||
BuildRequires: python
|
BuildRequires: python3
|
||||||
BuildRequires: xsltproc
|
BuildRequires: xsltproc
|
||||||
Requires: python
|
Requires: python3
|
||||||
Requires: python-Pygments
|
Requires: python3-Pygments
|
||||||
Requires: python-xml
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This program tries to detect bugs that your C/C++ compiler don't see. Cppcheck
|
This program tries to detect bugs that your C/C++ compiler don't see. Cppcheck
|
||||||
@ -62,6 +62,8 @@ BuildRequires: pkgconfig(Qt5Core)
|
|||||||
BuildRequires: pkgconfig(Qt5Gui)
|
BuildRequires: pkgconfig(Qt5Gui)
|
||||||
BuildRequires: pkgconfig(Qt5PrintSupport)
|
BuildRequires: pkgconfig(Qt5PrintSupport)
|
||||||
BuildRequires: pkgconfig(Qt5Widgets)
|
BuildRequires: pkgconfig(Qt5Widgets)
|
||||||
|
BuildRequires: libqt5-linguist-devel
|
||||||
|
|
||||||
Requires: cppcheck
|
Requires: cppcheck
|
||||||
|
|
||||||
%description gui
|
%description gui
|
||||||
@ -73,31 +75,29 @@ doesn't see.
|
|||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make %{?_smp_mflags} \
|
%define __builddir build
|
||||||
CXXFLAGS="-DNDEBUG %{optflags}" \
|
|
||||||
SRCDIR=build \
|
%cmake \
|
||||||
CFGDIR=%{_datadir}/%{name} \
|
-DCMAKE_CXX_FLAGS="-DNDEBUG %{optflags}" \
|
||||||
HAVE_RULES=yes
|
-DBUILD_GUI=ON \
|
||||||
|
-DBUILD_TESTS=ON \
|
||||||
|
-DHAVE_RULES=yes
|
||||||
|
|
||||||
pushd gui
|
|
||||||
%qmake5 \
|
|
||||||
QMAKE_CXXFLAGS="-DNDEBUG %{optflags}" \
|
|
||||||
HAVE_RULES=yes
|
|
||||||
%make_jobs
|
%make_jobs
|
||||||
popd
|
|
||||||
|
|
||||||
|
# does not work with CMake, directly call provided Makefile from source directory
|
||||||
|
cd ..
|
||||||
make man \
|
make man \
|
||||||
DB2MAN=%{_datadir}/xml/docbook/stylesheet/nwalsh/current/manpages/docbook.xsl
|
DB2MAN=%{_datadir}/xml/docbook/stylesheet/nwalsh/current/manpages/docbook.xsl
|
||||||
|
cd build
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make %{?_smp_mflags} test \
|
%make_jobs check
|
||||||
CXXFLAGS="-DNDEBUG %{optflags}" \
|
|
||||||
HAVE_RULES=yes
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install -m 0755 -D cppcheck %{buildroot}%{_bindir}/cppcheck
|
install -m 0755 -D build/bin/cppcheck %{buildroot}%{_bindir}/cppcheck
|
||||||
install -m 0755 -D htmlreport/cppcheck-htmlreport %{buildroot}%{_bindir}/cppcheck-htmlreport
|
install -m 0755 -D htmlreport/cppcheck-htmlreport %{buildroot}%{_bindir}/cppcheck-htmlreport
|
||||||
install -m 0755 -D gui/cppcheck-gui %{buildroot}%{_bindir}/cppcheck-gui
|
install -m 0755 -D build/bin/cppcheck-gui %{buildroot}%{_bindir}/cppcheck-gui
|
||||||
install -m 0644 -D cppcheck.1 %{buildroot}%{_mandir}/man1/cppcheck.1
|
install -m 0644 -D cppcheck.1 %{buildroot}%{_mandir}/man1/cppcheck.1
|
||||||
install -d %{buildroot}%{_datadir}/%{name}
|
install -d %{buildroot}%{_datadir}/%{name}
|
||||||
install -m 0644 cfg/*.cfg %{buildroot}%{_datadir}/%{name}
|
install -m 0644 cfg/*.cfg %{buildroot}%{_datadir}/%{name}
|
||||||
|
Loading…
Reference in New Issue
Block a user