forked from pool/zxing-cpp
Jan Engelhardt
e26d1ee8f3
- 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
112 lines
3.1 KiB
RPMSpec
112 lines
3.1 KiB
RPMSpec
#
|
|
# spec file for package zxing-cpp
|
|
#
|
|
# Copyright (c) 2023 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define sover 3
|
|
Name: zxing-cpp
|
|
Version: 2.0.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
|
|
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
|
|
|
|
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: gcc-c++
|
|
%endif
|
|
# only TW has fmt
|
|
%if 0%{?suse_version} > 1500
|
|
# For blackbox tests
|
|
BuildRequires: cmake(fmt) >= 7.1.2
|
|
%endif
|
|
|
|
%description
|
|
ZXing ("zebra crossing") is an multi-format 1D/2D barcode image
|
|
processing library. This package provides a C++ implementation.
|
|
|
|
%package -n libZXing%{sover}
|
|
Summary: Library for processing 1D and 2D barcodes
|
|
# called libZXing in the 1.1.0 update
|
|
Group: System/Libraries
|
|
Provides: libZXingCore%{sover} = %{version}
|
|
Obsoletes: libZXingCore%{sover} < %{version}
|
|
|
|
%description -n libZXing%{sover}
|
|
ZXing ("zebra crossing") is an multi-format 1D/2D barcode image
|
|
processing library. This package provides a C++ implementation.
|
|
|
|
%package devel
|
|
Summary: Header files for zxing, a library for processing 1D and 2D barcodes
|
|
Group: Development/Languages/C and C++
|
|
Requires: libZXing%{sover} = %{version}
|
|
|
|
%description devel
|
|
ZXing ("zebra crossing") is an multi-format 1D/2D barcode image
|
|
processing library. This package provides header files to use ZXing in
|
|
other applications.
|
|
|
|
%prep
|
|
%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
|
|
%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
|
|
|
|
%install
|
|
%cmake_install
|
|
|
|
%check
|
|
%if 0%{?sle_version}
|
|
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
|
|
%endif
|
|
%ctest
|
|
|
|
%ldconfig_scriptlets -n libZXing%{sover}
|
|
|
|
%files -n libZXing%{sover}
|
|
%doc README.md
|
|
%license LICENSE
|
|
%{_libdir}/libZXing.so.*
|
|
|
|
%files devel
|
|
%license LICENSE
|
|
%{_includedir}/ZXing/
|
|
%{_libdir}/cmake/ZXing/
|
|
%{_libdir}/libZXing.so
|
|
%{_libdir}/pkgconfig/zxing.pc
|
|
|
|
%changelog
|