|
|
|
@ -1,57 +1,26 @@
|
|
|
|
|
Name: zxing-cpp
|
|
|
|
|
Version: 1.2.0
|
|
|
|
|
Release: 3%{?dist}
|
|
|
|
|
Version: 2.0.0
|
|
|
|
|
Release: 6%{?dist}
|
|
|
|
|
Summary: C++ port of the ZXing ("Zebra Crossing") barcode scanning library
|
|
|
|
|
|
|
|
|
|
# The entire source is ASL 2.0, except:
|
|
|
|
|
#
|
|
|
|
|
# - TextCodec files, that is, core/src/textcodec/*, are
|
|
|
|
|
# (LGPLv2 with exceptions or LGPLv3 with exceptions).
|
|
|
|
|
# - core/src/textcodec/JPText{En,De}coder.* are, formally,
|
|
|
|
|
# ((LGPLv2 with exceptions or LGPLv3 with exceptions) and BSD),
|
|
|
|
|
# which still forms an effective license of
|
|
|
|
|
# (LGPLv2 with exceptions or LGPLv3 with exceptions)
|
|
|
|
|
# - wrappers/wasm/base64ArrayBuffer.js is MIT (but is not used)
|
|
|
|
|
# - thirdparty/stb/stb_image.h and thirdparty/stb/stb_image_write.h are MIT
|
|
|
|
|
# (but are unbundled)
|
|
|
|
|
#
|
|
|
|
|
# The resulting effective license for the combined library is:
|
|
|
|
|
License: LGPLv2 with exceptions or LGPLv3 with exceptions
|
|
|
|
|
License: Apache-2.0 AND MIT
|
|
|
|
|
Url: https://github.com/nu-book/zxing-cpp
|
|
|
|
|
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
|
|
|
|
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
BuildRequires: cmake
|
|
|
|
|
BuildRequires: cmake(fmt)
|
|
|
|
|
# -static BR’s required by guidelines for tracking of header-only libraries:
|
|
|
|
|
BuildRequires: stb_image-devel
|
|
|
|
|
BuildRequires: stb_image-static
|
|
|
|
|
BuildRequires: stb_image_write-devel
|
|
|
|
|
BuildRequires: stb_image_write-static
|
|
|
|
|
# https://github.com/nu-book/zxing-cpp/issues/248
|
|
|
|
|
Patch0: 0001-Add-a-mode-to-build-against-system-versions-of-depen.patch
|
|
|
|
|
# Update stb_image/stb_image_write
|
|
|
|
|
# https://github.com/nu-book/zxing-cpp/pull/269
|
|
|
|
|
# Fixes CVE-2021-28021, CVE-2021-42715, and CVE-2021-42716, and adds a patch
|
|
|
|
|
# file for zxing-cpp-specific changes
|
|
|
|
|
Patch1: %{url}/pull/269.patch
|
|
|
|
|
# Use the system copy of pybind11 rather than trying to download a copy. This
|
|
|
|
|
# patch is unconditional, so it is not, as-is, suitable for sending upstream.
|
|
|
|
|
Patch2: zxing-cpp-1.2.0-system-pybind11.patch
|
|
|
|
|
Patch0: zxing-cpp-1.2.0-system-pybind11.patch
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
ZXing-C++ ("zebra crossing") is an open-source, multi-format 1D/2D barcode
|
|
|
|
|
image processing library implemented in C++.
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
# The entire contents are ASL 2.0, except:
|
|
|
|
|
#
|
|
|
|
|
# - %%{_includedir}/ZXing/textcodec/*.h are exactly or effectively
|
|
|
|
|
# (LGPLv2 with exceptions or LGPLv3 with exceptions)
|
|
|
|
|
#
|
|
|
|
|
# See licensing breakdown above base package’s License field for further
|
|
|
|
|
# details.
|
|
|
|
|
License: ASL 2.0 and (LGPLv2 with exceptions or LGPLv3 with exceptions)
|
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
@ -73,14 +42,6 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -p1
|
|
|
|
|
# remove bundled stb libraries:
|
|
|
|
|
rm -v thirdparty/stb/stb_image_write.h thirdparty/stb/stb_image.h
|
|
|
|
|
# stb_image.h is trivially forked: reconstruct the changes with the latest
|
|
|
|
|
# unbundled copy
|
|
|
|
|
cp -p /usr/include/stb/stb_image.h thirdparty/stb/
|
|
|
|
|
pushd thirdparty/stb
|
|
|
|
|
patch -p1 < stb_image.patch
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
# don’t use unversioned “python” interpreter in tests
|
|
|
|
|
sed -r -i 's@(COMMAND )python@\1%{python3}@' wrappers/python/CMakeLists.txt
|
|
|
|
@ -98,7 +59,10 @@ popd &>/dev/null
|
|
|
|
|
# but we don’t get any metadata (dist-info), so it’s not terribly useful for
|
|
|
|
|
# packaging purposes. Instead, it seems we must re-build the whole library
|
|
|
|
|
# through setuptools to get that.
|
|
|
|
|
%cmake -DBUILD_EXAMPLES=OFF -DBUILD_PYTHON_MODULE=ON
|
|
|
|
|
# CMAKE_BUILD_TYPE=RelWithDebInfo prevents the build from stripping the
|
|
|
|
|
# python module after it is built. The stripping happens in
|
|
|
|
|
# pybind11_add_module.
|
|
|
|
|
%cmake -DBUILD_EXAMPLES=OFF -DBUILD_PYTHON_MODULE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
|
|
|
|
%cmake_build
|
|
|
|
|
pushd wrappers/python
|
|
|
|
|
# CMake respects this environment variable. We need to see the compiler
|
|
|
|
@ -131,8 +95,8 @@ popd
|
|
|
|
|
%ctest
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%license LICENSE LICENSE.ZXing LICENSE.Qt LGPL_EXCEPTION.Qt NOTICE
|
|
|
|
|
%{_libdir}/libZXing.so.1
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%{_libdir}/libZXing.so.3
|
|
|
|
|
%{_libdir}/libZXing.so.%{version}
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
@ -143,8 +107,46 @@ popd
|
|
|
|
|
%{_libdir}/pkgconfig/zxing.pc
|
|
|
|
|
|
|
|
|
|
%files -n python3-%{name} -f %{pyproject_files}
|
|
|
|
|
%{_libdir}/zxingcpp%{python3_ext_suffix}
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-6
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sat Jul 01 2023 Python Maint <python-maint@redhat.com> - 2.0.0-4
|
|
|
|
|
- Rebuilt for Python 3.12
|
|
|
|
|
|
|
|
|
|
* Wed Jun 28 2023 Vitaly Zaitsev <vitaly@easycoding.org> - 2.0.0-3
|
|
|
|
|
- Rebuilt due to fmt 10 update.
|
|
|
|
|
|
|
|
|
|
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 2.0.0-2
|
|
|
|
|
- Rebuilt for Python 3.12
|
|
|
|
|
|
|
|
|
|
* Fri Feb 24 2023 Caolán McNamara <caolanm@redhat.com> 2.0.0-1
|
|
|
|
|
- latest release
|
|
|
|
|
- migrated to SPDX license
|
|
|
|
|
|
|
|
|
|
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-9
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Oct 26 2022 Tom Stellard <tstellar@redhat.com> - 1.2.0-8
|
|
|
|
|
- Prevent stripping of python module
|
|
|
|
|
|
|
|
|
|
* Tue Aug 02 2022 Caolán McNamara <caolanm@redhat.com> 1.2.0-7
|
|
|
|
|
- Resolves: rhbz#2113772 FTBFS in Fedora rawhide/f37
|
|
|
|
|
|
|
|
|
|
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-6
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.2.0-5
|
|
|
|
|
- Rebuilt for Python 3.11
|
|
|
|
|
|
|
|
|
|
* Sat Apr 23 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 1.2.0-4
|
|
|
|
|
- Security fix for CVE-2022-28041
|
|
|
|
|
|
|
|
|
|
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|