commit f39d21dee7f7ce118f6583edd7c91a9d7fc9755a Author: Adrian Schröter Date: Fri Mar 8 16:45:52 2024 +0100 Sync from SUSE:ALP:Source:Standard:1.0 zbar revision da1502791bf535c10b2d1b2d3da88643 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..4014a79 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,2 @@ +libzbar0 +libzbarqt0 diff --git a/zbar-0.23.93.tar.bz2 b/zbar-0.23.93.tar.bz2 new file mode 100644 index 0000000..d96c793 --- /dev/null +++ b/zbar-0.23.93.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:83be8f85fc7c288fd91f98d52fc55db7eedbddcf10a83d9221d7034636683fa0 +size 1190598 diff --git a/zbar-configure.patch b/zbar-configure.patch new file mode 100644 index 0000000..a5e9dba --- /dev/null +++ b/zbar-configure.patch @@ -0,0 +1,26 @@ +From a549566ea11eb03622bd4458a1728ffe3f589163 Mon Sep 17 00:00:00 2001 +From: Boyuan Yang +Date: Wed, 10 Jan 2024 10:57:29 -0500 +Subject: [PATCH] configure.ac: Use old way to detect Qt5 + +Bug: https://github.com/mchehab/zbar/issues/277 +Signed-off-by: Mauro Carvalho Chehab +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index a2251e3d..0e5641e5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -675,8 +675,8 @@ AS_IF([test "x$with_qt" != "xno"], + AS_IF([test "x$with_qt6" = "xno"], + [PKG_CHECK_MODULES([QT], + [Qt5Core >= 5 Qt5Gui >= 5 Qt5Widgets >= 5.0 Qt5X11Extras >= 5.0], +- [MOC=`$PKG_CONFIG Qt5 --variable=moc` +- QT_VERSION=`$PKG_CONFIG Qt5 --modversion` ++ [AC_CHECK_PROGS([MOC], [moc-qt5 moc]) ++ QT_VERSION=`$PKG_CONFIG Qt5Gui --modversion`; + qt_pkgconfig_file="zbar-qt5.pc" + ], + [with_qt="no"])]) diff --git a/zbar-pkgconfig.patch b/zbar-pkgconfig.patch new file mode 100644 index 0000000..397ad6d --- /dev/null +++ b/zbar-pkgconfig.patch @@ -0,0 +1,49 @@ +From 368571ffa1a0f6cc41f708dd0d27f9b6e9409df8 Mon Sep 17 00:00:00 2001 +From: Boyuan Yang +Date: Tue, 9 Jan 2024 07:56:32 -0500 +Subject: [PATCH] configure.ac: Do not use hardcoded pkg-config command + +Use overridable $PKG_CONFIG instead. + +Also fixes some M4 grammar errors in configure.ac. + +Signed-off-by: Mauro Carvalho Chehab +--- + configure.ac | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/configure.ac b/configure.ac +index f0f9723c..a2251e3d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -663,23 +663,23 @@ AC_ARG_WITH([qt6], + + AS_IF([test "x$with_qt" != "xno"], + [AS_IF([test "x$with_qt6" != "xno"], +- PKG_CHECK_MODULES([QT], ++ [PKG_CHECK_MODULES([QT], + [Qt6], +- [MOC=`pkg-config Qt6 --variable=moc` ++ [MOC=`$PKG_CONFIG Qt6 --variable=moc` + QT_VERSION=`$PKG_CONFIG Qt6 --modversion` +- QT6_HEADERS=`pkg-config Qt6 --variable=headerdir` ++ QT6_HEADERS=`$PKG_CONFIG Qt6 --variable=headerdir` + CPPFLAGS="$CPPFLAGS -I$QT6_HEADERS -I$QT6_HEADERS/QtWidgets -I$QT6_HEADERS/QtCore -I$QT6_HEADERS/QtGui" + qt_pkgconfig_file="zbar-qt5.pc" + ], +- [with_qt6="no"])) ++ [with_qt6="no"])]) + AS_IF([test "x$with_qt6" = "xno"], +- PKG_CHECK_MODULES([QT], ++ [PKG_CHECK_MODULES([QT], + [Qt5Core >= 5 Qt5Gui >= 5 Qt5Widgets >= 5.0 Qt5X11Extras >= 5.0], +- [MOC=`pkg-config Qt5 --variable=moc` ++ [MOC=`$PKG_CONFIG Qt5 --variable=moc` + QT_VERSION=`$PKG_CONFIG Qt5 --modversion` + qt_pkgconfig_file="zbar-qt5.pc" + ], +- [with_qt="no"])) ++ [with_qt="no"])]) + ]) + + AC_ARG_VAR([MOC], [full path to Qt moc program]) diff --git a/zbar.changes b/zbar.changes new file mode 100644 index 0000000..32b1f49 --- /dev/null +++ b/zbar.changes @@ -0,0 +1,281 @@ +------------------------------------------------------------------- +Thu Jan 25 16:52:45 UTC 2024 - Martin Pluskal + +- Fix building for Leap + +------------------------------------------------------------------- +Mon Jan 22 08:32:55 UTC 2024 - Michael Vetter + +- Update to 0.23.93: + * Set a better dpi resolution when parsing PDF files + * Fix memory recycle bug of empty symbols + * Fix compilation with python 3.11 and 3.12 + * CVE-2023-40889: Fix array out-of-bounds access + * Stop ignoring non-binary entries that follow binary ones + * Increase allocated buffer memory for symbols + * barcodetest.py: fix error code print logic + * convert: Crash fixing while using camera + * Add some pod information for additional functions + * perl skip more tests if DISPLAY not set and set prereqs in Makefile.PL + * Fixes rt.cpan.org 122061 - test fails when DISPLAY not set + * Update Barcode::ZBar + * isaac: ensure proper order of parsing expression + * Enforce x11 backend even on wayland + * zbarimg: add the --polygon option + * xml output: Add polygon containing code bar. + * configure.ac: drop support for Qt4 and prepare for Qt6 support + * win: fix compiling error in Visual studio + * Enforce a coding style + * configure.ac: fix some issues with gtk parameter + * zbargtk: fix version check macros + * zbar: Address some header issues + * zbar, test: fix compilation issues with FreeBSD + * zbar: Function stdcall declaration issue. + * symbol: make it compatible with MSC + * zbar: change the code to make it c90 standard compatible + * test: fix decode test +- Drop upstreamed patches: + * zbar-CVE-2023-40889.patch + * zbar-CVE-2023-40890.patch + * py311.patch +- Add patch to fix build see gh#mchehab/zbar#277: + * zbar-configure.patch + * zbar-pkgconfig.patch + +------------------------------------------------------------------- +Wed Dec 13 18:36:21 UTC 2023 - Michael Vetter + +- security update: + * CVE-2023-40889 [bsc#1214770] + Fix heap based buffer overflow in qr_reader_match_centers() + + zbar-CVE-2023-40889.patch + * CVE-2023-40890 [bsc#1214771] + Fix stack based buffer overflow in lookup_sequence() + + zbar-CVE-2023-40890.patch + +------------------------------------------------------------------- +Tue Jun 20 11:21:51 UTC 2023 - Martin Pluskal + +- Modernise spec file +- Split lang subpackage + +------------------------------------------------------------------- +Fri Apr 28 08:21:42 UTC 2023 - Dirk Müller + +- add py311.patch to fix build against python 3.11 + +------------------------------------------------------------------- +Mon Dec 19 15:04:25 UTC 2022 - pgajdos@suse.com + +- ImageMagick instead of GraphicsMagick + +------------------------------------------------------------------- +Wed Feb 17 07:55:51 UTC 2021 - Luigi Baldoni + +- Update to version 0.23.90 + * Fixed several issues with configure.ac, making it auto-detect + most things, when possible + * Fixed some build issues + * Make it compatible with Python 3.9 + * Fixed some Python 3.9 and Qt5 warnings + * Typo fixes + * Several fixes at zbarcam + * zbarimg: fix stderr output when symbols are found +- Drop 0001-Create-correct-pkconfig-file-for-zbar-qt5.patch and + 0002-get-rid-of-gettext_h.patch (merged upstream) +- Enable python3 module + +------------------------------------------------------------------- +Thu Jan 21 21:02:59 UTC 2021 - Luigi Baldoni + +- Apply patch0 unconditionally and fix build on Leap + +------------------------------------------------------------------- +Wed Nov 18 02:54:31 UTC 2020 - Wang Jun + +- Update to version 0.23.1 + * Add i18n translation support and add a pt_BR translation + * Change default to autodetect python and gtk versions + * Some documentation updates + * Add support for binary data extraction + * Add support for raw decoding without charset conversions + * Add one shot scanning mode + * Fix help messages + * Fix some makefile issues + * Fix error detection in video4linux read + * Fix pkgconfig for zbar-qt5 + * Fix a double-free condition +- Add 0002-get-rid-of-gettext_h.patch + +------------------------------------------------------------------- +Sun Oct 20 11:40:04 UTC 2019 - Stefan Brüns + +- Remove references to Qt4 from zbar-qt pkgconfig file (#62), + add 0001-Create-correct-pkconfig-file-for-zbar-qt5.patch + +------------------------------------------------------------------- +Sat Jul 6 10:07:41 UTC 2019 - Stefan Brüns + +- Update to version 0.23: + * Support for Gtk3 (backward support with Gtk2 will be maintained. + * Support for Python 3 (backward support with Python2 will be maintained); + * Support for ZBar Gtk GObject Introspection (GIR). That allows using ZBar + Gtk3 widgets on any language that it is compatible with GIR, including + python 2 and python 3. +- Switch from ImageMagick to GraphicsMagick, the latter has significantly + less build dependencies. As it is only used by the zbarimg tool to + load images, this does not affect users of the zbar library. +- Update URL tag to point to the current upstream location + +------------------------------------------------------------------- +Thu Mar 28 16:23:42 UTC 2019 - Martin Pluskal + +- Update to version 0.22: + * zbarcam-qt: allow changing resolutions in real time + * zbarcam-qt: better support ZBar options + * zbarcam-qt: do several visual improvements + * zbarcam-qt: make it remember the geometry + * zbarcam-qt: allow show/hide control and options bars + * zbarcam-qt: remember lastly used settings and camera controls + * zbarcam-qt: allow changing ZBar decode options via GUI + * Add API to allow get/set resolutions + * img_scanner: add handler for color-inverted codes + * img_scanner: fix get_config parameter validation + * scan_video: improve logic to remove duplicated/invalid devnodes + * symbol.c: fix symbol hash logic (prevents crash with QR options) + * configure.ac: fix an error at libv4l2 package check + * fix some typos + * exit gracefully when decoding split QR codes + +------------------------------------------------------------------- +Fri Mar 8 17:31:33 UTC 2019 - olaf@aepfle.de + +- Use gcc7 in SLE_12 + +------------------------------------------------------------------- +Fri Feb 15 08:14:02 UTC 2019 - Martin Pluskal + +- Update to version 0.21: + * zbarcam-qt: allow selecting codes via GUI interface + * When both enabled, ISBN-13 has precedence over ISBN-10 + * ZBar is now using Travis CI for continuous integration tests + * Convert INSTALL and README to markdown and update them + * Improve ZBar testing code and make easier to run the tests + * Fix build with Clang + * Add simple dbus IPC API to zbarcam. + * zbarimg: display only the compiled symbologies + * v4l2: make ZBar build and run on Kernels < 3.16 + * configure.ac: The pdf417 code is incomplete. Warn about that + * Add Debian packaging and Travis CI configuration + * Add barcode examples for different supported symbologies + * Several improvements at the building system + * Add support for SQ code symbology + * v4l2: add fallback for systems without v4l2_ext_controls which field + * v4l2: use device_caps instead of capabilities + * v4l2: make v4l2_request_buffers() more generic + * release video buffers after probing and request them again when needed + * Ignore ENOTTY errors when calling VIDIOC_S_CROP + * doc/Makefile.am.inc: clean html generated files + * Add --disable-doc configure option to disable building docs + * Fix function protoype to be compatible with recent libjpeg + * Wrap logical not operations into parentheses + * INSTALL: warn that autoconf should be called before configure + * code128: fix error logic + * convert: ensure that it will not use a freed value + * zbar: use g_thread_new() instead of g_tread_create() + * zbargtk: add a missing break + * gtk/zbargtk: add a missing check if zbar->window is not null +- Remove accidentaly introduced build dependency on python2 +- We no longer need to generate configure +- Make building more verbose + +------------------------------------------------------------------- +Wed Jan 23 16:13:22 UTC 2019 - info@paolostivanin.com + +- Update Zbar to v0.20.1 + * switch from the old abandoned codebase to the new codebase + maintained by linuxtv.org + * improved v4l2 support + * compatible with Qt5 + * various fixes +- Removed fix_build.patch +- Removed fix-gcc5.patch +- Removed zbar-Qt5.patch +- Removed fix-gcc8.patch + +------------------------------------------------------------------- +Tue Apr 10 14:25:15 UTC 2018 - mliska@suse.cz + +- Add fix-gcc8.patch (boo#1088885). + +------------------------------------------------------------------- +Wed Nov 1 14:50:59 UTC 2017 - mpluskal@suse.com + +- Drop python bindings and gtk support +- Cleanup with spec-cleaner + +------------------------------------------------------------------- +Sat Aug 5 19:22:42 UTC 2017 - aloisio@gmx.com + +- Added zbar-Qt5.patch to build against Qt5 + +------------------------------------------------------------------- +Fri Feb 3 17:10:25 UTC 2017 - jengelh@inai.de + +- Compact and update descriptions + +------------------------------------------------------------------- +Fri Feb 3 10:29:46 UTC 2017 - dimstar@opensuse.org + +- Properly packaeg %_defaultdocdir: new rpm versions no longer + implicitly add this to the packages. + +------------------------------------------------------------------- +Fri Jul 1 09:05:12 UTC 2016 - dimstar@opensuse.org + +- Add baselibs.conf (boo#987287). + +------------------------------------------------------------------- +Tue Jun 14 10:32:29 UTC 2016 - jengelh@inai.de + +- Ensure SONAME symlinks stay with the library + +------------------------------------------------------------------- +Thu Jun 9 09:38:23 UTC 2016 - dimstar@opensuse.org + +- Add update.sh to the source list. + +------------------------------------------------------------------- +Wed Jun 8 13:15:49 UTC 2016 - dimstar@opensuse.org + +- Cleanup specfile for inclusion into openSUSE: + + Use upstream provided tarball. + + The devel packages follow the library basename, not the shared + library packaging name (not parallel installable). + + Groups for SLPP packages is System/Libraries. + + The various devel-packages are auto-depending on each other + based on the .pc files. + + Move autoreconf call to build phase. + + Pass --disable-static to configure instead of deleting the + static libs in the end again. + +------------------------------------------------------------------- +Thu Feb 28 17:29:29 UTC 2013 - opensuse@dstoecker.de + +- update to current mercurial code + +------------------------------------------------------------------- +Mon Aug 6 17:19:54 UTC 2012 - opensuse@dstoecker.de + +- fix build, update to recent mercurial revision from 2012-08-06 + +------------------------------------------------------------------- +Sat Nov 19 23:06:38 UTC 2011 - opensuse@dstoecker.de + +- fix build for openSUSE 12.1 (update to Mercurial version from 2011-11-19) + +------------------------------------------------------------------- +Fri Apr 2 15:45:58 UTC 2010 - cgoncalves@opensuse.org + +- initial package (version 0.10) + diff --git a/zbar.spec b/zbar.spec new file mode 100644 index 0000000..60a0356 --- /dev/null +++ b/zbar.spec @@ -0,0 +1,171 @@ +# +# spec file for package zbar +# +# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2010 Carlos Goncalves . +# +# 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 0 +%define libname lib%{name}%{sover} +Name: zbar +Version: 0.23.93 +Release: 0 +Summary: Bar code reader +License: LGPL-2.0-or-later +URL: https://github.com/mchehab/zbar +Source0: https://linuxtv.org/downloads/%{name}/%{name}-%{version}.tar.bz2 +Source98: baselibs.conf +# https://github.com/mchehab/zbar/issues/277 +Patch0: https://github.com/mchehab/zbar/commit/368571ffa1a0f6cc41f708dd0d27f9b6e9409df8.patch#/zbar-pkgconfig.patch +# https://github.com/mchehab/zbar/issues/277 +Patch1: https://github.com/mchehab/zbar/commit/a549566ea11eb03622bd4458a1728ffe3f589163.patch#/zbar-configure.patch +BuildRequires: automake +BuildRequires: libjpeg-devel +BuildRequires: libtool +BuildRequires: pkgconfig >= 0.9.0 +BuildRequires: xmlto +BuildRequires: pkgconfig(ImageMagick) +BuildRequires: pkgconfig(Qt5Core) +BuildRequires: pkgconfig(Qt5Gui) +BuildRequires: pkgconfig(Qt5Widgets) +BuildRequires: pkgconfig(Qt5X11Extras) +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(ice) +BuildRequires: pkgconfig(libv4l2) +BuildRequires: pkgconfig(python3) +BuildRequires: pkgconfig(sm) +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xext) +BuildRequires: pkgconfig(xv) +%lang_package + +%description +ZBar reads bar codes from various sources, such as video streams, +image files and raw intensity sensors. It supports many symbologies +(types of bar codes) including EAN-13/UPC-A, UPC-E, EAN-8, Code 128, +Code 39, Interleaved 2 of 5 and QR Code. + +It can be used through the standalone GUI and command-line programs, +or integrated by other programs through a library. + +%package -n %{libname} +Summary: Bar code reading library + +%description -n %{libname} +ZBar reads bar codes from various sources, such as video streams, +image files and raw intensity sensors. It supports many symbologies +(types of bar codes) including EAN-13/UPC-A, UPC-E, EAN-8, Code 128, +Code 39, Interleaved 2 of 5 and QR Code. + +This package provides the ZBar library. + +%package -n lib%{name}-devel +Summary: Development environment for the ZBar library +Requires: %{libname} = %{version} + +%description -n lib%{name}-devel +This package contains all necessary include files, libraries, +configuration files and development tools needed to compile and link +applications using the zbar library. + +%package -n lib%{name}qt0 +Summary: ZBar Qt bindings + +%description -n lib%{name}qt0 +This package provides ZBar Qt bindings. + +%package -n lib%{name}qt-devel +Summary: Development environment for the ZBar Qt bindings library +Requires: lib%{name}-devel = %{version} +Requires: lib%{name}qt0 = %{version} + +%description -n lib%{name}qt-devel +This package contains all necessary include files, libraries, +configuration files and development tools needed to compile and link +applications using the zbar-qt library. + +%package -n python3-zbar +Summary: Python3 module for ZBar + +%description -n python3-zbar +This package contains the module to use ZBar from python3. + +%prep +%autosetup -p1 + +%build +autoreconf -fiv +%configure \ + --docdir=%{_docdir}/%{name} \ + --disable-static \ + --without-java \ + --with-python=python3 \ + --without-gtk +%make_build + +%install +%make_install +find %{buildroot} -name "*.la" -or -name "*.a" | xargs rm -f +rm -rf %{buildroot}%{_datadir}/doc/zbar-%{version}/ +rm -f %{buildroot}%{_docdir}/zbar/{COPYING,LICENSE.md,INSTALL.md} + +%find_lang %{name} +# Lets wait for review first +rm -rf %{buildroot}%{_sysconfdir}/dbus-1/system.d/org.linuxtv.Zbar.conf + +%ldconfig_scriptlets -n %{libname} +%ldconfig_scriptlets -n libzbarqt0 + +%files +%license COPYING LICENSE.md +%{_defaultdocdir}/%{name}/ +%{_bindir}/zbarimg +%{_bindir}/zbarcam +%{_bindir}/zbarcam-qt +%{_mandir}/man1/* + +%files lang -f %{name}.lang + +%files -n %{libname} +%{_libdir}/libzbar.so.%{sover}* + +%files -n lib%{name}-devel +%doc HACKING.md TODO.md +%dir %{_includedir}/%{name} +%{_includedir}/zbar.h +%{_includedir}/zbar/Exception.h +%{_includedir}/zbar/Symbol.h +%{_includedir}/zbar/Image.h +%{_includedir}/zbar/Scanner.h +%{_includedir}/zbar/Decoder.h +%{_includedir}/zbar/ImageScanner.h +%{_includedir}/zbar/Video.h +%{_includedir}/zbar/Window.h +%{_includedir}/zbar/Processor.h +%{_libdir}/libzbar.so +%{_libdir}/pkgconfig/zbar.pc + +%files -n lib%{name}qt0 +%{_libdir}/libzbarqt.so.%{sover}* + +%files -n lib%{name}qt-devel +%{_includedir}/%{name}/QZBar*.h +%{_libdir}/libzbarqt.so +%{_libdir}/pkgconfig/zbar-qt.pc + +%files -n python3-zbar +%{python3_sitearch}/zbar.so + +%changelog