diff --git a/cmake.patch b/cmake.patch index 52b8abc..08dc510 100644 --- a/cmake.patch +++ b/cmake.patch @@ -1,30 +1,32 @@ ---- zxing-cpp-2.0.0/CMakeLists.txt 2023-08-08 13:26:51.918694430 +0200 -+++ zxing-cpp-2.0.0/CMakeLists.txt 2023-08-08 13:38:00.669700216 +0200 +diff -ru orig/CMakeLists.txt mod/CMakeLists.txt +--- orig/CMakeLists.txt 2023-07-05 18:25:57.000000000 +0200 ++++ mod/CMakeLists.txt 2023-10-06 08:29:27.429624816 +0200 @@ -1,4 +1,4 @@ --cmake_minimum_required (VERSION 3.14) -+cmake_minimum_required (VERSION 3.5) +-cmake_minimum_required(VERSION 3.15) ++cmake_minimum_required(VERSION 3.5) project(ZXing) -@@ -42,8 +42,7 @@ +@@ -37,9 +37,6 @@ set (CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) endif() --set (CMAKE_CXX_STANDARD 17) --set (CMAKE_CXX_EXTENSIONS OFF) -+set (CMAKE_CXX_EXTENSIONS ON) - - if (NOT (BUILD_READERS OR BUILD_WRITERS)) - message(FATAL_ERROR "At least one of BUILD_READERS/BUILD_WRITERS must be enabled.") ---- zxing-cpp-2.0.0/core/CMakeLists.txt 2023-08-08 13:26:51.918694430 +0200 -+++ zxing-cpp-2.0.0/core/CMakeLists.txt 2023-08-08 13:32:23.494204854 +0200 +-if (NOT CMAKE_CXX_STANDARD) +- set (CMAKE_CXX_STANDARD 17) +-endif() + if (NOT CMAKE_CXX_EXTENSIONS) + set (CMAKE_CXX_EXTENSIONS OFF) + endif() +diff -ru orig/core/CMakeLists.txt mod/core/CMakeLists.txt +--- orig/core/CMakeLists.txt 2023-07-05 18:25:57.000000000 +0200 ++++ mod/core/CMakeLists.txt 2023-10-06 08:29:35.169666650 +0200 @@ -1,4 +1,4 @@ --cmake_minimum_required (VERSION 3.14) -+cmake_minimum_required (VERSION 3.5) +-cmake_minimum_required(VERSION 3.15) ++cmake_minimum_required(VERSION 3.5) - project (ZXing VERSION "2.0.0") + project (ZXing VERSION "2.1.0") set (ZXING_SONAME 3) # see https://github.com/zxing-cpp/zxing-cpp/issues/333 -@@ -457,8 +457,6 @@ +@@ -459,8 +459,6 @@ ) endif() diff --git a/zxing-cpp-2.0.0.tar.gz b/zxing-cpp-2.0.0.tar.gz deleted file mode 100644 index a0ddb7b..0000000 --- a/zxing-cpp-2.0.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:12b76b7005c30d34265fc20356d340da179b0b4d43d2c1b35bcca86776069f76 -size 856413 diff --git a/zxing-cpp-2.1.0.tar.gz b/zxing-cpp-2.1.0.tar.gz new file mode 100644 index 0000000..45b98c1 --- /dev/null +++ b/zxing-cpp-2.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d54e403592ec7a143791c6526c1baafddf4c0897bb49b1af72b70a0f0c4a3fe +size 866787 diff --git a/zxing-cpp.changes b/zxing-cpp.changes index 6039edf..1535bf3 100644 --- a/zxing-cpp.changes +++ b/zxing-cpp.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Fri Oct 6 06:01:16 UTC 2023 - Paolo Stivanin + +- Update to 2.1.0: + * Considerable performance improvements in linear symbol detection (up to 2x speedup in select use cases of ReadBarcodes) + * QRCode: major improvement in detection of high version symbols (see e.g. here) + * DMDetector: reduce runtime overhead of c++-20 builds + * Refactor Python wrapper so the sdist includes the core library code + * wasm wrapper: add function to reader to scan multiple barcode + * Added a C wrapper + * Python: improve error reporting + * DMDetector: fix potential dead-lock + * DMDecoder: support 144x144 symbols in legacy and compliant variants +- Remove the %check section since we are not building the tests. + ------------------------------------------------------------------- Wed Aug 9 15:07:38 UTC 2023 - Fridrich Strba diff --git a/zxing-cpp.spec b/zxing-cpp.spec index a6c0b10..d621b30 100644 --- a/zxing-cpp.spec +++ b/zxing-cpp.spec @@ -18,7 +18,7 @@ %define sover 3 Name: zxing-cpp -Version: 2.0.0 +Version: 2.1.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 @@ -29,6 +29,10 @@ Source99: baselibs.conf Patch1: cmake.patch BuildRequires: cmake >= 3.5 BuildRequires: pkgconfig +%if 0%{?suse_version} > 1500 +# build the C wrapper only in TW. This package is too old on Leap <= 15.5 +BuildRequires: stb-devel +%endif %if 0%{?suse_version} < 1500 BuildRequires: gcc7 BuildRequires: gcc7-c++ @@ -79,22 +83,16 @@ export CXXFLAGS="-std=c++17" # Examples require QT5-base/multimedia, but doing so creates a cycle # Blackbox tests require fmt %cmake \ - -DBUILD_EXAMPLES=OFF \ -%if 0%{?suse_version} < 1550 - -DBUILD_BLACKBOX_TESTS=OFF + -DCMAKE_CXX_EXTENSIONS=ON \ +%if 0%{?suse_version} > 1500 + -DBUILD_C_API=ON \ %endif - + -DBUILD_EXAMPLES=OFF %cmake_build %install %cmake_install -%check -%if 0%{?sle_version} -export LD_LIBRARY_PATH=%{buildroot}%{_libdir} -%endif -%ctest - %post -n libZXing%{sover} -p /sbin/ldconfig %postun -n libZXing%{sover} -p /sbin/ldconfig