Accepting request 1061067 from home:iznogood:branches:devel:libraries:c_c++

- Update to version 2.0.0:
  * Switch to UTF8 based API and remove deprecated UTF16 one
    (Result::text())
  * Remove all API deprecated in 1.4
  * Adding a wrapper for iOS
  * New Aztec detector implementation to support arbitrary rotation
    and position of the symbol
  * Support multi-symbol detection in Aztec detector
  * Replace all Qt originated ECI/CharacterSet conversion code with
    a new implementation
  * Require c++17 to build library and client code
  * New DecodeHints::textMode() and Result::text(TextMode) API to
    specify how bytes are rendered into text
  * HRI (human readable interpretation) is the new default for the
    TextMode (has been for most cases before, but not all)
  * New DecodeHits::tryInvert() feature to test for inverted
    symbols (white on black background)
- Changes from version 1.4.0:
  * Note: this is an intermediary release on the way to 2.0. This
    code is (supposed to be) API compatible (via the ReadBarcode.h
    interface) with v1.3.0 but contains quite a few additional
    deprecations. It still has SO number 1, which is as wrong as it
    was for release v1.3.0 and it is not ABI compatible with 1.3
    either. 2.0 will be basically 1.4 but with all deprecated API
    removed and the final fix for #333.
  * Reader support for Micro QRCode by @corbers
  * Prepared switch from std::wstring based utf16 to std::string
    based utf8 results, use new ZX_USE_UTF8 macro to transition to
    the upcoming 2.0 API
  * Much improved 'binary' data support via new Result::bytes()
    API, see #334 for a detailed background discussion.
  * New Result::contentType() API returning information about the
    type of content (like text vs. binary, etc.)
  * Better standards conformance with respect to ECI handling, see
    Results::bytesECI()
  * Support for proper ECI handling across structured append
    symbols (see MergeStructuredAppendResults())
  * New Result::error() API with improved error handling, see also
    DecodeHints::returnErrors()
  * Removed all internal header files from the installed set, so
    only the ReadBarcode.h based APIs are supported from here on
    out
  * Removed all sample images from the 'source' distribution
    zip/tar balls (much reduced size)
  * Python read_barcode returns None if no symbol was found (might
    break existing code if not checked for None before)
- Changes from version 1.3.0:
  * Multi-barcode reading with the new std::vector<Result>
    ReadBardcodes(...) function. Does not work for Aztec,
    DataMatrix and Maxicode, yet.
  * Multi-resolution scanning that can automatically downscale the
    input to substantially increase the detection rate on high
    resolution scans, see DecodeHints::tryDownscale, currently only
    enabled in the ReadBardcodes function
  * New Result::symbologyIdentifier property
  * Updated and improved android wrapper
- Drop patches fixed upstream:
  * 269.patch
  * 0001-test-update-to-libfmt-v9.0.0.patch
  * cmake-check-system-first.patch
- Bump sover to 3 following upstream changes.

OBS-URL: https://build.opensuse.org/request/show/1061067
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/zxing-cpp?expand=0&rev=27
This commit is contained in:
Jan Engelhardt 2023-01-25 23:23:02 +00:00 committed by Git OBS Bridge
parent 9b799b60f4
commit 8e468b7c5c
8 changed files with 77 additions and 1730 deletions

View File

@ -1,44 +0,0 @@
From 6dc756175003658cafb9039185a5094b9c157ba6 Mon Sep 17 00:00:00 2001
From: axxel <awagger@gmail.com>
Date: Tue, 26 Jul 2022 22:42:00 +0200
Subject: [PATCH] test: update to libfmt v9.0.0
---
test/blackbox/BlackboxTestRunner.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/test/blackbox/BlackboxTestRunner.cpp b/test/blackbox/BlackboxTestRunner.cpp
index 0df58ba..b8afe14 100644
--- a/test/blackbox/BlackboxTestRunner.cpp
+++ b/test/blackbox/BlackboxTestRunner.cpp
@@ -158,8 +158,7 @@ static void doRunTests(
auto folderName = directory.stem();
if (Size(imgPaths) != totalTests)
- fmt::print("TEST {} => Expected number of tests: {}, got: {} => FAILED\n", folderName, totalTests,
- imgPaths.size());
+ fmt::print("TEST {} => Expected number of tests: {}, got: {} => FAILED\n", folderName.string(), totalTests, imgPaths.size());
for (auto& test : tests) {
fmt::print("{:20} @ {:3}, {:3}", folderName.string(), test.rotation, Size(imgPaths));
@@ -234,7 +233,7 @@ static void doRunStructuredAppendTest(
}
if (Size(imageGroups) != totalTests)
- fmt::print("TEST {} => Expected number of tests: {}, got: {} => FAILED\n", folderName, totalTests,
+ fmt::print("TEST {} => Expected number of tests: {}, got: {} => FAILED\n", folderName.string(), totalTests,
imageGroups.size());
for (auto& test : tests) {
@@ -445,7 +444,7 @@ int runBlackBoxTests(const fs::path& testPathPrefix, const std::set<std::string>
{ 17, 20, 0 },
{ 19, 20, 180 },
});
-
+
runTests("upca-extension-1", "UPC-A", 6, {
{ 3, 6, 0 },
{ 4, 6, 180 },
--
2.37.3

1647
269.patch

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
libZXing1 libZXing3

View File

@ -1,20 +0,0 @@
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

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:653d9e44195d86cf64a36af9ff3a1978ec5599df3882439fefa56e7064f55e8a
size 97942494

BIN
zxing-cpp-2.0.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +1,68 @@
-------------------------------------------------------------------
Wed Jan 25 14:01:00 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 2.0.0:
* Switch to UTF8 based API and remove deprecated UTF16 one
(Result::text())
* Remove all API deprecated in 1.4
* Adding a wrapper for iOS
* New Aztec detector implementation to support arbitrary rotation
and position of the symbol
* Support multi-symbol detection in Aztec detector
* Replace all Qt originated ECI/CharacterSet conversion code with
a new implementation
* Require c++17 to build library and client code
* New DecodeHints::textMode() and Result::text(TextMode) API to
specify how bytes are rendered into text
* HRI (human readable interpretation) is the new default for the
TextMode (has been for most cases before, but not all)
* New DecodeHits::tryInvert() feature to test for inverted
symbols (white on black background)
- Changes from version 1.4.0:
* Note: this is an intermediary release on the way to 2.0. This
code is (supposed to be) API compatible (via the ReadBarcode.h
interface) with v1.3.0 but contains quite a few additional
deprecations. It still has SO number 1, which is as wrong as it
was for release v1.3.0 and it is not ABI compatible with 1.3
either. 2.0 will be basically 1.4 but with all deprecated API
removed and the final fix for #333.
* Reader support for Micro QRCode by @corbers
* Prepared switch from std::wstring based utf16 to std::string
based utf8 results, use new ZX_USE_UTF8 macro to transition to
the upcoming 2.0 API
* Much improved 'binary' data support via new Result::bytes()
API, see #334 for a detailed background discussion.
* New Result::contentType() API returning information about the
type of content (like text vs. binary, etc.)
* Better standards conformance with respect to ECI handling, see
Results::bytesECI()
* Support for proper ECI handling across structured append
symbols (see MergeStructuredAppendResults())
* New Result::error() API with improved error handling, see also
DecodeHints::returnErrors()
* Removed all internal header files from the installed set, so
only the ReadBarcode.h based APIs are supported from here on
out
* Removed all sample images from the 'source' distribution
zip/tar balls (much reduced size)
* Python read_barcode returns None if no symbol was found (might
break existing code if not checked for None before)
- Changes from version 1.3.0:
* Multi-barcode reading with the new std::vector<Result>
ReadBardcodes(...) function. Does not work for Aztec,
DataMatrix and Maxicode, yet.
* Multi-resolution scanning that can automatically downscale the
input to substantially increase the detection rate on high
resolution scans, see DecodeHints::tryDownscale, currently only
enabled in the ReadBardcodes function
* New Result::symbologyIdentifier property
* Updated and improved android wrapper
- Drop patches fixed upstream:
* 269.patch
* 0001-test-update-to-libfmt-v9.0.0.patch
* cmake-check-system-first.patch
- Bump sover to 3 following upstream changes.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Sep 20 07:10:22 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr> Tue Sep 20 07:10:22 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>

View File

@ -1,7 +1,7 @@
# #
# spec file for package zxing-cpp # spec file for package zxing-cpp
# #
# Copyright (c) 2021 SUSE LLC # Copyright (c) 2023 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,9 +16,9 @@
# #
%define sover 1 %define sover 3
Name: zxing-cpp Name: zxing-cpp
Version: 1.2.0 Version: 2.0.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
@ -26,12 +26,7 @@ Group: Development/Languages/C and C++
URL: https://github.com/nu-book/zxing-cpp/ URL: https://github.com/nu-book/zxing-cpp/
Source0: %{url}/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-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
# PATCH-FIX-UPSTREAM 0001-test-update-to-libfmt-v9.0.0.patch -- fmt 9 compatibility
Patch2: 0001-test-update-to-libfmt-v9.0.0.patch
BuildRequires: pkgconfig BuildRequires: pkgconfig
# Use cmake3 package on SLE12 because cmake is too old (version 3.5) # Use cmake3 package on SLE12 because cmake is too old (version 3.5)
%if !0%{?is_opensuse} && 0%{?sle_version} < 150000 %if !0%{?is_opensuse} && 0%{?sle_version} < 150000
@ -99,17 +94,15 @@ export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
%endif %endif
%ctest %ctest
%post -n libZXing%{sover} -p /sbin/ldconfig %ldconfig_scriptlets -n libZXing%{sover}
%postun -n libZXing%{sover} -p /sbin/ldconfig
%files -n libZXing%{sover} %files -n libZXing%{sover}
%doc README.md %doc README.md
%license LICENSE.* %license LICENSE
%{_libdir}/libZXing.so.%{sover} %{_libdir}/libZXing.so.*
%{_libdir}/libZXing.so.%{sover}.*
%files devel %files devel
%license LICENSE.* %license LICENSE
%{_includedir}/ZXing/ %{_includedir}/ZXing/
%{_libdir}/cmake/ZXing/ %{_libdir}/cmake/ZXing/
%{_libdir}/libZXing.so %{_libdir}/libZXing.so