forked from pool/zxing-cpp
Accepting request 1004648 from home:cgiboudeaux:branches:devel:libraries:c_c++
Update to 1.4.0 OBS-URL: https://build.opensuse.org/request/show/1004648 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/zxing-cpp?expand=0&rev=24
This commit is contained in:
@@ -16,9 +16,14 @@
|
||||
#
|
||||
|
||||
|
||||
# gmock is too old in 15.3 / 15.4
|
||||
# TODO: Check which version will be in 15.5
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without tests
|
||||
%endif
|
||||
%define sover 1
|
||||
Name: zxing-cpp
|
||||
Version: 1.2.0
|
||||
Version: 1.4.0
|
||||
Release: 0
|
||||
Summary: Library for processing 1D and 2D barcodes
|
||||
License: Apache-2.0 AND Zlib AND LGPL-2.1-with-Qt-Company-Qt-exception-1.1
|
||||
@@ -26,23 +31,11 @@ Group: Development/Languages/C and C++
|
||||
URL: https://github.com/nu-book/zxing-cpp/
|
||||
Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Source99: baselibs.conf
|
||||
# PATCH-FIX-OPENSUSE cmake-check-system-first.patch -- Search system for needed libraries first
|
||||
Patch0: cmake-check-system-first.patch
|
||||
# PATCH-FIX-UPSTREAM 269.patch -- Update stb_image/stb_image_write
|
||||
Patch1: 269.patch
|
||||
BuildRequires: pkgconfig
|
||||
# Use cmake3 package on SLE12 because cmake is too old (version 3.5)
|
||||
%if !0%{?is_opensuse} && 0%{?sle_version} < 150000
|
||||
BuildRequires: cmake3-full >= 3.10
|
||||
BuildRequires: gcc11-c++
|
||||
%else
|
||||
BuildRequires: cmake >= 3.10
|
||||
BuildRequires: cmake >= 3.14
|
||||
BuildRequires: gcc-c++
|
||||
%endif
|
||||
# only TW has fmt
|
||||
%if 0%{?suse_version} > 1500
|
||||
# For blackbox tests
|
||||
BuildRequires: cmake(fmt) >= 7.1.2
|
||||
%if %{with tests}
|
||||
BuildRequires: cmake(GTest) >= 1.11
|
||||
%endif
|
||||
|
||||
%description
|
||||
@@ -74,28 +67,23 @@ other applications.
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
# Use g++-11 to build a C++17 codebase
|
||||
# Examples require QT5-base/multimedia, but doing so creates a cycle
|
||||
# Blackbox tests require fmt
|
||||
# Tests samples are no longer present in the released tarball. The blackbox test cannot pass
|
||||
%cmake \
|
||||
-DBUILD_EXAMPLES=OFF \
|
||||
%if !0%{?is_opensuse} && 0%{?sle_version} < 150000
|
||||
-DCMAKE_CXX_COMPILER=/usr/bin/g++-11 \
|
||||
%if %{with tests}
|
||||
-DBUILD_UNIT_TESTS=ON
|
||||
%endif
|
||||
%if 0%{?suse_version} < 1550
|
||||
-DBUILD_BLACKBOX_TESTS=OFF \
|
||||
%endif
|
||||
;
|
||||
|
||||
%cmake_build
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
|
||||
%check
|
||||
%if 0%{?sle_version}
|
||||
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
|
||||
%endif
|
||||
%if %{with tests}
|
||||
%ctest
|
||||
%endif
|
||||
|
||||
%post -n libZXing%{sover} -p /sbin/ldconfig
|
||||
%postun -n libZXing%{sover} -p /sbin/ldconfig
|
||||
|
||||
Reference in New Issue
Block a user