--- zbar-0.10+doc.orig/debian/changelog +++ zbar-0.10+doc/debian/changelog @@ -0,0 +1,273 @@ +zbar (0.10+doc-9) unstable; urgency=low + + * [2c641cc9] Fix configure.ac to build with newer autotools. + Thanks to Lucas Nussbaum (Closes: #713332) + + -- Bernd Zeimetz Sun, 18 Aug 2013 12:26:59 +0200 + +zbar (0.10+doc-8) unstable; urgency=low + + * [5c38da40] Use [linux-any] instead of [!kfreebsd-*]. + Thanks to Robert Millan (Closes: #634774) + * [1f15f52e] Add sentinel to PyGetSetDef imagescanner_getset[]. + Ensure that the loop is terminated which reads the + imagescanner_getset[] array on import - otherwise we'll run into + a segfault, at least on arm. + Thanks to Anton Gladky and Peter Green (Closes: #702499) + + -- Bernd Zeimetz Sun, 17 Mar 2013 22:46:47 +0100 + +zbar (0.10+doc-7) unstable; urgency=low + + * [48425c37] Ack'ing NMU. + Thanks to Mehdi Dogguy (Closes: #625584) + * [ce18efe2] Don't install .la files. (Closes: #633271) + + -- Bernd Zeimetz Sun, 10 Jul 2011 14:17:11 +0200 + +zbar (0.10+doc-6.1) unstable; urgency=high + + * Non-maintainer upload. + * libzbar-dev depend on libmagick++-dev instead of libmagick++9-dev. + (Closes: #625584). + + -- Mehdi Dogguy Sun, 26 Jun 2011 15:04:36 +0200 + +zbar (0.10+doc-6) unstable; urgency=low + + * [3b98a217] Require v4l as build-dependency on linux only. + * [5f635649] Migrate to dh_python2 instead of python-support. + + -- Bernd Zeimetz Wed, 27 Apr 2011 22:34:12 +0200 + +zbar (0.10+doc-5) unstable; urgency=low + + * [2801e55f] Use the new dh_authtoolsdev-* helper to update config.* + * [906f5a10] Use dh-autoreconf to rebuild configure and friends. + Thanks to Peter Fritzsche (Closes: #558539) + * [a3042424] Use quilt to apply patches. + * [35182c3a] Description: Linux 2.6.38 and later do not support the v4l1 API. + Add patch to migrate to using the libv4l library to abstract the + access to Linux video devices, instead. + Patch taken from the upstream bug tracker. + Also add libv4l-dev as build-dependency. + Thanks to Steve Langasek (Closes: #620220) + * [425b9ce6] Fixing typo in the long description of python-zbar. + Thanks to Davide Prina (Closes: #617942) + + -- Bernd Zeimetz Fri, 01 Apr 2011 01:05:18 +0200 + +zbar (0.10+doc-4) unstable; urgency=low + + * [abdd6f9f] Use better dependencies for zbar-dbg. + * [5c639854] Remove conflicts of libzbar-dev. libzbar replaced zebra + in directory names by zbar, so clashes with quagga and libpacklib1- + dev are avoided. So there is no need to conflict against the + packages anymore. + * [75f615f2] Use Breaks instead of Conflicts as suggested by lintian. + + -- Bernd Zeimetz Sat, 28 Aug 2010 15:01:46 +0200 + +zbar (0.10+doc-3) unstable; urgency=low + + * [6b190c39] Enable VfL only on Linux instead of excluding kfreebsd + only. (Closes: #585082) - thanks to Samuel Thibault + * [da42c117] Update libzbarqt0 symbol files to newer dpkg-dev + features. As symbols seem to appear/disappear depending on the + version of QT and/or the compiler, I've relaxed the check for + changed symbols to stop complaining at all for libzbarqt0. I'll + update the symbols files manually when needed. (Closes: #584773) - + thanks to Loïc Minier + * [94ac49b6] Add missing dependency to the perl/Makefile target in + debian/rules. This should allow to build with -j again. (Closes: + #584758) - thanks to Loïc Minier + + -- Bernd Zeimetz Wed, 09 Jun 2010 17:08:07 +0200 + +zbar (0.10+doc-2build1) maverick; urgency=low + + * Release for Ubuntu. 0.10+doc-2 FTBFS there due to default LDFLAGS + which were passed on to Perl's MakeMaker. + * [b0066775] Fix spelling error in changelog. Thanks lintian. + * [6ddbfe0d] Ensure only -L options are passed as LIBS to Perl's + MakeMaker. + + -- Bernd Zeimetz Tue, 25 May 2010 22:25:18 +0200 + +zbar (0.10+doc-2) unstable; urgency=low + + * [1806e6cd] Copy libzbarqt0.symbols for each architecture. + * [8d172f95] Disable video support on kfreebsd. + * [63b87cf4] Don't list binaries for zbar-tools explicitly. zbarvideo + is not being built on kfreebsd, so we should not try to install it + there. + * [14e36c30] Don't rename debug extensions if they were renamed + already. + * [650fa88e] Fix libzbarqt0.symbols for various architectures - thanks + C++. + + -- Bernd Zeimetz Tue, 25 May 2010 17:37:52 +0200 + +zbar (0.10+doc-1) unstable; urgency=low + + * Import full upstream source including the doc folder and drop + the dfsg part in the version (using +doc now as we need a version + greater than 0.10+dfsg. See the changelog below and debian/copyright + for details + + * [1f9232b1] Add missing dependencies to libzbar-dev. + * [577bae53] Tidy .docs files - one debian/docs is enough. + * [b77a29e5] Python-related packages: Fix dependencies and build + python-zbar. + * [6a336b40] Adopt package (Closes: #543881) + * [d3e7838d] gbp.conf: Remove filter option for git-import-orig. + Upstream clarified the license for the doc folder, the documentation + is (and was) under the same license as the rest of the zbar project. + The former package maintainer just did not bother to ask. + (http://zbar.hg.sourceforge.net/hgweb/zbar/zbar/rev/a400dd46fb4a) + * [d9f0f3bd] Remove quilt - no patches necessary anymore. + * [8e9b2f81] Adding watch file. + * [ddfdb3db] Merge commit 'upstream/0.10+doc' + * [4c547f3a] Build zbar for all supported Python versions. Also build + debug extensions. + * [c6dbc26d] Ensure proper sonames while installing libraries. + * [74e55643] Update supported codes in descriptions. + * [54969382] Install README file into docs. + * [3d97e382] Updating copyright file. + * [71bfc1fe] Install manpages for zbar-tools. + * [9de7a34a] Remove --fail-missing from dh_install call. + * [39a37679] Add symbol files for libraries. + * [418ee09b] Be paranoid about symbol files - pass -c4 to dpkg- + gensymbols. + * [a1527ed7] Use -L to link against previously built libs. + * [c672ecc8] Don't include symbols, which are removed by strip, in + symbols file. + * [9b93453e] Build Perl bindings into libbarcode-zbar-perl. + * [76b32218] According to lintian zbar-dbg needs to Depend on all + packages. + * [2cb6d478] python-zbar needs to conflict/replace older versions of + python-zbarpygtk. + * [bca1a7dc] Better wording for short description. + * [4f6fdf16] Ensure perl bindings are built without rpath. + * [df98e89f] Add missing dh_perl call. + * [18539f50] Add comment about licenses of doc/* to debian/copyright. + * [2bb4fb29] zbar-dbg needs to depend on python-gtk2-dbg. + * [3da1a01e] Add VCS information. + + -- Bernd Zeimetz Tue, 25 May 2010 02:09:41 +0200 + +zbar (0.10+dfsg-1) unstable; urgency=low + + * QA Upload. + + I might adopt the package later, but for now an update to the + latest upstream version is more important. Also I do not want to + set myself as maintainer without bringing the packaging into + a good shape. + + * [154213cf] Adding git-buildpackage config. + * [c89b1ccb] Merge commit 'upstream/0.10+dfsg' + * [5565931e] Adding debian/source/format, format 1.0. + * [9080fcb7] Updating patch. + + -- Bernd Zeimetz Thu, 20 May 2010 01:58:52 +0200 + +zbar (0.8+dfsg-4) unstable; urgency=low + + * QA upload. + * Build-depend on python-support and call dh_pysupport in debian/rules + to allow byte-compilation (Closes: #571484). + * Bump Standards-Version to 3.8.4, no changes required. + * Add ${misc:Depends} dependency where needed. + * Remove duplicate section fields from some binary packages. + * Really remove Vcs-* fields. + + -- Luca Falavigna Sun, 28 Feb 2010 15:59:51 +0100 + +zbar (0.8+dfsg-3) unstable; urgency=low + + * Updating package to standards version 3.8.3. + * Removing vcs fields. + * Orphaning package. + + -- Daniel Baumann Thu, 27 Aug 2009 10:04:11 +0200 + +zbar (0.8+dfsg-2) unstable; urgency=low + + * Correcting spelling of Qt in package descriptions (Closes: #534426). + + -- Daniel Baumann Sun, 26 Jul 2009 21:03:26 +0200 + +zbar (0.8+dfsg-1) unstable; urgency=low + + * Merging upstream version 0.8+dfsg. + * Updating dfsg.patch. + * Updating package to standards version 3.8.2. + * Updating year in copyright file. + + -- Daniel Baumann Tue, 07 Jul 2009 16:17:32 +0200 + +zbar (0.7+dfsg-1) unstable; urgency=low + + * Merging upstream version 0.7+dfsg. + * Adding upstream target in rules file. + * Adding patch to ignore stripped out documentation during build. + * Renaming binary and source package from zebra to zbar to match + upstream. + * Removing manpages from zbar-tools debhelper install file, manpages + are stripped out in dfsg tarball. + * Updating section of the debug package. + * Using correct rfc-2822 date formats in changelog. + + -- Daniel Baumann Sun, 17 May 2009 12:50:49 +0200 + +zebra (0.7-1) unstable; urgency=low + + * Merging upstream version 0.7. + * Updating debhelper install files to cope with upstreams zebra to zbar + rename. + + -- Daniel Baumann Sun, 26 Apr 2009 16:43:00 +0200 + +zebra (0.6-1) unstable; urgency=low + + * Updating imagemagick build-depends. + * Updating standards to 3.8.1. + * Merging upstream version 0.6. + * Unsetting LDFLAGS (which are exported to the environment by newer dpkg), + otherwise python modules fail to build. + * Tidy rules file. + * Updating year in copyright file. + + -- Daniel Baumann Sun, 26 Apr 2009 16:30:00 +0200 + +zebra (0.5+debian-4) unstable; urgency=low + + * Sorting config.guess/config.sub handling in rules. + * Passing flags to configure as arguments. + * Removing unnecessary passing of sourcedir to dh_install. + + -- Daniel Baumann Wed, 17 Dec 2008 21:21:00 +0100 + +zebra (0.5+debian-3) unstable; urgency=low + + * Replacing obsolete dh_clean -k with dh_prep. + * Adding conflicts against quagga to avoid /usr/lib/libzebra.a clash + (Closes: #505268). + + -- Daniel Baumann Tue, 11 Nov 2008 12:07:00 +0100 + +zebra (0.5+debian-2) unstable; urgency=low + + * Adding conflicts against libpacklib1-dev to avoid + /usr/include/zebra.h clash, unlikely that there is another solution + possible (Closes: #504526). + + -- Daniel Baumann Tue, 04 Nov 2008 21:07:00 +0100 + +zebra (0.5+debian-1) unstable; urgency=low + + * Initial release (Closes: #502992). + * Rebuild upstream tarball without debian directory. + + -- Daniel Baumann Thu, 23 Oct 2008 12:29:00 +0200 --- zbar-0.10+doc.orig/debian/compat +++ zbar-0.10+doc/debian/compat @@ -0,0 +1 @@ +7 --- zbar-0.10+doc.orig/debian/control +++ zbar-0.10+doc/debian/control @@ -0,0 +1,147 @@ +Source: zbar +Section: libs +Priority: optional +Maintainer: Bernd Zeimetz +Build-Depends: debhelper (>= 7), autotools-dev (>= 20100122.1~), libgtk2.0-dev, libmagick++-dev, libqt4-dev, libx11-dev, pkg-config, python-all-dev (>= 2.6.6-3~), python-all-dbg (>= 2.6.6-3~), python-gtk2-dev, perl, dpkg-dev (>= 1.15.6), dh-autoreconf, quilt (>= 0.46-7~), libv4l-dev [linux-any] +Standards-Version: 3.8.4 +Homepage: http://zbar.sourceforge.net/ +XS-Python-Version: >= 2.4 +Vcs-Git: git://git.recluse.de/debian/pkg-zbar.git +Vcs-Browser: http://git.recluse.de/?p=debian/pkg-zbar.git;a=summary + +Package: zbar-tools +Section: graphics +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libzbar0 (= ${binary:Version}) +Description: bar code scanner and decoder (utilities) + ZBar is a library for scanning and decoding bar codes from various sources + such as video streams, image files or raw intensity sensors. It supports + EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code. + . + This package contains basic applications for decoding captured bar code images + and using a video4linux device (e.g. webcam) as a bar code scanner. + +Package: zbar-dbg +Priority: extra +Section: debug +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, + zbar-tools (= ${binary:Version}) | + libzbar0 (= ${binary:Version}) | + libzbar-dev (= ${binary:Version}) | + python-zbarpygtk (= ${binary:Version}) | + python-zbar (= ${binary:Version}) | + libzbargtk0 (= ${binary:Version}) | + libzbargtk-dev (= ${binary:Version}) | + libzbarqt0 (= ${binary:Version}) | + libzbarqt-dev (= ${binary:Version}) | + libbarcode-zbar-perl (= ${binary:Version}) +Recommends: python-gtk2-dbg +Description: bar code scanner and decoder (debug) + ZBar is a library for scanning and decoding bar codes from various sources + such as video streams, image files or raw intensity sensors. It supports + EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code. + . + This package contains the debugging symbols and Python debug extensions. + +Package: libzbar0 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: bar code scanner and decoder (library) + ZBar is a library for scanning and decoding bar codes from various sources + such as video streams, image files or raw intensity sensors. It supports + EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code. + . + This package contains the library. + +Package: libzbar-dev +Section: libdevel +Architecture: any +Depends: libzbar0 (= ${binary:Version}), ${misc:Depends}, libmagick++-dev, libx11-dev +Description: bar code scanner and decoder (development) + ZBar is a library for scanning and decoding bar codes from various sources + such as video streams, image files or raw intensity sensors. It supports + EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code. + . + This package contains the development files. + +Package: python-zbar +Section: python +Architecture: any +Replaces: python-zbarpygtk (<< 0.10+doc) +Breaks: python-zbarpygtk (<< 0.10+doc) +Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, + libzbar0 (= ${binary:Version}) +Description: bar code scanner and decoder (Python bindings) + ZBar is a library for scanning and decoding bar codes from various sources + such as video streams, image files or raw intensity sensors. It supports + EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code. + . + This package contains the Python bindings. + +Package: python-zbarpygtk +Section: python +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, + libzbar0 (= ${binary:Version}), python-gtk2 +Description: bar code scanner and decoder (PyGTK bindings) + ZBar is a library for scanning and decoding bar codes from various sources + such as video streams, image files or raw intensity sensors. It supports + EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code. + . + This packagein contains the PyGTK bindings. + +Package: libzbargtk0 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libzbar0 (= ${binary:Version}) +Description: bar code scanner and decoder (GTK+ bindings) + ZBar is a library for scanning and decoding bar codes from various sources + such as video streams, image files or raw intensity sensors. It supports + EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code. + . + This package contains the GTK+ bindings. + +Package: libzbargtk-dev +Section: libdevel +Architecture: any +Depends: libzbargtk0 (= ${binary:Version}), ${misc:Depends}, libgtk2.0-dev, + libzbar-dev (= ${binary:Version}) +Description: bar code scanner and decoder (GTK+ bindings development) + ZBar is a library for scanning and decoding bar codes from various sources + such as video streams, image files or raw intensity sensors. It supports + EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code. + . + This package contains the development files for the GTK+ bindings. + +Package: libzbarqt0 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libzbar0 (= ${binary:Version}) +Description: bar code scanner and decoder (Qt bindings) + ZBar is a library for scanning and decoding bar codes from various sources + such as video streams, image files or raw intensity sensors. It supports + EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code. + . + This package contains the Qt bindings. + +Package: libzbarqt-dev +Section: libdevel +Architecture: any +Depends: libzbarqt0 (= ${binary:Version}), ${misc:Depends}, libqt4-dev, + libzbar-dev (= ${binary:Version}) +Description: bar code scanner and decoder (Qt bindings development) + ZBar is a library for scanning and decoding bar codes from various sources + such as video streams, image files or raw intensity sensors. It supports + EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code. + . + This package contains the development files for the Qt bindings. + +Package: libbarcode-zbar-perl +Section: perl +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends} +Description: bar code scanner and decoder (Perl bindings) + ZBar is a library for scanning and decoding bar codes from various sources + such as video streams, image files or raw intensity sensors. It supports + EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code. + . + This packagein contains the Perl bindings. --- zbar-0.10+doc.orig/debian/copyright +++ zbar-0.10+doc/debian/copyright @@ -0,0 +1,57 @@ +This work was originally packaged for Debian by Daniel Baumann + and is now maintained by Bernd Zeimetz + +It was downloaded from: + http://zbar.sourceforge.net/ + +Below follows the copyrigt and license information as +provided in the file COPYING + + The ZBar Bar Code Reader is Copyright (C) 2007-2009 Jeff Brown + + The QR Code reader is Copyright (C) 1999-2009 Timothy B. Terriberry + + + You can redistribute this library and/or modify it under the terms of the GNU + Lesser General Public License as published by the Free Software Foundation; + either version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along + with this library; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + ISAAC is based on the public domain implementation by Robert J. Jenkins Jr., + and is itself public domain. + + Portions of the bit stream reader are copyright (C) The Xiph.Org Foundation + 1994-2008, and are licensed under a BSD-style license. + + The Reed-Solomon decoder is derived from an implementation (C) 1991-1995 Henry + Minsky (hqm@ua.com, hqm@ai.mit.edu), and is licensed under the LGPL with + permission. + + + +The debian packaging is + Copyright (C) 2008-2009 Daniel Baumann + Copyright (C) 2010 Bernd Zeimetz +and licensed under the same license as zbar; you can redistribute +it and/or modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +On Debian systems, the complete text of the GNU Library General Public License +can be found in /usr/share/common-licenses/LGPL-2.1 file. + + +The hints about GFDL and invariant documentations, which were forgotton in +the doc folder, were fixed by upstream, see the following URLs for details: +https://sourceforge.net/tracker/?func=detail&aid=3004411&group_id=189236&atid=928515 +http://zbar.hg.sourceforge.net/hgweb/zbar/zbar/rev/a400dd46fb4a +http://zbar.hg.sourceforge.net/hgweb/zbar/zbar/rev/41ea3fade9e1 + --- zbar-0.10+doc.orig/debian/docs +++ zbar-0.10+doc/debian/docs @@ -0,0 +1,4 @@ +NEWS +HACKING +TODO +README --- zbar-0.10+doc.orig/debian/gbp.conf +++ zbar-0.10+doc/debian/gbp.conf @@ -0,0 +1,28 @@ +# Configuration file for git-buildpackage and friends + +[DEFAULT] +# the default branch for upstream sources: +upstream-branch = upstream +# the default branch for the debian patch: +debian-branch = master +# the default tag formats used: +upstream-tag = upstream/%(version)s +debian-tag = debian/%(version)s +# use pristine-tar: +pristine-tar = True + +# Options only affecting git-buildpackage +[git-buildpackage] +# uncomment this to automatically GPG sign tags +sign-tags = True +# push to a remote repository after a successful tag: +posttag = git push && git push --tags +# use this for more svn-buildpackage like behaviour: +export-dir = ../build-area/ +tarball-dir = ../tarballs/ +#ignore-new = True + +# Options only affecting git-import-orig +[git-import-orig] +postimport = git-dch -N%(version)s -S -a --debian-branch=$GBP_BRANCH + --- zbar-0.10+doc.orig/debian/libbarcode-zbar-perl.examples +++ zbar-0.10+doc/debian/libbarcode-zbar-perl.examples @@ -0,0 +1 @@ +perl/examples/* --- zbar-0.10+doc.orig/debian/libzbar-dev.install +++ zbar-0.10+doc/debian/libzbar-dev.install @@ -0,0 +1,13 @@ +/usr/include/zbar.h +/usr/include/zbar/Decoder.h +/usr/include/zbar/Exception.h +/usr/include/zbar/Image.h +/usr/include/zbar/ImageScanner.h +/usr/include/zbar/Processor.h +/usr/include/zbar/Scanner.h +/usr/include/zbar/Symbol.h +/usr/include/zbar/Video.h +/usr/include/zbar/Window.h +/usr/lib/libzbar.a +/usr/lib/libzbar.so +/usr/lib/pkgconfig/zbar.pc --- zbar-0.10+doc.orig/debian/libzbar0.install +++ zbar-0.10+doc/debian/libzbar0.install @@ -0,0 +1 @@ +/usr/lib/libzbar.so.* --- zbar-0.10+doc.orig/debian/libzbar0.symbols +++ zbar-0.10+doc/debian/libzbar0.symbols @@ -0,0 +1,121 @@ +libzbar.so.0 libzbar0 #MINVER# + _zbar_error_spew@Base 0.10 + _zbar_error_string@Base 0.10 + _zbar_get_error_code@Base 0.10 + zbar_decode_width@Base 0.10 + zbar_decoder_create@Base 0.10 + zbar_decoder_destroy@Base 0.10 + zbar_decoder_get_color@Base 0.10 + zbar_decoder_get_data@Base 0.10 + zbar_decoder_get_data_length@Base 0.10 + zbar_decoder_get_type@Base 0.10 + zbar_decoder_get_userdata@Base 0.10 + zbar_decoder_new_scan@Base 0.10 + zbar_decoder_reset@Base 0.10 + zbar_decoder_set_config@Base 0.10 + zbar_decoder_set_handler@Base 0.10 + zbar_decoder_set_userdata@Base 0.10 + zbar_get_addon_name@Base 0.10 + zbar_get_symbol_name@Base 0.10 + zbar_image_convert@Base 0.10 + zbar_image_convert_resize@Base 0.10 + zbar_image_copy@Base 0.10 + zbar_image_create@Base 0.10 + zbar_image_destroy@Base 0.10 + zbar_image_first_symbol@Base 0.10 + zbar_image_free_data@Base 0.10 + zbar_image_get_data@Base 0.10 + zbar_image_get_data_length@Base 0.10 + zbar_image_get_format@Base 0.10 + zbar_image_get_height@Base 0.10 + zbar_image_get_sequence@Base 0.10 + zbar_image_get_symbols@Base 0.10 + zbar_image_get_userdata@Base 0.10 + zbar_image_get_width@Base 0.10 + zbar_image_ref@Base 0.10 + zbar_image_scanner_create@Base 0.10 + zbar_image_scanner_destroy@Base 0.10 + zbar_image_scanner_enable_cache@Base 0.10 + zbar_image_scanner_get_results@Base 0.10 + zbar_image_scanner_recycle_image@Base 0.10 + zbar_image_scanner_set_config@Base 0.10 + zbar_image_scanner_set_data_handler@Base 0.10 + zbar_image_set_data@Base 0.10 + zbar_image_set_format@Base 0.10 + zbar_image_set_sequence@Base 0.10 + zbar_image_set_size@Base 0.10 + zbar_image_set_symbols@Base 0.10 + zbar_image_set_userdata@Base 0.10 + zbar_image_write@Base 0.10 + zbar_increase_verbosity@Base 0.10 + zbar_jpeg_error@Base 0.10 + zbar_negotiate_format@Base 0.10 + zbar_parse_config@Base 0.10 + zbar_process_image@Base 0.10 + zbar_process_one@Base 0.10 + zbar_processor_create@Base 0.10 + zbar_processor_destroy@Base 0.10 + zbar_processor_force_format@Base 0.10 + zbar_processor_get_results@Base 0.10 + zbar_processor_get_userdata@Base 0.10 + zbar_processor_init@Base 0.10 + zbar_processor_is_visible@Base 0.10 + zbar_processor_request_interface@Base 0.10 + zbar_processor_request_iomode@Base 0.10 + zbar_processor_request_size@Base 0.10 + zbar_processor_set_active@Base 0.10 + zbar_processor_set_config@Base 0.10 + zbar_processor_set_data_handler@Base 0.10 + zbar_processor_set_userdata@Base 0.10 + zbar_processor_set_visible@Base 0.10 + zbar_processor_user_wait@Base 0.10 + zbar_scan_image@Base 0.10 + zbar_scan_y@Base 0.10 + zbar_scanner_create@Base 0.10 + zbar_scanner_destroy@Base 0.10 + zbar_scanner_flush@Base 0.10 + zbar_scanner_get_color@Base 0.10 + zbar_scanner_get_edge@Base 0.10 + zbar_scanner_get_state@Base 0.10 + zbar_scanner_get_width@Base 0.10 + zbar_scanner_new_scan@Base 0.10 + zbar_scanner_reset@Base 0.10 + zbar_set_verbosity@Base 0.10 + zbar_symbol_first_component@Base 0.10 + zbar_symbol_get_components@Base 0.10 + zbar_symbol_get_count@Base 0.10 + zbar_symbol_get_data@Base 0.10 + zbar_symbol_get_data_length@Base 0.10 + zbar_symbol_get_loc_size@Base 0.10 + zbar_symbol_get_loc_x@Base 0.10 + zbar_symbol_get_loc_y@Base 0.10 + zbar_symbol_get_quality@Base 0.10 + zbar_symbol_get_type@Base 0.10 + zbar_symbol_next@Base 0.10 + zbar_symbol_ref@Base 0.10 + zbar_symbol_set_first_symbol@Base 0.10 + zbar_symbol_set_get_size@Base 0.10 + zbar_symbol_set_ref@Base 0.10 + zbar_symbol_xml@Base 0.10 + zbar_version@Base 0.10 + zbar_video_create@Base 0.10 + zbar_video_destroy@Base 0.10 + zbar_video_enable@Base 0.10 + zbar_video_get_fd@Base 0.10 + zbar_video_get_format@Base 0.10 + zbar_video_get_height@Base 0.10 + zbar_video_get_width@Base 0.10 + zbar_video_init@Base 0.10 + zbar_video_next_image@Base 0.10 + zbar_video_open@Base 0.10 + zbar_video_request_interface@Base 0.10 + zbar_video_request_iomode@Base 0.10 + zbar_video_request_size@Base 0.10 + zbar_window_attach@Base 0.10 + zbar_window_create@Base 0.10 + zbar_window_destroy@Base 0.10 + zbar_window_draw@Base 0.10 + zbar_window_get_overlay@Base 0.10 + zbar_window_redraw@Base 0.10 + zbar_window_resize@Base 0.10 + zbar_window_set_overlay@Base 0.10 --- zbar-0.10+doc.orig/debian/libzbargtk-dev.install +++ zbar-0.10+doc/debian/libzbargtk-dev.install @@ -0,0 +1,4 @@ +/usr/include/zbar/zbargtk.h +/usr/lib/libzbargtk.a +/usr/lib/libzbargtk.so +/usr/lib/pkgconfig/zbar-gtk.pc --- zbar-0.10+doc.orig/debian/libzbargtk0.install +++ zbar-0.10+doc/debian/libzbargtk0.install @@ -0,0 +1,2 @@ +/usr/lib/libzbargtk.so.0.* +/usr/lib/libzbargtk.so.0 --- zbar-0.10+doc.orig/debian/libzbargtk0.symbols +++ zbar-0.10+doc/debian/libzbargtk0.symbols @@ -0,0 +1,11 @@ +libzbargtk.so.0 libzbargtk0 #MINVER# + zbar_gtk_get_type@Base 0.10 + zbar_gtk_get_video_device@Base 0.10 + zbar_gtk_get_video_enabled@Base 0.10 + zbar_gtk_get_video_opened@Base 0.10 + zbar_gtk_image_from_pixbuf@Base 0.10 + zbar_gtk_new@Base 0.10 + zbar_gtk_release_pixbuf@Base 0.10 + zbar_gtk_scan_image@Base 0.10 + zbar_gtk_set_video_device@Base 0.10 + zbar_gtk_set_video_enabled@Base 0.10 --- zbar-0.10+doc.orig/debian/libzbarqt-dev.install +++ zbar-0.10+doc/debian/libzbarqt-dev.install @@ -0,0 +1,4 @@ +/usr/include/zbar/QZBar*.h +/usr/lib/libzbarqt.a +/usr/lib/libzbarqt.so +/usr/lib/pkgconfig/zbar-qt.pc --- zbar-0.10+doc.orig/debian/libzbarqt0.install +++ zbar-0.10+doc/debian/libzbarqt0.install @@ -0,0 +1,2 @@ +/usr/lib/libzbarqt.so.0 +/usr/lib/libzbarqt.so.0.* --- zbar-0.10+doc.orig/debian/libzbarqt0.symbols +++ zbar-0.10+doc/debian/libzbarqt0.symbols @@ -0,0 +1,149 @@ +libzbarqt.so.0 libzbarqt0 #MINVER# + (c++)"QList::~QList()@Base" 0.10 + (c++)"QMutexLocker::~QMutexLocker()@Base" 0.10 + (c++)"QString::~QString()@Base" 0.10 + (c++)"non-virtual thunk to zbar::QZBarThread::image_callback(zbar::Image&)@Base" 0.10 + (c++)"non-virtual thunk to zbar::QZBarThread::~QZBarThread()@Base" 0.10 + (c++)"non-virtual thunk to zbar::QZBarThread::~QZBarThread()@Base" 0.10 + (c++)"non-virtual thunk to zbar::QZBar::~QZBar()@Base" 0.10 + (c++)"non-virtual thunk to zbar::QZBar::~QZBar()@Base" 0.10 + (c++)"non-virtual thunk to zbar::QZBar::paintEngine() const@Base" 0.10 + (c++)"typeinfo for zbar::BusyError@Base" 0.10 + (c++)"typeinfo for zbar::ClosedError@Base" 0.10 + (c++)"typeinfo for zbar::Exception@Base" 0.10 + (c++)"typeinfo for zbar::FormatError@Base" 0.10 + (c++)"typeinfo for zbar::Image::Handler@Base" 0.10 + (c++)"typeinfo for zbar::InternalError@Base" 0.10 + (c++)"typeinfo for zbar::InvalidError@Base" 0.10 + (c++)"typeinfo for zbar::LockingError@Base" 0.10 + (c++)"typeinfo for zbar::QZBar@Base" 0.10 + (c++)"typeinfo for zbar::QZBarThread@Base" 0.10 + (c++)"typeinfo for zbar::QZBarThread::ScanImageEvent@Base" 0.10 + (c++)"typeinfo for zbar::QZBarThread::VideoDeviceEvent@Base" 0.10 + (c++)"typeinfo for zbar::QZBarThread::VideoEnabledEvent@Base" 0.10 + (c++)"typeinfo for zbar::SystemError@Base" 0.10 + (c++)"typeinfo for zbar::UnsupportedError@Base" 0.10 + (c++)"typeinfo for zbar::XDisplayError@Base" 0.10 + (c++)"typeinfo for zbar::XProtoError@Base" 0.10 + (c++)"typeinfo name for zbar::BusyError@Base" 0.10 + (c++)"typeinfo name for zbar::ClosedError@Base" 0.10 + (c++)"typeinfo name for zbar::Exception@Base" 0.10 + (c++)"typeinfo name for zbar::FormatError@Base" 0.10 + (c++)"typeinfo name for zbar::Image::Handler@Base" 0.10 + (c++)"typeinfo name for zbar::InternalError@Base" 0.10 + (c++)"typeinfo name for zbar::InvalidError@Base" 0.10 + (c++)"typeinfo name for zbar::LockingError@Base" 0.10 + (c++)"typeinfo name for zbar::QZBar@Base" 0.10 + (c++)"typeinfo name for zbar::QZBarThread@Base" 0.10 + (c++)"typeinfo name for zbar::QZBarThread::ScanImageEvent@Base" 0.10 + (c++)"typeinfo name for zbar::QZBarThread::VideoDeviceEvent@Base" 0.10 + (c++)"typeinfo name for zbar::QZBarThread::VideoEnabledEvent@Base" 0.10 + (c++)"typeinfo name for zbar::SystemError@Base" 0.10 + (c++)"typeinfo name for zbar::UnsupportedError@Base" 0.10 + (c++)"typeinfo name for zbar::XDisplayError@Base" 0.10 + (c++)"typeinfo name for zbar::XProtoError@Base" 0.10 + (c++)"vtable for zbar::BusyError@Base" 0.10 + (c++)"vtable for zbar::ClosedError@Base" 0.10 + (c++)"vtable for zbar::Exception@Base" 0.10 + (c++)"vtable for zbar::FormatError@Base" 0.10 + (c++)"vtable for zbar::Image::Handler@Base" 0.10 + (c++)"vtable for zbar::InternalError@Base" 0.10 + (c++)"vtable for zbar::InvalidError@Base" 0.10 + (c++)"vtable for zbar::LockingError@Base" 0.10 + (c++)"vtable for zbar::QZBar@Base" 0.10 + (c++)"vtable for zbar::QZBarThread@Base" 0.10 + (c++)"vtable for zbar::QZBarThread::ScanImageEvent@Base" 0.10 + (c++)"vtable for zbar::QZBarThread::VideoDeviceEvent@Base" 0.10 + (c++)"vtable for zbar::QZBarThread::VideoEnabledEvent@Base" 0.10 + (c++)"vtable for zbar::SystemError@Base" 0.10 + (c++)"vtable for zbar::UnsupportedError@Base" 0.10 + (c++)"vtable for zbar::XDisplayError@Base" 0.10 + (c++)"vtable for zbar::XProtoError@Base" 0.10 + (c++)"zbar::BusyError::~BusyError()@Base" 0.10 + (c++)"zbar::BusyError::~BusyError()@Base" 0.10 + (c++)"zbar::ClosedError::~ClosedError()@Base" 0.10 + (c++)"zbar::ClosedError::~ClosedError()@Base" 0.10 + (c++)"zbar::Exception::~Exception()@Base" 0.10 + (c++)"zbar::Exception::~Exception()@Base" 0.10 + (c++)"zbar::Exception::what() const@Base" 0.10 + (c++)"zbar::FormatError::~FormatError()@Base" 0.10 + (c++)"zbar::FormatError::~FormatError()@Base" 0.10 + (c++)"zbar::FormatError::what() const@Base" 0.10 + (c++)"zbar::Image::_cleanup(zbar::zbar_image_s*)@Base" 0.10 + (c++)"zbar::Image::Handler::_cb(zbar::zbar_image_s*, void const*)@Base" 0.10 + (c++)"zbar::Image::Handler::~Handler()@Base" 0.10 + (c++)"zbar::Image::Handler::~Handler()@Base" 0.10 + (c++)"zbar::Image::SymbolIterator::~SymbolIterator()@Base" 0.10 + (c++)"zbar::InternalError::~InternalError()@Base" 0.10 + (c++)"zbar::InternalError::~InternalError()@Base" 0.10 + (c++)"zbar::InvalidError::~InvalidError()@Base" 0.10 + (c++)"zbar::InvalidError::~InvalidError()@Base" 0.10 + (c++)"zbar::LockingError::~LockingError()@Base" 0.10 + (c++)"zbar::LockingError::~LockingError()@Base" 0.10 + (c++)"zbar::QZBar::attach()@Base" 0.10 + (c++)"zbar::QZBar::changeEvent(QEvent*)@Base" 0.10 + (c++)"zbar::QZBar::decoded(int, QString const&)@Base" 0.10 + (c++)"zbar::QZBar::decodedText(QString const&)@Base" 0.10 + (c++)"zbar::QZBar::dragEnterEvent(QDragEnterEvent*)@Base" 0.10 + (c++)"zbar::QZBar::dropEvent(QDropEvent*)@Base" 0.10 + (c++)"zbar::QZBar::heightForWidth(int) const@Base" 0.10 + (c++)"zbar::QZBar::isVideoEnabled() const@Base" 0.10 + (c++)"zbar::QZBar::isVideoOpened() const@Base" 0.10 + (c++)"zbar::QZBar::metaObject() const@Base" 0.10 + (c++)"zbar::QZBar::paintEngine() const@Base" 0.10 + (c++)"zbar::QZBar::paintEvent(QPaintEvent*)@Base" 0.10 + (c++)"zbar::QZBar::qt_metacall(QMetaObject::Call, int, void**)@Base" 0.10 + (c++)"zbar::QZBar::qt_metacast(char const*)@Base" 0.10 + (c++)"zbar::QZBar::~QZBar()@Base" 0.10 + (c++)"zbar::QZBar::~QZBar()@Base" 0.10 + (c++)"zbar::QZBar::~QZBar()@Base" 0.10 + (c++)"zbar::QZBar::QZBar(QWidget*)@Base" 0.10 + (c++)"zbar::QZBar::QZBar(QWidget*)@Base" 0.10 + (c++)"zbar::QZBar::resizeEvent(QResizeEvent*)@Base" 0.10 + (c++)"zbar::QZBar::scanImage(QImage const&)@Base" 0.10 + (c++)"zbar::QZBar::setVideoDevice(QString const&)@Base" 0.10 + (c++)"zbar::QZBar::setVideoEnabled(bool)@Base" 0.10 + (c++)"zbar::QZBar::showEvent(QShowEvent*)@Base" 0.10 + (c++)"zbar::QZBar::sizeChange()@Base" 0.10 + (c++)"zbar::QZBar::sizeHint() const@Base" 0.10 + (c++)"zbar::QZBar::staticMetaObject@Base" 0.10 + (c++)"zbar::QZBarThread::clear()@Base" 0.10 + (c++)"zbar::QZBarThread::decoded(int, QString const&)@Base" 0.10 + (c++)"zbar::QZBarThread::decodedText(QString const&)@Base" 0.10 + (c++)"zbar::QZBarThread::enableVideo(bool)@Base" 0.10 + (c++)"zbar::QZBarThread::event(QEvent*)@Base" 0.10 + (c++)"zbar::QZBarThread::image_callback(zbar::Image&)@Base" 0.10 + (c++)"zbar::QZBarThread::metaObject() const@Base" 0.10 + (c++)"zbar::QZBarThread::openVideo(QString const&)@Base" 0.10 + (c++)"zbar::QZBarThread::processImage(zbar::Image&)@Base" 0.10 + (c++)"zbar::QZBarThread::qt_metacall(QMetaObject::Call, int, void**)@Base" 0.10 + (c++)"zbar::QZBarThread::qt_metacast(char const*)@Base" 0.10 + (c++)"zbar::QZBarThread::~QZBarThread()@Base" 0.10 + (c++)"zbar::QZBarThread::~QZBarThread()@Base" 0.10 + (c++)"zbar::QZBarThread::QZBarThread()@Base" 0.10 + (c++)"zbar::QZBarThread::QZBarThread()@Base" 0.10 + (c++)"zbar::QZBarThread::run()@Base" 0.10 + (c++)"zbar::QZBarThread::ScanImageEvent::~ScanImageEvent()@Base" 0.10 + (c++)"zbar::QZBarThread::ScanImageEvent::~ScanImageEvent()@Base" 0.10 + (c++)"zbar::QZBarThread::scanImageEvent(zbar::QZBarThread::ScanImageEvent*)@Base" 0.10 + (c++)"zbar::QZBarThread::staticMetaObject@Base" 0.10 + (c++)"zbar::QZBarThread::update()@Base" 0.10 + (c++)"zbar::QZBarThread::VideoDeviceEvent::~VideoDeviceEvent()@Base" 0.10 + (c++)"zbar::QZBarThread::VideoDeviceEvent::~VideoDeviceEvent()@Base" 0.10 + (c++)"zbar::QZBarThread::videoDeviceEvent(zbar::QZBarThread::VideoDeviceEvent*)@Base" 0.10 + (c++)"zbar::QZBarThread::VideoEnabledEvent::~VideoEnabledEvent()@Base" 0.10 + (c++)"zbar::QZBarThread::VideoEnabledEvent::~VideoEnabledEvent()@Base" 0.10 + (c++)"zbar::QZBarThread::videoEnabledEvent(zbar::QZBarThread::VideoEnabledEvent*)@Base" 0.10 + (c++)"zbar::QZBarThread::videoOpened(bool)@Base" 0.10 + (c++)"zbar::QZBar::videoDevice() const@Base" 0.10 + (c++)"zbar::QZBar::videoOpened(bool)@Base" 0.10 + (c++)"zbar::SymbolSet::~SymbolSet()@Base" 0.10 + (c++)"zbar::Symbol::~Symbol()@Base" 0.10 + (c++)"zbar::SystemError::~SystemError()@Base" 0.10 + (c++)"zbar::SystemError::~SystemError()@Base" 0.10 + (c++)"zbar::UnsupportedError::~UnsupportedError()@Base" 0.10 + (c++)"zbar::UnsupportedError::~UnsupportedError()@Base" 0.10 + (c++)"zbar::XDisplayError::~XDisplayError()@Base" 0.10 + (c++)"zbar::XDisplayError::~XDisplayError()@Base" 0.10 + (c++)"zbar::XProtoError::~XProtoError()@Base" 0.10 + (c++)"zbar::XProtoError::~XProtoError()@Base" 0.10 --- zbar-0.10+doc.orig/debian/patches/0001-Description-Linux-2.6.38-and-later-do-not-support-th.patch +++ zbar-0.10+doc/debian/patches/0001-Description-Linux-2.6.38-and-later-do-not-support-th.patch @@ -0,0 +1,819 @@ +From: Bernd Zeimetz +Date: Fri, 1 Apr 2011 00:44:36 +0200 +Subject: Description: Linux 2.6.38 and later do not support the v4l1 API. + +Migrate to using the libv4l library to abstract our access to Linux video +devices, instead. +Author: Mauro Carvalho Chehab +Bug-Ubuntu: http://bugs.launchpad.net/bugs/724997 +Bug-Debian: http://bugs.debian.org/620220 +Bug: http://sourceforge.net/tracker/?func=detail&aid=3128542&group_id=189236&atid=928517 +--- + configure.ac | 11 +- + include/config.h.in | 13 +- + zbar/Makefile.am.inc | 18 +-- + zbar/video/v4l1.c | 435 ----------------------------------------------- + zbar/video/v4l2.c | 70 +++++--- + zbarcam/Makefile.am.inc | 2 + + 6 files changed, 64 insertions(+), 485 deletions(-) + delete mode 100644 zbar/video/v4l1.c + +diff --git a/configure.ac b/configure.ac +index 56d3dd0..53168c0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -147,20 +147,13 @@ AC_ARG_ENABLE([video], + with_video="no" + AS_IF([test "x$enable_video" != "xno"], + [AS_IF([test "x$win32" = "xno"], +- [AC_CHECK_HEADERS([linux/videodev.h], [with_video="v4l1"], +- [AC_MSG_FAILURE([test for video support failed! +-rebuild your kernel to include video4linux support or +-configure --disable-video to skip building video support.])]) +- AC_CHECK_HEADERS([linux/videodev2.h], [with_video="v4l2"], ++ [AC_CHECK_LIB([v4l2], [v4l2_open], [], + [AC_MSG_WARN([v4l2 API not detected, upgrade your kernel!])])], + [AC_CHECK_HEADERS([vfw.h], [with_video="vfw"], + [AC_MSG_FAILURE([test for VfW video support failed! + configure --disable-video to skip building vidoe support.])])]) + ]) + AM_CONDITIONAL([HAVE_VIDEO], [test "x$enable_video" != "xno"]) +-AM_CONDITIONAL([HAVE_V4L1], +- [test "x$with_video" = "xv4l1" || test "x$with_video" = "xv4l2"]) +-AM_CONDITIONAL([HAVE_V4L2], [test "x$with_video" = "xv4l2"]) + + dnl X + AC_ARG_VAR([XSHM_LIBS], [linker flags for X shared memory extension]) +@@ -442,7 +435,7 @@ echo "please verify that the detected configuration matches your expectations:" + echo "------------------------------------------------------------------------" + echo "X --with-x=$have_x" + echo "pthreads --enable-pthread=$enable_pthread" +-echo "v4l --enable-video=$enable_video" ++echo "v4l2 --enable-video=$enable_video" + AS_IF([test "x$enable_video" != "xyes"], + [echo " => zbarcam video scanner will *NOT* be built"]) + echo "jpeg --with-jpeg=$with_jpeg" +diff --git a/include/config.h.in b/include/config.h.in +index 6950d05..aecc6b7 100644 +--- a/include/config.h.in ++++ b/include/config.h.in +@@ -48,11 +48,8 @@ + /* Define to 1 if you have the `pthread' library (-lpthread). */ + #undef HAVE_LIBPTHREAD + +-/* Define to 1 if you have the header file. */ +-#undef HAVE_LINUX_VIDEODEV2_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_LINUX_VIDEODEV_H ++/* Define to 1 if you have the `v4l2' library (-lv4l2). */ ++#undef HAVE_LIBV4L2 + + /* Define to 1 if you have the header file. */ + #undef HAVE_MEMORY_H +@@ -93,6 +90,9 @@ + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_MMAN_H + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_PARAM_H ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_SHM_H + +@@ -160,6 +160,9 @@ + /* Define to the one symbol short name of this package. */ + #undef PACKAGE_TARNAME + ++/* Define to the home page for this package. */ ++#undef PACKAGE_URL ++ + /* Define to the version of this package. */ + #undef PACKAGE_VERSION + +diff --git a/zbar/Makefile.am.inc b/zbar/Makefile.am.inc +index 8d38484..1a5ce8d 100644 +--- a/zbar/Makefile.am.inc ++++ b/zbar/Makefile.am.inc +@@ -53,21 +53,17 @@ else + zbar_libzbar_la_SOURCES += zbar/processor/posix.h zbar/processor/posix.c + endif + +-if HAVE_V4L1 +-zbar_libzbar_la_SOURCES += zbar/video/v4l1.c +-if HAVE_V4L2 +-zbar_libzbar_la_SOURCES += zbar/video/v4l2.c +-endif +-endif +-if WIN32 + if HAVE_VIDEO ++if WIN32 + zbar_libzbar_la_SOURCES += zbar/video/vfw.c + zbar_libzbar_la_LIBADD += -lvfw32 +-endif +-endif +-if !HAVE_VIDEO ++else ++zbar_libzbar_la_SOURCES += zbar/video/v4l2.c ++zbar_libzbar_la_LDFLAGS += -lv4l2 ++endif #WIN32 ++else + zbar_libzbar_la_SOURCES += zbar/video/null.c +-endif ++endif #HAVE_VIDEO + + if HAVE_JPEG + zbar_libzbar_la_SOURCES += zbar/jpeg.c +diff --git a/zbar/video/v4l1.c b/zbar/video/v4l1.c +deleted file mode 100644 +index 89b1da2..0000000 +--- a/zbar/video/v4l1.c ++++ /dev/null +@@ -1,435 +0,0 @@ +-/*------------------------------------------------------------------------ +- * Copyright 2007-2009 (c) Jeff Brown +- * +- * This file is part of the ZBar Bar Code Reader. +- * +- * The ZBar Bar Code Reader is free software; you can redistribute it +- * and/or modify it under the terms of the GNU Lesser Public License as +- * published by the Free Software Foundation; either version 2.1 of +- * the License, or (at your option) any later version. +- * +- * The ZBar Bar Code Reader is distributed in the hope that it will be +- * useful, but WITHOUT ANY WARRANTY; without even the implied warranty +- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU Lesser Public License for more details. +- * +- * You should have received a copy of the GNU Lesser Public License +- * along with the ZBar Bar Code Reader; if not, write to the Free +- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, +- * Boston, MA 02110-1301 USA +- * +- * http://sourceforge.net/projects/zbar +- *------------------------------------------------------------------------*/ +- +-#include +-#ifdef HAVE_INTTYPES_H +-# include +-#endif +-#ifdef HAVE_STDLIB_H +-# include +-#endif +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#ifdef HAVE_SYS_IOCTL_H +-# include +-#endif +-#ifdef HAVE_SYS_MMAN_H +-# include +-#endif +-#include +- +-#include "video.h" +-#include "image.h" +- +-extern int _zbar_v4l2_probe(zbar_video_t*); +- +-typedef struct v4l1_format_s { +- uint32_t format; +- uint8_t bpp; +-} v4l1_format_t; +- +-/* static v4l1 "palette" mappings +- * documentation for v4l1 formats is terrible... +- */ +-static const v4l1_format_t v4l1_formats[17] = { +- /* format bpp */ +- { 0, 0 }, +- { fourcc('G','R','E','Y'), 8 }, /* GREY */ +- { fourcc('H','I','2','4'), 8 }, /* HI240 (BT848) */ +- +- /* component ordering for RGB palettes is unspecified, +- * convention appears to place red in the most significant bits +- * FIXME is this true for other drivers? big endian machines? +- */ +- { fourcc('R','G','B','P'), 16 }, /* RGB565 */ +- { fourcc('B','G','R','3'), 24 }, /* RGB24 */ +- { fourcc('B','G','R','4'), 32 }, /* RGB32 */ +- { fourcc('R','G','B','O'), 16 }, /* RGB555 */ +- { fourcc('Y','U','Y','2'), 16 }, /* YUV422 (8 bpp?!) */ +- { fourcc('Y','U','Y','V'), 16 }, /* YUYV */ +- { fourcc('U','Y','V','Y'), 16 }, /* UYVY */ +- { 0, 12 }, /* YUV420 (24 bpp?) FIXME?! */ +- { fourcc('Y','4','1','P'), 12 }, /* YUV411 */ +- { 0, 0 }, /* Bt848 raw */ +- { fourcc('4','2','2','P'), 16 }, /* YUV422P (24 bpp?) */ +- { fourcc('4','1','1','P'), 12 }, /* YUV411P */ +- { fourcc('Y','U','1','2'), 12 }, /* YUV420P */ +- { fourcc('Y','U','V','9'), 9 }, /* YUV410P */ +-}; +- +-static int v4l1_nq (zbar_video_t *vdo, +- zbar_image_t *img) +-{ +- if(video_nq_image(vdo, img)) +- return(-1); +- +- if(vdo->iomode != VIDEO_MMAP) +- return(0); +- +- struct video_mmap vmap; +- vmap.frame = img->srcidx; +- vmap.width = vdo->width; +- vmap.height = vdo->height; +- vmap.format = vdo->palette; +- if(ioctl(vdo->fd, VIDIOCMCAPTURE, &vmap) < 0) +- return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, +- "initiating video capture (VIDIOCMCAPTURE)")); +- +- return(0); +-} +- +-static zbar_image_t *v4l1_dq (zbar_video_t *vdo) +-{ +- video_iomode_t iomode = vdo->iomode; +- int fd = vdo->fd; +- zbar_image_t *img = video_dq_image(vdo); +- if(!img) +- return(NULL); +- +- if(iomode == VIDEO_MMAP) { +- int frame = img->srcidx; +- if(ioctl(fd, VIDIOCSYNC, &frame) < 0) +- return(NULL); +- } +- else if(read(fd, (void*)img->data, img->datalen) != img->datalen) +- return(NULL); +- +- return(img); +-} +- +-static int v4l1_mmap_buffers (zbar_video_t *vdo) +-{ +-#ifdef HAVE_SYS_MMAN_H +- /* map camera image to memory */ +- struct video_mbuf vbuf; +- memset(&vbuf, 0, sizeof(vbuf)); +- if(ioctl(vdo->fd, VIDIOCGMBUF, &vbuf) < 0) +- return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, +- "querying video frame buffers (VIDIOCGMBUF)")); +- assert(vbuf.frames && vbuf.size); +- +- zprintf(1, "mapping %d buffers size=0x%x\n", vbuf.frames, vbuf.size); +- vdo->buflen = vbuf.size; +- vdo->buf = mmap(0, vbuf.size, PROT_READ | PROT_WRITE, MAP_SHARED, +- vdo->fd, 0); +- if(vdo->buf == MAP_FAILED) +- return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, +- "mapping video frame buffers")); +- +- int i; +- for(i = 0; i < vbuf.frames; i++) { +- zbar_image_t *img = vdo->images[i]; +- zprintf(2, " [%02d] @%08x\n", img->srcidx, vbuf.offsets[i]); +- img->data = vdo->buf + vbuf.offsets[i]; +- img->datalen = vdo->datalen; +- int next_offset = ((i + 1 < vdo->num_images) +- ? vbuf.offsets[i + 1] +- : vbuf.size); +- if(next_offset < vbuf.offsets[i] + vdo->datalen) +- fprintf(stderr, "WARNING: insufficient v4l1 video buffer size:\n" +- "\tvbuf[%d]=%x vbuf[%d]=%x datalen=%lx\n" +- "\timage=%d x %d %.4s(%08x) palette=%d\n", +- i, vbuf.offsets[i], i + 1, next_offset, +- vdo->datalen, vdo->width, vdo->height, +- (char*)&vdo->format, vdo->format, vdo->palette); +- } +- return(0); +-#else +- return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_UNSUPPORTED, __func__, +- "memory mapping not supported")); +-#endif +-} +- +-static int v4l1_start (zbar_video_t *vdo) +-{ +- return(0); +-} +- +-static int v4l1_stop (zbar_video_t *vdo) +-{ +- return(0); +-} +- +-static inline int v4l1_set_format (zbar_video_t *vdo, +- uint32_t fmt) +-{ +- struct video_picture vpic; +- memset(&vpic, 0, sizeof(vpic)); +- if(ioctl(vdo->fd, VIDIOCGPICT, &vpic) < 0) +- return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, +- "querying video format (VIDIOCGPICT)")); +- +- vdo->palette = 0; +- int ifmt; +- for(ifmt = 1; ifmt <= VIDEO_PALETTE_YUV410P; ifmt++) +- if(v4l1_formats[ifmt].format == fmt) +- break; +- if(!fmt || ifmt >= VIDEO_PALETTE_YUV410P) +- return(err_capture_int(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, +- "invalid v4l1 format: %x", fmt)); +- +- vpic.palette = ifmt; +- vpic.depth = v4l1_formats[ifmt].bpp; +- if(ioctl(vdo->fd, VIDIOCSPICT, &vpic) < 0) +- return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, +- "setting format (VIDIOCSPICT)")); +- +- memset(&vpic, 0, sizeof(vpic)); +- if(ioctl(vdo->fd, VIDIOCGPICT, &vpic) < 0) +- return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, +- "querying video format (VIDIOCGPICT)")); +- +- if(vpic.palette != ifmt || vpic.depth != v4l1_formats[ifmt].bpp) { +- fprintf(stderr, +- "WARNING: set v4l1 palette %d which should have depth %d bpp\n" +- " but probed palette %d with depth %d bpp?" +- " ...continuing anyway\n", +- ifmt, v4l1_formats[ifmt].bpp, vpic.palette, vpic.depth); +- err_capture_int(vdo, SEV_WARNING, ZBAR_ERR_INVALID, __func__, +- "driver format (%x) inconsistency", fmt); +- } +- vdo->format = fmt; +- vdo->palette = ifmt; +- vdo->datalen = (vdo->width * vdo->height * v4l1_formats[ifmt].bpp + 7) >> 3; +- +- zprintf(1, "set new format: %.4s(%08x) depth=%d palette=%d size=0x%lx\n", +- (char*)&vdo->format, vdo->format, vpic.depth, vdo->palette, +- vdo->datalen); +- return(0); +-} +- +-static int v4l1_init (zbar_video_t *vdo, +- uint32_t fmt) +-{ +- if(v4l1_set_format(vdo, fmt)) +- return(-1); +- if(vdo->iomode == VIDEO_MMAP && v4l1_mmap_buffers(vdo)) +- return(-1); +- return(0); +-} +- +-static int v4l1_cleanup (zbar_video_t *vdo) +-{ +-#ifdef HAVE_SYS_MMAN_H +- /* FIXME should avoid holding onto mmap'd buffers so long? */ +- if(vdo->iomode == VIDEO_MMAP && vdo->buf) { +- if(munmap(vdo->buf, vdo->buflen)) +- return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, +- "unmapping video frame buffers")); +- vdo->buf = NULL; +- /* FIXME reset image */ +- } +-#endif +- +- /* close open device */ +- if(vdo->fd >= 0) { +- close(vdo->fd); +- vdo->fd = -1; +- } +- return(0); +-} +- +-static int v4l1_probe_iomode (zbar_video_t *vdo) +-{ +- vdo->iomode = VIDEO_READWRITE; +-#ifdef HAVE_SYS_MMAN_H +- struct video_mbuf vbuf; +- memset(&vbuf, 0, sizeof(vbuf)); +- if(ioctl(vdo->fd, VIDIOCGMBUF, &vbuf) < 0) { +- if(errno != EINVAL) +- return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, +- "querying video frame buffers (VIDIOCGMBUF)")); +- /* not supported */ +- return(0); +- } +- if(!vbuf.frames || !vbuf.size) +- return(0); +- vdo->iomode = VIDEO_MMAP; +- if(vdo->num_images > vbuf.frames) +- vdo->num_images = vbuf.frames; +-#endif +- zprintf(1, "using %d images in %s mode\n", vdo->num_images, +- (vdo->iomode == VIDEO_READWRITE) ? "READ" : "MMAP"); +- return(0); +-} +- +-static inline int v4l1_probe_formats (zbar_video_t *vdo) +-{ +- struct video_picture vpic; +- memset(&vpic, 0, sizeof(vpic)); +- if(ioctl(vdo->fd, VIDIOCGPICT, &vpic) < 0) +- return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, +- "querying format (VIDIOCGPICT)")); +- +- vdo->format = 0; +- if(vpic.palette <= VIDEO_PALETTE_YUV410P) +- vdo->format = v4l1_formats[vpic.palette].format; +- +- zprintf(1, "current format: %.4s(%08x) depth=%d palette=%d\n", +- (char*)&vdo->format, vdo->format, vpic.depth, vpic.palette); +- +- vdo->formats = calloc(16, sizeof(uint32_t)); +- if(!vdo->formats) +- return(err_capture(vdo, SEV_FATAL, ZBAR_ERR_NOMEM, __func__, +- "allocating format list")); +- +- int num_formats = 0; +- zprintf(2, "probing supported formats:\n"); +- int i; +- for(i = 1; i <= VIDEO_PALETTE_YUV410P; i++) { +- if(!v4l1_formats[i].format) +- continue; +- vpic.depth = v4l1_formats[i].bpp; +- vpic.palette = i; +- if(ioctl(vdo->fd, VIDIOCSPICT, &vpic) < 0) { +- zprintf(2, " [%02d] %.4s...no (set fails)\n", +- i, (char*)&v4l1_formats[i].format); +- continue; +- } +- if(ioctl(vdo->fd, VIDIOCGPICT, &vpic) < 0 || +- vpic.palette != i) { +- zprintf(2, " [%02d] %.4s...no (set ignored)\n", +- i, (char*)&v4l1_formats[i].format); +- continue; +- } +- zprintf(2, " [%02d] %.4s...yes\n", +- i, (char*)&v4l1_formats[i].format); +- vdo->formats[num_formats++] = v4l1_formats[i].format; +- } +- vdo->formats = realloc(vdo->formats, (num_formats + 1) * sizeof(uint32_t)); +- assert(vdo->formats); +- +- return(v4l1_set_format(vdo, vdo->format)); +-} +- +-static inline int v4l1_init_window (zbar_video_t *vdo) +-{ +- struct video_window vwin; +- memset(&vwin, 0, sizeof(vwin)); +- if(ioctl(vdo->fd, VIDIOCGWIN, &vwin) < 0) +- return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, +- "querying video window settings (VIDIOCGWIN)")); +- +- zprintf(1, "current window: %d x %d @(%d, %d)%s\n", +- vwin.width, vwin.height, vwin.x, vwin.y, +- (vwin.flags & 1) ? " INTERLACE" : ""); +- +- if(vwin.width == vdo->width && vwin.height == vdo->height) +- /* max window already set */ +- return(0); +- +- struct video_window maxwin; +- memcpy(&maxwin, &vwin, sizeof(maxwin)); +- maxwin.width = vdo->width; +- maxwin.height = vdo->height; +- +- zprintf(1, "setting max win: %d x %d @(%d, %d)%s\n", +- maxwin.width, maxwin.height, maxwin.x, maxwin.y, +- (maxwin.flags & 1) ? " INTERLACE" : ""); +- if(ioctl(vdo->fd, VIDIOCSWIN, &maxwin) < 0) { +- zprintf(1, "set FAILED...trying to recover original window\n"); +- /* ignore errors (driver broken anyway) */ +- ioctl(vdo->fd, VIDIOCSWIN, &vwin); +- } +- +- /* re-query resulting parameters */ +- memset(&vwin, 0, sizeof(vwin)); +- if(ioctl(vdo->fd, VIDIOCGWIN, &vwin) < 0) +- return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, +- "querying video window settings (VIDIOCGWIN)")); +- +- zprintf(1, " final window: %d x %d @(%d, %d)%s\n", +- vwin.width, vwin.height, vwin.x, vwin.y, +- (vwin.flags & 1) ? " INTERLACE" : ""); +- vdo->width = vwin.width; +- vdo->height = vwin.height; +- return(0); +-} +- +-static int _zbar_v4l1_probe (zbar_video_t *vdo) +-{ +- /* check capabilities */ +- struct video_capability vcap; +- memset(&vcap, 0, sizeof(vcap)); +- if(ioctl(vdo->fd, VIDIOCGCAP, &vcap) < 0) +- return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_UNSUPPORTED, __func__, +- "video4linux version 1 not supported (VIDIOCGCAP)")); +- +- zprintf(1, "%s (%sCAPTURE) (%d x %d) - (%d x %d)\n", +- vcap.name, (vcap.type & VID_TYPE_CAPTURE) ? "" : "*NO* ", +- vcap.minwidth, vcap.minheight, vcap.maxwidth, vcap.maxheight); +- +- if(!(vcap.type & VID_TYPE_CAPTURE)) +- return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_UNSUPPORTED, __func__, +- "v4l1 device does not support CAPTURE")); +- +- if(!vdo->width || !vdo->height) { +- vdo->width = vcap.maxwidth; +- vdo->height = vcap.maxheight; +- } +- +- if(v4l1_init_window(vdo) || +- v4l1_probe_formats(vdo) || +- v4l1_probe_iomode(vdo)) +- return(-1); +- +- vdo->intf = VIDEO_V4L1; +- vdo->init = v4l1_init; +- vdo->cleanup = v4l1_cleanup; +- vdo->start = v4l1_start; +- vdo->stop = v4l1_stop; +- vdo->nq = v4l1_nq; +- vdo->dq = v4l1_dq; +- return(0); +-} +- +-int _zbar_video_open (zbar_video_t *vdo, +- const char *dev) +-{ +- vdo->fd = open(dev, O_RDWR); +- if(vdo->fd < 0) +- return(err_capture_str(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, +- "opening video device '%s'", dev)); +- zprintf(1, "opened camera device %s (fd=%d)\n", dev, vdo->fd); +- +- int rc = -1; +-#ifdef HAVE_LINUX_VIDEODEV2_H +- if(vdo->intf != VIDEO_V4L1) +- rc = _zbar_v4l2_probe(vdo); +- if(rc) +-#else +- zprintf(1, "WARNING: not compiled with v4l2 support, trying v4l1\n"); +-#endif +- rc = _zbar_v4l1_probe(vdo); +- +- if(rc && vdo->fd >= 0) { +- close(vdo->fd); +- vdo->fd = -1; +- } +- return(rc); +-} +diff --git a/zbar/video/v4l2.c b/zbar/video/v4l2.c +index ec59bd8..065091e 100644 +--- a/zbar/video/v4l2.c ++++ b/zbar/video/v4l2.c +@@ -38,6 +38,8 @@ + #ifdef HAVE_SYS_MMAN_H + # include + #endif ++#include ++#include + #include + + #include "video.h" +@@ -67,7 +69,7 @@ static int v4l2_nq (zbar_video_t *vdo, + 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 +93,7 @@ static zbar_image_t *v4l2_dq (zbar_video_t *vdo) + 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 +134,7 @@ static int v4l2_start (zbar_video_t *vdo) + 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 +146,7 @@ static int v4l2_stop (zbar_video_t *vdo) + 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 +166,7 @@ static int v4l2_cleanup (zbar_video_t *vdo) + 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,27 +179,27 @@ static int v4l2_cleanup (zbar_video_t *vdo) + /* 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); + } + +-static int v4l2_mmap_buffers (zbar_video_t *vdo) ++static int v4l2_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(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 +218,7 @@ static int v4l2_mmap_buffers (zbar_video_t *vdo) + 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 +231,7 @@ static int v4l2_mmap_buffers (zbar_video_t *vdo) + + 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 +255,7 @@ static int v4l2_set_format (zbar_video_t *vdo, + 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 +266,7 @@ static int v4l2_set_format (zbar_video_t *vdo, + /* 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 +278,7 @@ static int v4l2_set_format (zbar_video_t *vdo, + 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)")); + +@@ -307,7 +309,7 @@ static int v4l2_init (zbar_video_t *vdo, + if(v4l2_set_format(vdo, fmt)) + return(-1); + if(vdo->iomode == VIDEO_MMAP) +- return(v4l2_mmap_buffers(vdo)); ++ return(v4l2_v4l2_mmap_buffers(vdo)); + return(0); + } + +@@ -322,7 +324,7 @@ static int v4l2_probe_iomode (zbar_video_t *vdo) + 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 +352,7 @@ static inline int v4l2_probe_formats (zbar_video_t *vdo) + 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 +370,7 @@ static inline int v4l2_probe_formats (zbar_video_t *vdo) + 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 +392,15 @@ static inline int v4l2_probe_formats (zbar_video_t *vdo) + 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 +422,7 @@ static inline int v4l2_reset_crop (zbar_video_t *vdo) + 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 +444,7 @@ static inline int v4l2_reset_crop (zbar_video_t *vdo) + 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 +455,7 @@ int _zbar_v4l2_probe (zbar_video_t *vdo) + /* 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)")); + +@@ -507,3 +509,21 @@ int _zbar_v4l2_probe (zbar_video_t *vdo) + vdo->dq = v4l2_dq; + return(0); + } ++ ++int _zbar_video_open (zbar_video_t *vdo, ++ const char *dev) ++{ ++ 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)); ++ zprintf(1, "opened camera device %s (fd=%d)\n", dev, vdo->fd); ++ ++ int rc = _zbar_v4l2_probe(vdo); ++ ++ if(rc && vdo->fd >= 0) { ++ v4l2_close(vdo->fd); ++ vdo->fd = -1; ++ } ++ return(rc); ++} +diff --git a/zbarcam/Makefile.am.inc b/zbarcam/Makefile.am.inc +index ea869bc..78ce9b7 100644 +--- a/zbarcam/Makefile.am.inc ++++ b/zbarcam/Makefile.am.inc +@@ -7,4 +7,6 @@ CLEANFILES += zbarcam/.libs/zbarcam + if WIN32 + zbarcam_zbarcam_SOURCES += zbarcam/zbarcam.rc + zbarcam_zbarcam_LDADD += zbarcam/zbarcam-rc.o ++else ++zbarcam_zbarcam_LDADD += -lv4l2 + endif +-- --- zbar-0.10+doc.orig/debian/patches/new_autotools_build_fix.patch +++ zbar-0.10+doc/debian/patches/new_autotools_build_fix.patch @@ -0,0 +1,16 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -1,9 +1,11 @@ + dnl Process this file with autoconf to produce a configure script. +-AC_PREREQ([2.61]) ++AC_PREREQ([2.68]) ++m4_ifndef([AC_LANG_DEFINES_PROVIDED], ++ [m4_define([AC_LANG_DEFINES_PROVIDED])]) + 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.13 foreign subdir-objects std-options dist-bzip2]) + AC_CONFIG_HEADERS([include/config.h]) + AC_CONFIG_SRCDIR(zbar/scanner.c) + LT_PREREQ([2.2]) --- zbar-0.10+doc.orig/debian/patches/python-zbar-import-fix-am.patch +++ zbar-0.10+doc/debian/patches/python-zbar-import-fix-am.patch @@ -0,0 +1,12 @@ +--- a/python/imagescanner.c ++++ b/python/imagescanner.c +@@ -67,7 +67,8 @@ imagescanner_get_results (zbarImageScann + } + + static PyGetSetDef imagescanner_getset[] = { +- { "results", (getter)imagescanner_get_results, }, ++ { "results", (getter)imagescanner_get_results, NULL, NULL, NULL}, ++ {NULL} /* Sentinel */ + }; + + static PyObject* --- zbar-0.10+doc.orig/debian/patches/series +++ zbar-0.10+doc/debian/patches/series @@ -0,0 +1,3 @@ +0001-Description-Linux-2.6.38-and-later-do-not-support-th.patch +python-zbar-import-fix-am.patch +new_autotools_build_fix.patch --- zbar-0.10+doc.orig/debian/python-zbar.install +++ zbar-0.10+doc/debian/python-zbar.install @@ -0,0 +1 @@ +/usr/lib/python*/*-packages/zbar.so --- zbar-0.10+doc.orig/debian/python-zbarpygtk.install +++ zbar-0.10+doc/debian/python-zbarpygtk.install @@ -0,0 +1 @@ +/usr/lib/python*/*-packages/zbarpygtk.so --- zbar-0.10+doc.orig/debian/rules +++ zbar-0.10+doc/debian/rules @@ -0,0 +1,133 @@ +#!/usr/bin/make -f + +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) + +VERSION:=$(strip $(shell dpkg-parsechangelog| grep '^Version' | awk '{print $$2}')) + +ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) + CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) +else + CROSS= --build $(DEB_BUILD_GNU_TYPE) +endif + +PERL ?= /usr/bin/perl +PERL_PACKAGE = $(shell dh_listpackages| grep perl) +PERL_TMP = $(CURDIR)/debian/$(PERL_PACKAGE) + + +SRCDIR := $(CURDIR) +CONFIGURE = $(SRCDIR)/configure $(CROSS) --prefix=/usr --mandir=/usr/share/man CFLAGS="$(CFLAGS)" +ifeq (,$(findstring linux,$(DEB_HOST_ARCH_OS))) + CONFIGURE += --disable-video +endif + +PYVERS = $(shell pyversions -rv) + +LDFLAGS_DEFAULT = $(LDFLAGS) -Wl,-z,defs +LDFLAGS_LIB_SEARCHPATH = $(strip $(shell find $(CURDIR)/build-nopython -name '*.so' -printf "-L%h ")) +LDFLAGS_BINDINGS = $(strip $(LDFLAGS) $(LDFLAGS_LIB_SEARCHPATH)) + +clean: + dh_testdir + dh_testroot + dh_autoreconf_clean + dh_autotools-dev_restoreconfig + dh_quilt_unpatch + rm -rf $(CURDIR)/build-python* $(CURDIR)/build-nopython + rm -rf $(CURDIR)/debian/tmp_* + [ ! -f $(CURDIR)/perl/Makefile ] || $(MAKE) -C perl realclean + dh_clean + +autotools-dev: autotools-dev-stamp +autotools-dev-stamp: + dh_quilt_patch + dh_autotools-dev_updateconfig + dh_autoreconf + touch $@ + +configure: build-nopython/configure-stamp $(PYVERS:%=build-python%/configure-stamp) $(PYVERS:%=build-python%-dbg/configure-stamp) perl/Makefile +build-nopython/configure-stamp: autotools-dev-stamp + dh_testdir + + mkdir -p build-nopython + cd build-nopython && $(CONFIGURE) --without-python LDFLAGS="$(LDFLAGS_DEFAULT)" + touch $@ + +build-python%/configure-stamp: autotools-dev-stamp + dh_testdir + mkdir -p build-python$* + set -e ;\ + cd build-python$* ;\ + export PYTHON=/usr/bin/python$* ;\ + $(CONFIGURE) PYTHON_CONFIG=/usr/bin/python$*-config LDFLAGS="$(LDFLAGS_BINDINGS)" + touch $@ + +perl/Makefile: build-nopython/build-stamp + cd $(CURDIR)/perl && $(PERL) Makefile.PL \ + INSTALLDIRS=vendor \ + INC="-I$(CURDIR)/include" \ + LIBS="$(LDFLAGS_LIB_SEARCHPATH) -lzbar" + test -f $(CURDIR)/perl/Makefile + +build: build-nopython/build-stamp $(PYVERS:%=build-python%/build-stamp) $(PYVERS:%=build-python%-dbg/build-stamp) build-perl-stamp +build-nopython/build-stamp: build-nopython/configure-stamp + dh_testdir + $(MAKE) -C build-nopython + touch $@ + +build-python%/build-stamp: build-python%/configure-stamp build-nopython/build-stamp + dh_testdir + $(MAKE) -C build-python$* gtk/zbarmarshal.h + $(MAKE) -C build-python$* python/zbar.la + $(MAKE) -C build-python$* pygtk/zbarpygtk.la + touch $@ + +build-perl-stamp: perl/Makefile build-nopython/build-stamp + $(MAKE) -C perl OTHERLDFLAGS="$(LDFLAGS_LIB_SEARCHPATH)" LD_RUN_PATH='' + touch $@ + +install: build + dh_testdir + dh_testroot + dh_prep + $(MAKE) -C build-nopython install DESTDIR=$(CURDIR)/debian/tmp + $(MAKE) -C perl install DESTDIR=$(PERL_TMP) PREFIX=/usr + + set -e; for i in $(PYVERS); do \ + $(MAKE) -C build-python$${i} install-pyexecLTLIBRARIES DESTDIR=$(CURDIR)/debian/tmp ;\ + $(MAKE) -C build-python$${i}-dbg install-pyexecLTLIBRARIES DESTDIR=$(CURDIR)/debian/tmp_pydbg ;\ + done + set -e; for i in `find $(CURDIR)/debian/tmp_pydbg -name '*[^d].so'`; do \ + mv $$i `echo $$i | sed 's,\.so$$,_d.so,'`; \ + done + + +binary: binary-arch + +binary-arch: install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_install -Nzbar-dbg + dh_install --sourcedir=debian/tmp_pydbg -pzbar-dbg + dh_installman + dh_python2 + dh_perl + dh_strip --dbg-package=zbar-dbg + dh_compress + dh_fixperms + dh_makeshlibs -Nlibzbarqt0 -- -c4 + dh_makeshlibs -plibzbarqt0 -- -c0 + sed -i 's,$(VERSION),$(VERSION)~,' debian/libzbarqt0/DEBIAN/symbols + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-indep: + +.PHONY: configure clean build install binary binary-arch binary-indep --- zbar-0.10+doc.orig/debian/source/format +++ zbar-0.10+doc/debian/source/format @@ -0,0 +1 @@ +1.0 --- zbar-0.10+doc.orig/debian/watch +++ zbar-0.10+doc/debian/watch @@ -0,0 +1,3 @@ +version=3 + +http://sf.net/zbar/zbar-(.+)\.tar\.bz2 --- zbar-0.10+doc.orig/debian/zbar-dbg.install +++ zbar-0.10+doc/debian/zbar-dbg.install @@ -0,0 +1,2 @@ +/usr/lib/python*/*-packages/zbar_d.so +/usr/lib/python*/*-packages/zbarpygtk_d.so --- zbar-0.10+doc.orig/debian/zbar-tools.install +++ zbar-0.10+doc/debian/zbar-tools.install @@ -0,0 +1 @@ +/usr/bin/zbar* --- zbar-0.10+doc.orig/debian/zbar-tools.manpages +++ zbar-0.10+doc/debian/zbar-tools.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man1/*