Compare commits
95 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
257ee58d88 | ||
|
|
6c6747c812 | ||
|
|
ce2f2dbd06 | ||
|
|
13577c08e5 | ||
|
|
a1e97927fd | ||
|
|
9796c95d23 | ||
|
|
3b470a2d65 | ||
|
|
bb34380f84 | ||
|
|
d99b509668 | ||
|
|
85f877885c | ||
|
|
8b34b04285 | ||
|
|
84f4d66df0 | ||
|
|
f07fb24c88 | ||
|
|
228839a243 | ||
|
|
dec080b68c | ||
|
|
23ba05b98d | ||
|
|
107c91c11f | ||
|
|
8304c4ae98 | ||
| d5b34494c9 | |||
|
|
267ec547c2 | ||
|
|
50012aaeef | ||
|
|
ee527c1110 | ||
|
|
d9ab6bd465 | ||
|
|
239937f7f0 | ||
|
|
76753c237f | ||
|
|
1d27d2f2d2 | ||
|
|
3382cddf1b | ||
|
|
a7acfe6d3d | ||
|
|
888b226546 | ||
|
|
ce06971a59 | ||
|
|
5db803bc6f | ||
|
|
a8a6072c5d | ||
|
|
1eb32e16c5 | ||
|
|
4da8028c1a | ||
|
|
9cdd221147 | ||
|
|
1ec754dc2c | ||
|
|
cd9eddb418 | ||
|
|
5fad1e4a16 | ||
|
|
cf8c7c0020 | ||
|
|
8a571d93a8 | ||
|
|
cc085ac4be | ||
|
|
38751c3a39 | ||
|
|
932f44b9f7 | ||
|
|
cbd438c1d3 | ||
|
|
4271d86619 | ||
|
|
180f278751 | ||
|
|
65b1326e59 | ||
|
|
1bd23d395d | ||
|
|
de7a7a2177 | ||
|
|
f804e4f3cc | ||
|
32cda90a06 |
|||
|
|
366530f9ae | ||
|
|
665880f68b | ||
|
|
f0cd33a9e4 | ||
|
|
883b7ce619 | ||
|
|
6deccd757c | ||
|
|
c9fd939c01 | ||
|
|
7adb3c8dcb | ||
|
|
3912a5c736 | ||
|
|
02a23e52f1 | ||
|
|
e0125b27b6 | ||
|
|
1aa537a68e | ||
|
|
a426834d7f | ||
|
|
6a7663d714 | ||
|
|
9e88a5e49f | ||
| 5dbc4944f4 | |||
|
|
b0a327b728 | ||
|
|
97f8445ae5 | ||
|
|
60e4c2b86f | ||
|
|
ff4c638d36 | ||
|
|
1c1368e0a4 | ||
|
|
3353f69d9d | ||
|
|
76f84ecfb5 | ||
|
|
1a52ec8524 | ||
|
|
c3e7934c3e | ||
|
|
b61f85891f | ||
|
|
9c48b8c57a | ||
|
53f2cbce7a |
|||
|
|
8f63028ae5 | ||
|
|
1b7ace63be | ||
|
|
cc5b455a31 | ||
|
|
564f374561 | ||
|
9e080c57c0 |
|||
| 08e8c3cb2f | |||
|
|
b2260ef693 | ||
|
|
7877cf2706 | ||
|
|
2896e09513 | ||
|
|
9dc8307e57 | ||
|
|
befb620030 | ||
|
|
658da81130 | ||
|
|
ff06c02600 | ||
|
|
8793112f34 | ||
|
|
f637bc2280 | ||
|
|
7715ab8df2 | ||
|
|
8588580711 |
10 changed files with 352 additions and 36214 deletions
12
.gitignore
vendored
12
.gitignore
vendored
|
|
@ -1,2 +1,14 @@
|
|||
zbar-0.10.tar.bz2
|
||||
/zbar-0.10.tar.bz2
|
||||
/zbar-0.20.tar.bz2
|
||||
/zbar-0.20.1.tar.bz2
|
||||
/zbar-0.21.tar.bz2
|
||||
/zbar-0.22.tar.bz2
|
||||
/zbar-0.22.2.tar.gz
|
||||
/zbar-0.22.2.tar.bz2
|
||||
/zbar-0.22.90.tar.bz2
|
||||
/zbar-0.22.91.tar.bz2
|
||||
/zbar-0.22.92.tar.bz2
|
||||
/zbar-0.23.tar.bz2
|
||||
/zbar-0.23.90.tar.bz2
|
||||
/zbar-0.23.93.tar.bz2
|
||||
|
|
|
|||
16
fix_qt_overlinking.patch
Normal file
16
fix_qt_overlinking.patch
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
This was causing Qt5 to be linked into every binary in zbar, where it is only
|
||||
needed for the Qt bindings (which already specify QT_CFLAGS, QT_LIBS, etc).
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f0f9723..2a26973 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -689,8 +689,6 @@ AM_CONDITIONAL([HAVE_QT], [test "x$with_qt" = "xyes"])
|
||||
AM_COND_IF([HAVE_QT],
|
||||
[AC_MSG_NOTICE([using Qt version $QT_VERSION])
|
||||
AC_MSG_NOTICE([using moc from $MOC])
|
||||
- CPPFLAGS="$CPPFLAGS $QT_CPPFLAGS"
|
||||
- LIBS="$LIBS $QT_LIBS"
|
||||
AC_CONFIG_FILES([zbar-qt.pc:"${qt_pkgconfig_file}.in"])
|
||||
#dnl -fPIC has no effect on Windows and breaks windres
|
||||
AS_IF([test "x$win32" = "xno"], [CPPFLAGS="$CPPFLAGS -fPIC"])])
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
d8b9dddcf28d6603d8b066816941a9d2 zbar-0.10.tar.bz2
|
||||
SHA512 (zbar-0.23.93.tar.bz2) = 8b1d57557cb1c425109b709f0cbe94830939cb4cd9a0cb505d44ba3c7cfb3522560c3bbf2a8b37985da4577b677ad675491f6ef0e9796749382079c0e844e21e
|
||||
|
|
|
|||
10
use_python3_on_python_script.patch
Normal file
10
use_python3_on_python_script.patch
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
diff --git a/test/test_python.py b/test/test_python.py
|
||||
index 252c51a97256..8388d9a5aa36 100755
|
||||
--- a/test/test_python.py
|
||||
+++ b/test/test_python.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
#------------------------------------------------------------------------
|
||||
# Copyright 2019 (c) Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
|
||||
#
|
||||
403
zbar.spec
403
zbar.spec
|
|
@ -1,148 +1,176 @@
|
|||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||
%ifarch %{java_arches}
|
||||
%global JAVA 1
|
||||
%else
|
||||
%global JAVA 0
|
||||
%endif
|
||||
|
||||
Name: zbar
|
||||
Version: 0.10
|
||||
Release: 27%{?dist}
|
||||
Summary: Bar code reader
|
||||
Name: zbar
|
||||
Version: 0.23.93
|
||||
Release: 13%{?dist}
|
||||
Summary: Bar code reader
|
||||
|
||||
Group: User Interface/X Hardware Support
|
||||
License: LGPLv2+
|
||||
URL: http://zbar.sourceforge.net/
|
||||
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
|
||||
Patch0: zbar_update_to_hg.patch
|
||||
Patch1: zbar_use_libv4l.patch
|
||||
Patch2: zbar_choose_supported_format_first.patch
|
||||
Patch3: zbar_use_REQBUFS_properly.patch
|
||||
Patch4: zbar_configure_ac_use_m4_pattern_allow.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildRequires: autoconf automake libtool python-devel gettext-devel
|
||||
BuildRequires: qt4-devel gtk2-devel pygtk2-devel GraphicsMagick-c++-devel
|
||||
BuildRequires: libv4l-devel libXv-devel xmlto
|
||||
License: LGPL-2.1-or-later
|
||||
URL: http://zbar.sourceforge.net/
|
||||
Source0: https://linuxtv.org/downloads/%{name}/%{name}-%{version}.tar.bz2
|
||||
Patch0: use_python3_on_python_script.patch
|
||||
Patch1: fix_qt_overlinking.patch
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: dbus-devel
|
||||
BuildRequires: gettext-devel
|
||||
BuildRequires: GraphicsMagick-devel
|
||||
BuildRequires: gtk3-devel
|
||||
BuildRequires: libSM-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libv4l-devel
|
||||
BuildRequires: libXv-devel
|
||||
BuildRequires: make
|
||||
BuildRequires: python3-gobject-devel
|
||||
BuildRequires: qt5-qtbase-devel
|
||||
BuildRequires: qt5-qtx11extras-devel
|
||||
%if %{JAVA}
|
||||
BuildRequires: java-devel
|
||||
%endif
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: xmlto
|
||||
BuildRequires: gobject-introspection-devel
|
||||
|
||||
%description
|
||||
A layered barcode scanning and decoding library. Supports EAN, UPC, Code 128,
|
||||
Code 39 and Interleaved 2 of 5.
|
||||
Includes applications for decoding captured barcode images and using a video
|
||||
device (eg, webcam) as a barcode scanner.
|
||||
ZBar Bar Code Reader is an open source software suite for reading bar
|
||||
codes from various sources, such as video streams, image files and raw
|
||||
intensity sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, Code 128,
|
||||
Code 93, Code 39, Codabar, Interleaved 2 of 5, QR Code and SQ Code.
|
||||
|
||||
%package devel
|
||||
Group: Development/Libraries
|
||||
Summary: Bar code library extra development files
|
||||
Requires: pkgconfig, %{name} = %{version}-%{release}
|
||||
Summary: Bar code reader library extra development files
|
||||
Requires: %{name}-libs%{_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
This package contains header files and additional libraries used for
|
||||
developing applications that read bar codes with this library.
|
||||
|
||||
%package libs
|
||||
Summary: Bar code reader library
|
||||
|
||||
%description libs
|
||||
This package contains the ZBar Bar Code Reader library.
|
||||
|
||||
%package gtk
|
||||
Group: Development/Libraries
|
||||
Summary: Bar code reader GTK widget
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: %{name}-libs%{_isa} = %{version}-%{release}
|
||||
# Obsoleted in F37
|
||||
Obsoletes: %{name}-gi < %{version}-%{release}
|
||||
|
||||
%description gtk
|
||||
This package contains a bar code scanning widget for use with GUI
|
||||
applications based on GTK+-2.0.
|
||||
applications based on GTK 3.
|
||||
|
||||
%package gtk-devel
|
||||
Group: Development/Libraries
|
||||
Summary: Bar code reader GTK widget extra development files
|
||||
Requires: pkgconfig, %{name}-gtk = %{version}-%{release}, %{name}-devel = %{version}-%{release}
|
||||
Requires: %{name}-devel%{_isa} = %{version}-%{release}
|
||||
Requires: %{name}-gtk%{_isa} = %{version}-%{release}
|
||||
|
||||
%description gtk-devel
|
||||
This package contains header files and additional libraries used for
|
||||
developing GUI applications based on GTK+-2.0 that include a bar code
|
||||
developing GUI applications based on GTK 3 that include a bar code
|
||||
scanning widget.
|
||||
|
||||
%package pygtk
|
||||
Group: Development/Libraries
|
||||
Summary: Bar code reader PyGTK widget
|
||||
Requires: pygtk2, %{name}-gtk = %{version}-%{release}
|
||||
|
||||
%description pygtk
|
||||
This package contains a bar code scanning widget for use in GUI
|
||||
applications based on PyGTK.
|
||||
|
||||
%package qt
|
||||
Group: Development/Libraries
|
||||
Summary: Bar code reader Qt widget
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: %{name}-libs%{_isa} = %{version}-%{release}
|
||||
|
||||
%description qt
|
||||
This package contains a bar code scanning widget for use with GUI
|
||||
applications based on Qt4.
|
||||
|
||||
%package qt-devel
|
||||
Group: Development/Libraries
|
||||
Summary: Bar code reader Qt widget extra development files
|
||||
Requires: pkgconfig, %{name}-qt = %{version}-%{release}, %{name}-devel = %{version}-%{release}
|
||||
Requires: %{name}-devel%{_isa} = %{version}-%{release}
|
||||
Requires: %{name}-qt%{_isa} = %{version}-%{release}
|
||||
|
||||
%description qt-devel
|
||||
This package contains header files and additional libraries used for
|
||||
developing GUI applications based on Qt4 that include a bar code
|
||||
developing GUI applications based on Qt5 that include a bar code
|
||||
scanning widget.
|
||||
|
||||
%package -n python3-zbar
|
||||
Summary: Bar code reader PyGTK widget
|
||||
Requires: %{name}-libs%{_isa} = %{version}-%{release}
|
||||
Requires: python3-pillow
|
||||
# Renamed in F37
|
||||
Obsoletes: %{name}-python3 < %{version}-%{release}
|
||||
|
||||
%description -n python3-zbar
|
||||
This package contains a bar code scanning widget for use on
|
||||
python applications that work with images.
|
||||
|
||||
%if %{JAVA}
|
||||
%package java
|
||||
Summary: Bar code reader Java library
|
||||
Requires: %{name}-devel%{_isa} = %{version}-%{release}
|
||||
Requires: %{name}-gtk%{_isa} = %{version}-%{release}
|
||||
|
||||
%description java
|
||||
This package contains header files and additional libraries used for
|
||||
on Java Native Interface (JNI) applications using ZBar.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch 0 -p1
|
||||
%patch 1 -p1
|
||||
|
||||
%build
|
||||
autoreconf -vfi
|
||||
%configure --with-graphicsmagick --docdir=%{_docdir}/%{name}-%{version}
|
||||
autoreconf -fiv
|
||||
%configure --with-python=python3 --with-gtk=auto --with-dbusconfdir=%{_sysconfdir} --docdir=%{_docdir}/%{name}-%{version} --with-graphicsmagick --without-xshm --without-xv --enable-codes=ean,databar,code128,code93,code39,codabar,i25,qrcode,sqcode,pdf417
|
||||
|
||||
# rpath
|
||||
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
||||
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
||||
|
||||
make %{?_smp_mflags}
|
||||
%make_build
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
|
||||
%make_install
|
||||
%if %{JAVA}
|
||||
install -d %{buildroot}%{_jnidir}
|
||||
mv %{buildroot}%{_datadir}/zbar/lib/zbar.jar %{buildroot}%{_jnidir}
|
||||
mv %{buildroot}%{_datadir}/zbar/lib/libzbarjni.so* %{buildroot}%{_libdir}
|
||||
%endif
|
||||
cp test/test_python.py %{buildroot}%{_docdir}
|
||||
|
||||
#Remove .la and .a files
|
||||
find ${RPM_BUILD_ROOT} -name '*.la' -or -name '*.a' | xargs rm -f
|
||||
|
||||
# Remove installed doc
|
||||
rm -rf $RPM_BUILD_ROOT/usr/share/doc/zbar-0.10/
|
||||
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
%ldconfig_scriptlets devel
|
||||
|
||||
%post devel -p /sbin/ldconfig
|
||||
%ldconfig_scriptlets gtk
|
||||
|
||||
%post gtk -p /sbin/ldconfig
|
||||
%ldconfig_scriptlets qt
|
||||
|
||||
%post qt -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%postun devel -p /sbin/ldconfig
|
||||
|
||||
%postun gtk -p /sbin/ldconfig
|
||||
|
||||
%postun qt -p /sbin/ldconfig
|
||||
%find_lang zbar
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING LICENSE NEWS
|
||||
|
||||
%doc NEWS.md README.md INSTALL.md
|
||||
%{_bindir}/zbarimg
|
||||
%{_bindir}/zbarcam
|
||||
%{_libdir}/libzbar.so.*
|
||||
%{_mandir}/man1/*
|
||||
%{_sysconfdir}/dbus-1/system.d/org.linuxtv.Zbar.conf
|
||||
|
||||
%files libs -f zbar.lang
|
||||
%license COPYING LICENSE.md
|
||||
%{_libdir}/libzbar.so.0*
|
||||
%{_libdir}/girepository-1.0/ZBar-1.0.typelib
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%doc HACKING TODO
|
||||
|
||||
%doc HACKING.md TODO.md
|
||||
%{_libdir}/libzbar.so
|
||||
%{_libdir}/pkgconfig/zbar.pc
|
||||
%dir %{_includedir}/zbar
|
||||
|
|
@ -156,33 +184,224 @@ rm -rf $RPM_BUILD_ROOT
|
|||
%{_includedir}/zbar/Video.h
|
||||
%{_includedir}/zbar/Window.h
|
||||
%{_includedir}/zbar/Processor.h
|
||||
%{_datadir}/gir-1.0/ZBar-1.0.gir
|
||||
|
||||
%files gtk
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/libzbargtk.so.*
|
||||
%{_bindir}/zbarcam-gtk
|
||||
|
||||
%files gtk-devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/libzbargtk.so
|
||||
%{_libdir}/pkgconfig/zbar-gtk.pc
|
||||
%{_includedir}/zbar/zbargtk.h
|
||||
|
||||
%files pygtk
|
||||
%defattr(-,root,root,-)
|
||||
%{python_sitearch}/zbarpygtk.so
|
||||
%{python_sitearch}/zbar.so
|
||||
|
||||
%files qt
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/libzbarqt.so.*
|
||||
%{_bindir}/zbarcam-qt
|
||||
|
||||
%files qt-devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/libzbarqt.so
|
||||
%{_libdir}/pkgconfig/zbar-qt.pc
|
||||
%{_includedir}/zbar/QZBar*.h
|
||||
|
||||
%if %{JAVA}
|
||||
%files java
|
||||
%{_jnidir}/zbar.jar
|
||||
%{_libdir}/libzbarjni.so*
|
||||
%endif
|
||||
|
||||
%files -n python3-zbar
|
||||
%{python3_sitearch}/zbar.so
|
||||
%{_docdir}/test_python.py
|
||||
|
||||
%changelog
|
||||
* Tue Aug 04 2026 Gwyn Ciesla <gwync@protonmail.com> - 0.23.93-13
|
||||
- Rebuild for Python 3.15.0b4
|
||||
|
||||
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.93-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
|
||||
|
||||
* Wed Jun 03 2026 Python Maint <python-maint@redhat.com> - 0.23.93-11
|
||||
- Rebuilt for Python 3.15
|
||||
|
||||
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.93-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
|
||||
|
||||
* Fri Sep 05 2025 Yaakov Selkowitz <yselkowi@redhat.com> - 0.23.93-9
|
||||
- Fix Qt overlinking
|
||||
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.93-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 0.23.93-7
|
||||
- Rebuilt for Python 3.14
|
||||
|
||||
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.93-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.93-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 0.23.93-4
|
||||
- Rebuilt for Python 3.13
|
||||
|
||||
* Mon Apr 15 2024 Gwyn Ciesla <gwync@protonmail.com> - 0.23.93-3
|
||||
- Update python3-gobject BuildRequires
|
||||
|
||||
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.93-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Tue Jan 09 2024 Gwyn Ciesla <gwync@protonmail.com> - 0.23.93-1
|
||||
- 0.23.93
|
||||
|
||||
* Fri Jan 05 2024 Florian Weimer <fweimer@redhat.com> - 0.23.90-12
|
||||
- Add missing Py_SIZE to py311.patch
|
||||
|
||||
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.90-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Fri Jul 07 2023 Michael J Gruber <mjg@fedoraproject.org> - 0.23.90-10
|
||||
- Fix FTBFS with python 3.12 (rhbz#2220630)
|
||||
|
||||
* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 0.23.90-9
|
||||
- Rebuilt for Python 3.12
|
||||
|
||||
* Wed Mar 01 2023 Gwyn Ciesla <gwync@protonmail.com> - 0.23.90-8
|
||||
- migrated to SPDX license
|
||||
|
||||
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.90-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Wed Dec 21 2022 Gwyn Ciesla <gwync@protonmail.com> - 0.23.90-6
|
||||
- BR setuptools
|
||||
|
||||
* Fri Aug 26 2022 Kalev Lember <klember@redhat.com> - 0.23.90-5
|
||||
- Misc packaging cleanup
|
||||
- Sort BuildRequires and Requires and split them out one per line
|
||||
- Move GObject Introspection bindings to -gtk and -gtk-devel subpackages
|
||||
- Split libzbar out to zbar-libs subpackage
|
||||
- Tighten subpackage deps with %%{_isa}
|
||||
- Drop manual requires on pkgconfig and rely on rpm dep extractor
|
||||
- Rename zbar-python3 to python3-zbar as per latest Python guidelines
|
||||
- Use make_build and make_install macros
|
||||
|
||||
* Mon Aug 01 2022 Gwyn Ciesla <gwync@protonmail.com> - 0.23.90-4
|
||||
- Only build Java on supported platforms.
|
||||
|
||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.90-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.23.90-2
|
||||
- Rebuilt for Python 3.11
|
||||
|
||||
* Tue May 31 2022 Gwyn Ciesla <gwync@protonmail.com> - 0.23.90-1
|
||||
- 0.23.90
|
||||
|
||||
* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 0.23-14
|
||||
- Rebuilt for java-17-openjdk as system jdk
|
||||
|
||||
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.23-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Wed Jan 12 2022 Gwyn Ciesla <gwync@protonmail.com> - 0.23-12
|
||||
- Fix 3.11 FTBFS.
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.23-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.23-10
|
||||
- Rebuilt for Python 3.10
|
||||
|
||||
* Thu Mar 25 2021 Gwyn Ciesla <gwync@protonmail.com> - 0.23-9
|
||||
Fix FTBFS for autoconf 2.71.
|
||||
|
||||
* Thu Jan 28 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.23-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.23-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Mon Jul 20 2020 Gwyn Ciesla <gwync@protonmail.com> - 0.23-6
|
||||
- Update description.
|
||||
- Patch for Python 3.9.
|
||||
- Move back to GraphicsMagick.
|
||||
|
||||
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.23-5
|
||||
- Rebuilt for Python 3.9
|
||||
|
||||
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.23-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.23-3
|
||||
- Rebuilt for Python 3.8
|
||||
|
||||
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.23-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Thu May 23 2019 Mauro Carvalho Chehab <mchehab+samsung@kernel.org> - 0.23-1
|
||||
- Bump to release 0.23.
|
||||
|
||||
|
||||
* Tue May 14 2019 Mauro Carvalho Chehab <mchehab+samsung@kernel.org> - 0.22.92-1
|
||||
- Third release candidate for 0.23.
|
||||
|
||||
* Fri May 10 2019 Mauro Carvalho Chehab <mchehab+samsung@kernel.org> - 0.22.90-1
|
||||
- Release candidate for 0.23. Support for Gtk3 and GObject Introspection (GIR)
|
||||
|
||||
* Mon Apr 29 2019 Mauro Carvalho Chehab <mchehab+samsung@kernel.org> - 0.22.2-1
|
||||
- Update to 0.22.2: added support for Java 11
|
||||
|
||||
* Wed Feb 20 2019 Mauro Carvalho Chehab <mchehab+samsung@kernel.org> - 0.22-1
|
||||
- Bump to version 0.22: zbarcam-qt is now a full-featured application
|
||||
|
||||
* Tue Feb 12 2019 Mauro Carvalho Chehab <mchehab+samsung@kernel.org> - 0.21-1
|
||||
- Bump to version 0.21: d-bus and SQ code support, improved zbarcam-qt
|
||||
|
||||
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.20.1-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Mon Jan 7 2019 Mauro Carvalho Chehab <mchehab+samsung@kernel.org> - 0.20.1-4
|
||||
- Disable python2 bindings due to pygtk2 orphaned package
|
||||
|
||||
* Thu Aug 9 2018 Hans de Goede <hdegoede@redhat.com> - 0.20.1-3
|
||||
- Drop zbar_fedora29_hack_for_codegen_to_work.patch now that pygobject2 is
|
||||
fixed (rhbz# 1606784)
|
||||
- Use %%ldconfig_scriptlets so that we don't unnecessarily run ldconfig on F28+
|
||||
|
||||
* Wed Aug 08 2018 Mauro Carvalho Chehab <mchehab+samsung@kernel.org> - 0.20.1-2
|
||||
- Re-enable python2 bindings
|
||||
|
||||
* Wed Aug 08 2018 Mauro Carvalho Chehab <mchehab+samsung@kernel.org> - 0.20.1-1
|
||||
- Bump version to 0.20.1
|
||||
|
||||
* Tue Aug 07 2018 Mauro Carvalho Chehab <mchehab+samsung@kernel.org> - 0.20-8
|
||||
- Fix python 2 dependencies
|
||||
|
||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.20-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Wed Feb 14 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.20-6
|
||||
- Update Python 2 dependency declarations to new packaging standards
|
||||
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.20-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.20-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.20-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Tue Apr 11 2017 Mauro Carvalho Chehab <mchehab@s-opensource.com> - 0.20-1
|
||||
- Update it to version 0.20 with brings V4L2 controls to zbarcam-qt
|
||||
|
||||
* Sun Mar 26 2017 Mauro Carvalho Chehab <mchehab@s-opensource.com> - 0.10-29
|
||||
- Make zbar-qt to use Qt5 and generate gtk and qt applications
|
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.10-28
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10-27
|
||||
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
||||
|
||||
|
|
@ -279,7 +498,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||
- Removed ldconfig calls to devel subpackages
|
||||
- Fixed directory ownership issue -pygtk
|
||||
- Added %%{name} to URL
|
||||
- Added comment to rpath
|
||||
- Added comment to rpath
|
||||
- Improved comment for removing .la and .a files
|
||||
|
||||
* Mon Jul 27 2009 Douglas Schilling Landgraf <dougsland@redhat.com> - 0.8-4
|
||||
|
|
@ -289,7 +508,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||
- Removed Provides for not included static libs
|
||||
- Removed redundant requires to subpackages -qt and -gtk
|
||||
- Removed redundant {name} = %%{version}-%%{release} from -pygtk
|
||||
- Replaced macros from % to %% in changelog
|
||||
- Replaced macros from % to %% in changelog
|
||||
- Fixed ownership issue
|
||||
- Added ldconfig call to devel, qt-devel and gtk-devel
|
||||
|
||||
|
|
@ -316,8 +535,8 @@ rm -rf $RPM_BUILD_ROOT
|
|||
- Fixed rpath error
|
||||
|
||||
* Thu Jul 16 2009 Douglas Schilling Landgraf <dougsland@redhat.com> - 0.8-2
|
||||
- Added pkgconfig to devel package
|
||||
- Fixed syntax to ldconfig
|
||||
- Added pkgconfig to devel package
|
||||
- Fixed syntax to ldconfig
|
||||
- Fixed warnings from rpmlint
|
||||
- Fixed static path to docs
|
||||
|
||||
|
|
|
|||
|
|
@ -1,128 +0,0 @@
|
|||
diff -r 60f92d860a1f zbar/convert.c
|
||||
--- a/zbar/convert.c Sat Dec 25 08:29:33 2010 -0200
|
||||
+++ b/zbar/convert.c Sat Dec 25 14:36:04 2010 -0200
|
||||
@@ -1157,6 +1157,42 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
+ if(!min_fmt && vdo->emu_formats) {
|
||||
+ /* As vdo->formats aren't compatible, just free them */
|
||||
+ free(vdo->formats);
|
||||
+ vdo->formats = vdo->emu_formats;
|
||||
+ vdo->emu_formats = NULL;
|
||||
+
|
||||
+ /*
|
||||
+ * Use the same cost algorithm to select emulated formats.
|
||||
+ * This might select a sub-optimal conversion, but, in practice,
|
||||
+ * it will select a conversion to YUV at libv4l, and a YUY->Y8
|
||||
+ * in zbar, with it is OK. Yet, it is better to not select the
|
||||
+ * most performatic conversion than to not support the webcam.
|
||||
+ */
|
||||
+ for(fmt = _zbar_formats; *fmt; fmt++) {
|
||||
+ /* only consider formats supported by video device */
|
||||
+ uint32_t win_fmt = 0;
|
||||
+ int cost;
|
||||
+ if(!has_format(*fmt, srcs))
|
||||
+ continue;
|
||||
+ cost = _zbar_best_format(*fmt, &win_fmt, dsts);
|
||||
+ if(cost < 0) {
|
||||
+ zprintf(4, "%.4s(%08" PRIx32 ") -> ? (unsupported)\n",
|
||||
+ (char*)fmt, *fmt);
|
||||
+ continue;
|
||||
+ }
|
||||
+ zprintf(4, "%.4s(%08" PRIx32 ") -> %.4s(%08" PRIx32 ") (%d)\n",
|
||||
+ (char*)fmt, *fmt, (char*)&win_fmt, win_fmt, cost);
|
||||
+ if(min_cost > cost) {
|
||||
+ min_cost = cost;
|
||||
+ min_fmt = *fmt;
|
||||
+ if(!cost)
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if(win)
|
||||
(void)window_unlock(win);
|
||||
|
||||
diff -r 60f92d860a1f zbar/video.c
|
||||
--- a/zbar/video.c Sat Dec 25 08:29:33 2010 -0200
|
||||
+++ b/zbar/video.c Sat Dec 25 14:36:04 2010 -0200
|
||||
@@ -111,6 +111,9 @@
|
||||
free(vdo->buf);
|
||||
if(vdo->formats)
|
||||
free(vdo->formats);
|
||||
+ if(vdo->emu_formats)
|
||||
+ free(vdo->emu_formats);
|
||||
+
|
||||
err_cleanup(&vdo->err);
|
||||
_zbar_mutex_destroy(&vdo->qlock);
|
||||
|
||||
diff -r 60f92d860a1f zbar/video.h
|
||||
--- a/zbar/video.h Sat Dec 25 08:29:33 2010 -0200
|
||||
+++ b/zbar/video.h Sat Dec 25 14:36:04 2010 -0200
|
||||
@@ -69,6 +69,7 @@
|
||||
uint32_t format; /* selected fourcc */
|
||||
unsigned palette; /* v4l1 format index corresponding to format */
|
||||
uint32_t *formats; /* 0 terminated list of supported formats */
|
||||
+ uint32_t *emu_formats; /* 0 terminated list of emulated formats */
|
||||
|
||||
unsigned long datalen; /* size of image data for selected format */
|
||||
unsigned long buflen; /* total size of image data buffer */
|
||||
diff -r 60f92d860a1f zbar/video/v4l2.c
|
||||
--- a/zbar/video/v4l2.c Sat Dec 25 08:29:33 2010 -0200
|
||||
+++ b/zbar/video/v4l2.c Sat Dec 25 14:36:04 2010 -0200
|
||||
@@ -347,6 +347,8 @@
|
||||
|
||||
static inline int v4l2_probe_formats (zbar_video_t *vdo)
|
||||
{
|
||||
+ int n_formats = 0, n_emu_formats = 0;
|
||||
+
|
||||
zprintf(2, "enumerating supported formats:\n");
|
||||
struct v4l2_fmtdesc desc;
|
||||
memset(&desc, 0, sizeof(desc));
|
||||
@@ -354,17 +356,39 @@
|
||||
for(desc.index = 0; desc.index < V4L2_FORMATS_MAX; desc.index++) {
|
||||
if(v4l2_ioctl(vdo->fd, VIDIOC_ENUM_FMT, &desc) < 0)
|
||||
break;
|
||||
- zprintf(2, " [%d] %.4s : %s%s\n",
|
||||
+ zprintf(2, " [%d] %.4s : %s%s%s\n",
|
||||
desc.index, (char*)&desc.pixelformat, desc.description,
|
||||
- (desc.flags & V4L2_FMT_FLAG_COMPRESSED) ? " COMPRESSED" : "");
|
||||
- vdo->formats = realloc(vdo->formats,
|
||||
- (desc.index + 2) * sizeof(uint32_t));
|
||||
- vdo->formats[desc.index] = desc.pixelformat;
|
||||
+ (desc.flags & V4L2_FMT_FLAG_COMPRESSED) ? " COMPRESSED" : "",
|
||||
+ (desc.flags & V4L2_FMT_FLAG_EMULATED) ? " EMULATED" : "");
|
||||
+ if (desc.flags & V4L2_FMT_FLAG_EMULATED) {
|
||||
+ vdo->emu_formats = realloc(vdo->emu_formats,
|
||||
+ (n_emu_formats + 2) * sizeof(uint32_t));
|
||||
+ vdo->emu_formats[n_emu_formats++] = desc.pixelformat;
|
||||
+ } else {
|
||||
+ vdo->formats = realloc(vdo->formats,
|
||||
+ (n_formats + 2) * sizeof(uint32_t));
|
||||
+ vdo->formats[n_formats++] = desc.pixelformat;
|
||||
+ }
|
||||
}
|
||||
if(!desc.index)
|
||||
return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
|
||||
"enumerating video formats (VIDIOC_ENUM_FMT)"));
|
||||
- vdo->formats[desc.index] = 0;
|
||||
+ if(vdo->formats)
|
||||
+ vdo->formats[n_formats] = 0;
|
||||
+ if(vdo->emu_formats)
|
||||
+ vdo->emu_formats[n_emu_formats] = 0;
|
||||
+ if(!vdo->formats && vdo->emu_formats) {
|
||||
+ /*
|
||||
+ * If only emu formats are available, just move them to vdo->formats.
|
||||
+ * This happens when libv4l detects that the only available fourcc
|
||||
+ * formats are webcam proprietary formats or bayer formats.
|
||||
+ */
|
||||
+ vdo->formats = vdo->emu_formats;
|
||||
+ vdo->emu_formats = NULL;
|
||||
+ }
|
||||
+
|
||||
+ zprintf(2, "Found %d formats and %d emulated formats.\n",
|
||||
+ n_formats, n_emu_formats);
|
||||
|
||||
struct v4l2_format fmt;
|
||||
struct v4l2_pix_format *pix = &fmt.fmt.pix;
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- a/configure.ac 2015-08-14 16:26:09.661856984 -0300
|
||||
+++ b/configure.ac 2015-08-14 16:26:20.209851076 -0300
|
||||
@@ -4,7 +4,7 @@
|
||||
AC_CONFIG_AUX_DIR(config)
|
||||
AC_CONFIG_MACRO_DIR(config)
|
||||
AM_INIT_AUTOMAKE([1.10 -Werror foreign subdir-objects std-options dist-bzip2])
|
||||
-AM_PROG_AR
|
||||
+m4_pattern_allow([AM_PROG_AR])
|
||||
AC_CONFIG_HEADERS([include/config.h])
|
||||
AC_CONFIG_SRCDIR(zbar/scanner.c)
|
||||
LT_PREREQ([2.2])
|
||||
35551
zbar_update_to_hg.patch
35551
zbar_update_to_hg.patch
File diff suppressed because it is too large
Load diff
|
|
@ -1,124 +0,0 @@
|
|||
From a8ed8c04c119e5a323a2c79fcd0d28b4d29fc28a Mon Sep 17 00:00:00 2001
|
||||
From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
||||
Date: Thu, 23 Apr 2015 22:56:09 -0300
|
||||
Subject: [PATCH] v4l2: use REQBUFS properly
|
||||
|
||||
There are two issues on this driver with regards to buffer
|
||||
request:
|
||||
|
||||
1) it is not calling VIDIOC_REQBUFS for USERPTR;
|
||||
|
||||
2) It is calling VIDIOC_REQBUFS at probe, to check the max
|
||||
number of supported buffers, but it doesn't deallocate
|
||||
the buffers at the end of the probe function.
|
||||
|
||||
Fix those issues. Also, improve the error/warning messages
|
||||
associated with possible problems.
|
||||
|
||||
This is based on the issues detected by the patch proposed
|
||||
to fix this bug:
|
||||
https://bugs.archlinux.org/task/44091
|
||||
|
||||
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
||||
|
||||
diff --git a/zbar/video/v4l2.c b/zbar/video/v4l2.c
|
||||
index aabd16643ddc..f6662d3707f9 100644
|
||||
--- a/zbar/video/v4l2.c
|
||||
+++ b/zbar/video/v4l2.c
|
||||
@@ -201,21 +201,6 @@ static int v4l2_cleanup (zbar_video_t *vdo)
|
||||
|
||||
static int v4l2_mmap_buffers (zbar_video_t *vdo)
|
||||
{
|
||||
- struct v4l2_requestbuffers rb;
|
||||
- memset(&rb, 0, sizeof(rb));
|
||||
- rb.count = vdo->num_images;
|
||||
- rb.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
- rb.memory = V4L2_MEMORY_MMAP;
|
||||
- if(v4l2_ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0)
|
||||
- return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
|
||||
- "requesting video frame buffers (VIDIOC_REQBUFS)"));
|
||||
- zprintf(1, "mapping %u buffers (of %d requested)\n",
|
||||
- rb.count, vdo->num_images);
|
||||
- if(!rb.count)
|
||||
- return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__,
|
||||
- "driver returned 0 buffers"));
|
||||
- if(vdo->num_images > rb.count)
|
||||
- vdo->num_images = rb.count;
|
||||
|
||||
struct v4l2_buffer vbuf;
|
||||
memset(&vbuf, 0, sizeof(vbuf));
|
||||
@@ -313,8 +298,32 @@ static int v4l2_set_format (zbar_video_t *vdo,
|
||||
static int v4l2_init (zbar_video_t *vdo,
|
||||
uint32_t fmt)
|
||||
{
|
||||
+ struct v4l2_requestbuffers rb;
|
||||
if(v4l2_set_format(vdo, fmt))
|
||||
return(-1);
|
||||
+
|
||||
+ memset(&rb, 0, sizeof(rb));
|
||||
+ rb.count = vdo->num_images;
|
||||
+ rb.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
+ if(vdo->iomode == VIDEO_MMAP)
|
||||
+ rb.memory = V4L2_MEMORY_MMAP;
|
||||
+ else
|
||||
+ rb.memory = V4L2_MEMORY_USERPTR;
|
||||
+
|
||||
+ if(v4l2_ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0)
|
||||
+ return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
|
||||
+ "requesting video frame buffers (VIDIOC_REQBUFS)"));
|
||||
+
|
||||
+ if(!rb.count)
|
||||
+ return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__,
|
||||
+ "driver returned 0 buffers"));
|
||||
+
|
||||
+ if(vdo->num_images > rb.count)
|
||||
+ vdo->num_images = rb.count;
|
||||
+
|
||||
+ zprintf(1, "using %u buffers (of %d requested)\n",
|
||||
+ rb.count, vdo->num_images);
|
||||
+
|
||||
if(vdo->iomode == VIDEO_MMAP)
|
||||
return(v4l2_mmap_buffers(vdo));
|
||||
return(0);
|
||||
@@ -324,7 +333,7 @@ static int v4l2_probe_iomode (zbar_video_t *vdo)
|
||||
{
|
||||
struct v4l2_requestbuffers rb;
|
||||
memset(&rb, 0, sizeof(rb));
|
||||
- rb.count = vdo->num_images; /* FIXME workaround broken drivers */
|
||||
+ rb.count = vdo->num_images;
|
||||
rb.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
if(vdo->iomode == VIDEO_MMAP)
|
||||
rb.memory = V4L2_MEMORY_MMAP;
|
||||
@@ -340,14 +349,31 @@ static int v4l2_probe_iomode (zbar_video_t *vdo)
|
||||
return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
|
||||
"querying streaming mode (VIDIOC_REQBUFS)"));
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
+ err_capture(vdo, SEV_WARNING, ZBAR_ERR_SYSTEM, __func__,
|
||||
+ "USERPTR failed. Falling back to mmap");
|
||||
vdo->iomode = VIDEO_MMAP;
|
||||
+#else
|
||||
+ return err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
|
||||
+ "Userptr not supported, and zbar was compiled without mmap support"));
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
if(!vdo->iomode)
|
||||
- vdo->iomode = VIDEO_USERPTR;
|
||||
+ rb.memory = V4L2_MEMORY_USERPTR;
|
||||
+ /* Update the num_images with the max supported by the driver */
|
||||
if(rb.count)
|
||||
vdo->num_images = rb.count;
|
||||
+ else
|
||||
+ err_capture(vdo, SEV_WARNING, ZBAR_ERR_SYSTEM, __func__,
|
||||
+ "Something is wrong: number of buffers returned by REQBUF is zero!");
|
||||
+
|
||||
+ /* requesting 0 buffers
|
||||
+ * This cleans up the buffers allocated previously on probe
|
||||
+ */
|
||||
+ rb.count = 0;
|
||||
+ if(v4l2_ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0)
|
||||
+ err_capture(vdo, SEV_WARNING, ZBAR_ERR_SYSTEM, __func__,
|
||||
+ "releasing video frame buffers (VIDIOC_REQBUFS)");
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
|
@ -1,305 +0,0 @@
|
|||
diff -r 38e78368283d configure.ac
|
||||
--- a/configure.ac Sun Oct 14 23:02:08 2012 -0700
|
||||
+++ b/configure.ac Fri Feb 22 10:04:52 2013 -0300
|
||||
@@ -3,7 +3,8 @@
|
||||
AC_INIT([zbar], [0.10], [spadix@users.sourceforge.net])
|
||||
AC_CONFIG_AUX_DIR(config)
|
||||
AC_CONFIG_MACRO_DIR(config)
|
||||
-AM_INIT_AUTOMAKE([1.10 -Wall -Werror foreign subdir-objects std-options dist-bzip2])
|
||||
+AM_INIT_AUTOMAKE([1.10 -Werror foreign subdir-objects std-options dist-bzip2])
|
||||
+AM_PROG_AR
|
||||
AC_CONFIG_HEADERS([include/config.h])
|
||||
AC_CONFIG_SRCDIR(zbar/scanner.c)
|
||||
LT_PREREQ([2.2])
|
||||
@@ -47,7 +48,7 @@
|
||||
[Library revision])
|
||||
|
||||
AM_CPPFLAGS="-I$srcdir/include"
|
||||
-AM_CFLAGS="-Wall -Wno-parentheses -Werror"
|
||||
+AM_CFLAGS="-Wall -Wno-parentheses"
|
||||
AM_CXXFLAGS="$AM_CFLAGS"
|
||||
AC_SUBST([AM_CPPFLAGS])
|
||||
AC_SUBST([AM_CFLAGS])
|
||||
@@ -179,11 +180,13 @@
|
||||
|
||||
have_v4l1="no"
|
||||
have_v4l2="no"
|
||||
+have_libv4l="no"
|
||||
AS_IF([test "x$enable_video" = "xno"],
|
||||
[],
|
||||
[test "x$win32" = "xno"],
|
||||
[AC_CHECK_HEADERS([linux/videodev.h], [have_v4l1="yes"])
|
||||
AC_CHECK_HEADERS([linux/videodev2.h], [have_v4l2="yes"])
|
||||
+ AC_CHECK_HEADERS([libv4l2.h], [have_libv4l="yes"])
|
||||
AS_IF([test "x$have_v4l2" = "xno" && test "x$have_v4l1" = "xno"],
|
||||
[AC_MSG_FAILURE([test for video support failed!
|
||||
rebuild your kernel to include video4linux support or
|
||||
@@ -194,9 +197,15 @@
|
||||
[AC_MSG_FAILURE([test for VfW video support failed!
|
||||
configure --disable-video to skip building video support.])])])
|
||||
|
||||
+AS_IF([test "x$have_libv4l" = "xyes"],
|
||||
+ AC_CHECK_LIB([v4l2], [v4l2_open], [],
|
||||
+ [AC_MSG_FAILURE([unable to find libv4l.so])]),
|
||||
+ [AC_MSG_WARN([libv4l not detected. Install it to support more cameras!])])
|
||||
+
|
||||
AM_CONDITIONAL([HAVE_VIDEO], [test "x$enable_video" != "xno"])
|
||||
AM_CONDITIONAL([HAVE_V4L1], [test "x$have_v4l1" != "xno"])
|
||||
AM_CONDITIONAL([HAVE_V4L2], [test "x$have_v4l2" != "xno"])
|
||||
+AM_CONDITIONAL([HAVE_LIBV4L], [test "x$have_libv4l" != "xno"])
|
||||
|
||||
dnl X
|
||||
AC_ARG_VAR([XSHM_LIBS], [linker flags for X shared memory extension])
|
||||
@@ -571,6 +580,8 @@
|
||||
echo "v4l --enable-video=$enable_video"
|
||||
AS_IF([test "x$enable_video" != "xyes"],
|
||||
[echo " => zbarcam video scanner will *NOT* be built"])
|
||||
+AS_IF([test "x$have_libv4l" != "xyes"],
|
||||
+ [echo " => libv4l will *NOT* be used"])
|
||||
echo "jpeg --with-jpeg=$with_jpeg"
|
||||
AS_IF([test "x$with_jpeg" != "xyes"],
|
||||
[echo " => JPEG image conversions will *NOT* be supported"])
|
||||
diff -r 38e78368283d zbar/video/v4l.c
|
||||
--- a/zbar/video/v4l.c Sun Oct 14 23:02:08 2012 -0700
|
||||
+++ b/zbar/video/v4l.c Fri Feb 22 10:04:52 2013 -0300
|
||||
@@ -34,6 +34,13 @@
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
+#ifdef HAVE_LIBV4L2_H
|
||||
+# include <fcntl.h>
|
||||
+# include <libv4l2.h>
|
||||
+#else
|
||||
+# define v4l2_open open
|
||||
+# define v4l2_close close
|
||||
+#endif
|
||||
|
||||
#include "video.h"
|
||||
|
||||
@@ -43,7 +50,7 @@
|
||||
int _zbar_video_open (zbar_video_t *vdo,
|
||||
const char *dev)
|
||||
{
|
||||
- vdo->fd = open(dev, O_RDWR);
|
||||
+ vdo->fd = v4l2_open(dev, O_RDWR);
|
||||
if(vdo->fd < 0)
|
||||
return(err_capture_str(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
|
||||
"opening video device '%s'", dev));
|
||||
@@ -60,7 +67,7 @@
|
||||
#endif
|
||||
|
||||
if(rc && vdo->fd >= 0) {
|
||||
- close(vdo->fd);
|
||||
+ v4l2_close(vdo->fd);
|
||||
vdo->fd = -1;
|
||||
}
|
||||
return(rc);
|
||||
diff -r 38e78368283d zbar/video/v4l2.c
|
||||
--- a/zbar/video/v4l2.c Sun Oct 14 23:02:08 2012 -0700
|
||||
+++ b/zbar/video/v4l2.c Fri Feb 22 10:04:52 2013 -0300
|
||||
@@ -38,6 +38,15 @@
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
# include <sys/mman.h>
|
||||
#endif
|
||||
+#ifdef HAVE_LIBV4L2_H
|
||||
+# include <fcntl.h>
|
||||
+# include <libv4l2.h>
|
||||
+#else
|
||||
+# define v4l2_close close
|
||||
+# define v4l2_ioctl ioctl
|
||||
+# define v4l2_mmap mmap
|
||||
+# define v4l2_munmap munmap
|
||||
+#endif
|
||||
#include <linux/videodev2.h>
|
||||
|
||||
#include "video.h"
|
||||
@@ -67,7 +76,7 @@
|
||||
vbuf.length = img->datalen;
|
||||
vbuf.index = img->srcidx; /* FIXME workaround broken drivers */
|
||||
}
|
||||
- if(ioctl(vdo->fd, VIDIOC_QBUF, &vbuf) < 0)
|
||||
+ if(v4l2_ioctl(vdo->fd, VIDIOC_QBUF, &vbuf) < 0)
|
||||
return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
|
||||
"queuing video buffer (VIDIOC_QBUF)"));
|
||||
return(0);
|
||||
@@ -91,7 +100,7 @@
|
||||
else
|
||||
vbuf.memory = V4L2_MEMORY_USERPTR;
|
||||
|
||||
- if(ioctl(fd, VIDIOC_DQBUF, &vbuf) < 0)
|
||||
+ if(v4l2_ioctl(fd, VIDIOC_DQBUF, &vbuf) < 0)
|
||||
return(NULL);
|
||||
|
||||
if(iomode == VIDEO_MMAP) {
|
||||
@@ -132,7 +141,7 @@
|
||||
return(0);
|
||||
|
||||
enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
- if(ioctl(vdo->fd, VIDIOC_STREAMON, &type) < 0)
|
||||
+ if(v4l2_ioctl(vdo->fd, VIDIOC_STREAMON, &type) < 0)
|
||||
return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
|
||||
"starting video stream (VIDIOC_STREAMON)"));
|
||||
return(0);
|
||||
@@ -144,7 +153,7 @@
|
||||
return(0);
|
||||
|
||||
enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
- if(ioctl(vdo->fd, VIDIOC_STREAMOFF, &type) < 0)
|
||||
+ if(v4l2_ioctl(vdo->fd, VIDIOC_STREAMOFF, &type) < 0)
|
||||
return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
|
||||
"stopping video stream (VIDIOC_STREAMOFF)"));
|
||||
return(0);
|
||||
@@ -164,7 +173,7 @@
|
||||
for(i = 0; i < vdo->num_images; i++) {
|
||||
zbar_image_t *img = vdo->images[i];
|
||||
if(img->data &&
|
||||
- munmap((void*)img->data, img->datalen))
|
||||
+ v4l2_munmap((void*)img->data, img->datalen))
|
||||
err_capture(vdo, SEV_WARNING, ZBAR_ERR_SYSTEM, __func__,
|
||||
"unmapping video frame buffers");
|
||||
img->data = NULL;
|
||||
@@ -177,14 +186,14 @@
|
||||
/* requesting 0 buffers
|
||||
* should implicitly disable streaming
|
||||
*/
|
||||
- if(ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0)
|
||||
+ if(v4l2_ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0)
|
||||
err_capture(vdo, SEV_WARNING, ZBAR_ERR_SYSTEM, __func__,
|
||||
"releasing video frame buffers (VIDIOC_REQBUFS)");
|
||||
|
||||
|
||||
- /* close open device */
|
||||
+ /* v4l2_close v4l2_open device */
|
||||
if(vdo->fd >= 0) {
|
||||
- close(vdo->fd);
|
||||
+ v4l2_close(vdo->fd);
|
||||
vdo->fd = -1;
|
||||
}
|
||||
return(0);
|
||||
@@ -197,7 +206,7 @@
|
||||
rb.count = vdo->num_images;
|
||||
rb.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
rb.memory = V4L2_MEMORY_MMAP;
|
||||
- if(ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0)
|
||||
+ if(v4l2_ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0)
|
||||
return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
|
||||
"requesting video frame buffers (VIDIOC_REQBUFS)"));
|
||||
zprintf(1, "mapping %u buffers (of %d requested)\n",
|
||||
@@ -216,7 +225,7 @@
|
||||
int i;
|
||||
for(i = 0; i < vdo->num_images; i++) {
|
||||
vbuf.index = i;
|
||||
- if(ioctl(vdo->fd, VIDIOC_QUERYBUF, &vbuf) < 0)
|
||||
+ if(v4l2_ioctl(vdo->fd, VIDIOC_QUERYBUF, &vbuf) < 0)
|
||||
/* FIXME cleanup */
|
||||
return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
|
||||
"querying video buffer (VIDIOC_QUERYBUF)"));
|
||||
@@ -229,7 +238,7 @@
|
||||
|
||||
zbar_image_t *img = vdo->images[i];
|
||||
img->datalen = vbuf.length;
|
||||
- img->data = mmap(NULL, vbuf.length, PROT_READ | PROT_WRITE, MAP_SHARED,
|
||||
+ img->data = v4l2_mmap(NULL, vbuf.length, PROT_READ | PROT_WRITE, MAP_SHARED,
|
||||
vdo->fd, vbuf.m.offset);
|
||||
if(img->data == MAP_FAILED)
|
||||
/* FIXME cleanup */
|
||||
@@ -253,7 +262,7 @@
|
||||
vpix->pixelformat = fmt;
|
||||
vpix->field = V4L2_FIELD_NONE;
|
||||
int rc = 0;
|
||||
- if((rc = ioctl(vdo->fd, VIDIOC_S_FMT, &vfmt)) < 0) {
|
||||
+ if((rc = v4l2_ioctl(vdo->fd, VIDIOC_S_FMT, &vfmt)) < 0) {
|
||||
/* several broken drivers return an error if we request
|
||||
* no interlacing (NB v4l2 spec violation)
|
||||
* ...try again with an interlaced request
|
||||
@@ -264,7 +273,7 @@
|
||||
/* FIXME this might be _ANY once we can de-interlace */
|
||||
vpix->field = V4L2_FIELD_INTERLACED;
|
||||
|
||||
- if(ioctl(vdo->fd, VIDIOC_S_FMT, &vfmt) < 0)
|
||||
+ if(v4l2_ioctl(vdo->fd, VIDIOC_S_FMT, &vfmt) < 0)
|
||||
return(err_capture_int(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
|
||||
"setting format %x (VIDIOC_S_FMT)", fmt));
|
||||
|
||||
@@ -276,7 +285,7 @@
|
||||
struct v4l2_pix_format *newpix = &newfmt.fmt.pix;
|
||||
memset(&newfmt, 0, sizeof(newfmt));
|
||||
newfmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
- if(ioctl(vdo->fd, VIDIOC_G_FMT, &newfmt) < 0)
|
||||
+ if(v4l2_ioctl(vdo->fd, VIDIOC_G_FMT, &newfmt) < 0)
|
||||
return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
|
||||
"querying format (VIDIOC_G_FMT)"));
|
||||
|
||||
@@ -322,7 +331,7 @@
|
||||
else
|
||||
rb.memory = V4L2_MEMORY_USERPTR;
|
||||
|
||||
- if(ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0) {
|
||||
+ if(v4l2_ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0) {
|
||||
if(vdo->iomode)
|
||||
return(err_capture_int(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__,
|
||||
"unsupported iomode requested (%d)",
|
||||
@@ -350,7 +359,7 @@
|
||||
memset(&desc, 0, sizeof(desc));
|
||||
desc.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
for(desc.index = 0; desc.index < V4L2_FORMATS_MAX; desc.index++) {
|
||||
- if(ioctl(vdo->fd, VIDIOC_ENUM_FMT, &desc) < 0)
|
||||
+ if(v4l2_ioctl(vdo->fd, VIDIOC_ENUM_FMT, &desc) < 0)
|
||||
break;
|
||||
zprintf(2, " [%d] %.4s : %s%s\n",
|
||||
desc.index, (char*)&desc.pixelformat, desc.description,
|
||||
@@ -368,7 +377,7 @@
|
||||
struct v4l2_pix_format *pix = &fmt.fmt.pix;
|
||||
memset(&fmt, 0, sizeof(fmt));
|
||||
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
- if(ioctl(vdo->fd, VIDIOC_G_FMT, &fmt) < 0)
|
||||
+ if(v4l2_ioctl(vdo->fd, VIDIOC_G_FMT, &fmt) < 0)
|
||||
return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
|
||||
"querying current video format (VIDIO_G_FMT)"));
|
||||
|
||||
@@ -390,15 +399,15 @@
|
||||
maxpix->height = vdo->height;
|
||||
|
||||
zprintf(1, "setting requested size: %d x %d\n", vdo->width, vdo->height);
|
||||
- if(ioctl(vdo->fd, VIDIOC_S_FMT, &maxfmt) < 0) {
|
||||
+ if(v4l2_ioctl(vdo->fd, VIDIOC_S_FMT, &maxfmt) < 0) {
|
||||
zprintf(1, "set FAILED...trying to recover original format\n");
|
||||
/* ignore errors (driver broken anyway) */
|
||||
- ioctl(vdo->fd, VIDIOC_S_FMT, &fmt);
|
||||
+ v4l2_ioctl(vdo->fd, VIDIOC_S_FMT, &fmt);
|
||||
}
|
||||
|
||||
memset(&fmt, 0, sizeof(fmt));
|
||||
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
- if(ioctl(vdo->fd, VIDIOC_G_FMT, &fmt) < 0)
|
||||
+ if(v4l2_ioctl(vdo->fd, VIDIOC_G_FMT, &fmt) < 0)
|
||||
return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
|
||||
"querying current video format (VIDIOC_G_FMT)"));
|
||||
|
||||
@@ -420,7 +429,7 @@
|
||||
struct v4l2_cropcap ccap;
|
||||
memset(&ccap, 0, sizeof(ccap));
|
||||
ccap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
- if(ioctl(vdo->fd, VIDIOC_CROPCAP, &ccap) < 0)
|
||||
+ if(v4l2_ioctl(vdo->fd, VIDIOC_CROPCAP, &ccap) < 0)
|
||||
return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
|
||||
"querying crop support (VIDIOC_CROPCAP)"));
|
||||
|
||||
@@ -442,7 +451,7 @@
|
||||
memset(&crop, 0, sizeof(crop));
|
||||
crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
crop.c = ccap.defrect;
|
||||
- if(ioctl(vdo->fd, VIDIOC_S_CROP, &crop) < 0 && errno != EINVAL)
|
||||
+ if(v4l2_ioctl(vdo->fd, VIDIOC_S_CROP, &crop) < 0 && errno != EINVAL)
|
||||
return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
|
||||
"setting default crop window (VIDIOC_S_CROP)"));
|
||||
return(0);
|
||||
@@ -453,7 +462,7 @@
|
||||
/* check capabilities */
|
||||
struct v4l2_capability vcap;
|
||||
memset(&vcap, 0, sizeof(vcap));
|
||||
- if(ioctl(vdo->fd, VIDIOC_QUERYCAP, &vcap) < 0)
|
||||
+ if(v4l2_ioctl(vdo->fd, VIDIOC_QUERYCAP, &vcap) < 0)
|
||||
return(err_capture(vdo, SEV_WARNING, ZBAR_ERR_UNSUPPORTED, __func__,
|
||||
"video4linux version 2 not supported (VIDIOC_QUERYCAP)"));
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue