Accepting request 929674 from devel:libraries:c_c++
OBS-URL: https://build.opensuse.org/request/show/929674 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/zxing-cpp?expand=0&rev=9
This commit is contained in:
commit
5fa3e0cff7
@ -1,24 +0,0 @@
|
|||||||
From 4766de0a8e6f780a04b03776d0c0380cb85935b8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Christophe Giboudeaux <christophe@krop.fr>
|
|
||||||
Date: Tue, 9 Feb 2021 09:14:00 +0100
|
|
||||||
Subject: [PATCH] Fix build with GCC 11
|
|
||||||
|
|
||||||
---
|
|
||||||
core/src/Pattern.h | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/core/src/Pattern.h b/core/src/Pattern.h
|
|
||||||
index 97093f0..87f340e 100644
|
|
||||||
--- a/core/src/Pattern.h
|
|
||||||
+++ b/core/src/Pattern.h
|
|
||||||
@@ -21,6 +21,7 @@
|
|
||||||
#include <cmath>
|
|
||||||
#include <cstddef>
|
|
||||||
#include <cstdint>
|
|
||||||
+#include <limits>
|
|
||||||
#include <numeric>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
--
|
|
||||||
2.30.0
|
|
||||||
|
|
20
cmake-check-system-first.patch
Normal file
20
cmake-check-system-first.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
diff -Nur zxing-cpp-1.2.0/test/blackbox/CMakeLists.txt new/test/blackbox/CMakeLists.txt
|
||||||
|
--- zxing-cpp-1.2.0/test/blackbox/CMakeLists.txt 2021-05-28 12:47:09.000000000 +0200
|
||||||
|
+++ new/test/blackbox/CMakeLists.txt 2021-05-29 13:34:47.707152999 +0200
|
||||||
|
@@ -1,10 +1,13 @@
|
||||||
|
cmake_minimum_required(VERSION 3.14)
|
||||||
|
|
||||||
|
-include(FetchContent)
|
||||||
|
-FetchContent_Declare (fmtlib
|
||||||
|
+find_package(fmt 7.1.2)
|
||||||
|
+if (NOT fmt_FOUND)
|
||||||
|
+ include(FetchContent)
|
||||||
|
+ FetchContent_Declare (fmtlib
|
||||||
|
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
|
||||||
|
GIT_TAG 7.1.2)
|
||||||
|
-FetchContent_MakeAvailable (fmtlib) # Adds fmt::fmt
|
||||||
|
+ FetchContent_MakeAvailable (fmtlib) # Adds fmt::fmt
|
||||||
|
+endif()
|
||||||
|
|
||||||
|
if (BUILD_READERS)
|
||||||
|
add_executable (ReaderTest
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:e595b3fa2ec320beb0b28f6af56b1141853257c2611686685639cebb3b248c86
|
|
||||||
size 128925736
|
|
3
zxing-cpp-1.2.0.tar.gz
Normal file
3
zxing-cpp-1.2.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:653d9e44195d86cf64a36af9ff3a1978ec5599df3882439fefa56e7064f55e8a
|
||||||
|
size 97942494
|
@ -1,3 +1,36 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Nov 5 11:58:38 UTC 2021 - Danilo Spinella <danilo.spinella@suse.com>
|
||||||
|
|
||||||
|
- Do not build examples to avoid a cycle with QT5Multimedia
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Nov 3 14:42:33 UTC 2021 - Danilo Spinella <danilo.spinella@suse.com>
|
||||||
|
|
||||||
|
- Use the updated cmake3-full package instead of cmake on SLE12
|
||||||
|
- Do not build examples on SLE12
|
||||||
|
- Only build blackbox tests on TW
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat May 29 10:37:28 UTC 2021 - Ferdinand Thiessen <rpm@fthiessen.de>
|
||||||
|
|
||||||
|
- Update to 1.2.0
|
||||||
|
* new BarcodeFormat names, old ones are deprecated
|
||||||
|
* new ZXingQtCamReader demo app based on QtMultimedia and QtQuick
|
||||||
|
* new QRCode reader, faster and better support for rotated symbols
|
||||||
|
* added Structured Append support for DataMatrix, Aztec and MaxiCode
|
||||||
|
* added DMRE support for DataMatrix
|
||||||
|
* switch to the reimplemented 1D detectors, about 5x faster
|
||||||
|
* a lot faster and more capable isPure detection for all 2D codes
|
||||||
|
* 20% faster ReedSolomon error correcting
|
||||||
|
* PDF417 is faster and supports flipped symbols
|
||||||
|
* reduced false positive rate for UPC/EAN barcodes and improved
|
||||||
|
Add-On symbol handling
|
||||||
|
* proper ECI handling in all 2D barcodes
|
||||||
|
* much improved python wrapper
|
||||||
|
* deprecate the use of ResultMetadata
|
||||||
|
- Add cmake-check-system-first.patch
|
||||||
|
- Drop upstream merged 0001-Fix-build-with-GCC-11.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Feb 9 07:50:14 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
|
Tue Feb 9 07:50:14 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
|
||||||
|
|
||||||
|
@ -18,19 +18,30 @@
|
|||||||
|
|
||||||
%define sover 1
|
%define sover 1
|
||||||
Name: zxing-cpp
|
Name: zxing-cpp
|
||||||
Version: 1.1.1
|
Version: 1.2.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Library for processing 1D and 2D barcodes
|
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
|
License: Apache-2.0 AND Zlib AND LGPL-2.1-with-Qt-Company-Qt-exception-1.1
|
||||||
Group: Development/Languages/C and C++
|
Group: Development/Languages/C and C++
|
||||||
URL: https://github.com/nu-book/zxing-cpp/
|
URL: https://github.com/nu-book/zxing-cpp/
|
||||||
Source0: https://github.com/nu-book/zxing-cpp/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
Source99: baselibs.conf
|
Source99: baselibs.conf
|
||||||
# PATCH-FIX-UPSTREAM
|
# PATCH-FIX-OPENSUSE cmake-check-system-first.patch -- Search system for needed libraries first
|
||||||
Patch0: 0001-Fix-build-with-GCC-11.patch
|
Patch0: cmake-check-system-first.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.10
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: pkgconfig
|
%endif
|
||||||
|
# only TW has fmt
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
# For blackbox tests
|
||||||
|
BuildRequires: cmake(fmt) >= 7.1.2
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
ZXing ("zebra crossing") is an multi-format 1D/2D barcode image
|
ZXing ("zebra crossing") is an multi-format 1D/2D barcode image
|
||||||
@ -61,12 +72,29 @@ other applications.
|
|||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake
|
# Use g++-11 to build a C++17 codebase
|
||||||
|
# Examples require QT5-base/multimedia, but doing so creates a cycle
|
||||||
|
# Blackbox tests require fmt
|
||||||
|
%cmake \
|
||||||
|
-DBUILD_EXAMPLES=OFF \
|
||||||
|
%if !0%{?is_opensuse} && 0%{?sle_version} < 150000
|
||||||
|
-DCMAKE_CXX_COMPILER=/usr/bin/g++-11 \
|
||||||
|
%endif
|
||||||
|
%if 0%{?suse_version} < 1550
|
||||||
|
-DBUILD_BLACKBOX_TESTS=OFF \
|
||||||
|
%endif
|
||||||
|
;
|
||||||
%cmake_build
|
%cmake_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%cmake_install
|
%cmake_install
|
||||||
|
|
||||||
|
%check
|
||||||
|
%if 0%{?sle_version}
|
||||||
|
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
|
||||||
|
%endif
|
||||||
|
%ctest
|
||||||
|
|
||||||
%post -n libZXing%{sover} -p /sbin/ldconfig
|
%post -n libZXing%{sover} -p /sbin/ldconfig
|
||||||
%postun -n libZXing%{sover} -p /sbin/ldconfig
|
%postun -n libZXing%{sover} -p /sbin/ldconfig
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user