packages: zbar/zbar.spec, zbar/zbar-no-v4l1.patch (NEW) - removed checking ...
adwol
adwol at pld-linux.org
Sun Nov 27 21:24:45 CET 2011
Author: adwol Date: Sun Nov 27 20:24:45 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- removed checking for v4l1 (removed from kernel since 2.6.38)
---- Files affected:
packages/zbar:
zbar.spec (1.4 -> 1.5) , zbar-no-v4l1.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/zbar/zbar.spec
diff -u packages/zbar/zbar.spec:1.4 packages/zbar/zbar.spec:1.5
--- packages/zbar/zbar.spec:1.4 Thu Nov 24 08:24:38 2011
+++ packages/zbar/zbar.spec Sun Nov 27 21:24:40 2011
@@ -9,13 +9,14 @@
Summary(pl.UTF-8): ZBar - czytnik kodów paskowych
Name: zbar
Version: 0.10
-Release: 3
+Release: 4
License: LGPL v2.1+
Group: Libraries
Source0: http://downloads.sourceforge.net/zbar/%{name}-%{version}.tar.bz2
# Source0-md5: 0fd61eb590ac1bab62a77913c8b086a5
Patch0: %{name}-link.patch
Patch1: %{name}-npapi.patch
+Patch2: %{name}-no-v4l1.patch
URL: http://zbar.sourceforge.net/
BuildRequires: ImageMagick-devel >= 1:6.2.6
BuildRequires: QtCore-devel >= 4
@@ -224,6 +225,7 @@
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%build
%{__libtoolize}
@@ -389,6 +391,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.5 2011/11/27 20:24:40 adwol
+- removed checking for v4l1 (removed from kernel since 2.6.38)
+
Revision 1.4 2011/11/24 07:24:38 arekm
- release 3
================================================================
Index: packages/zbar/zbar-no-v4l1.patch
diff -u /dev/null packages/zbar/zbar-no-v4l1.patch:1.1
--- /dev/null Sun Nov 27 21:24:45 2011
+++ packages/zbar/zbar-no-v4l1.patch Sun Nov 27 21:24:40 2011
@@ -0,0 +1,77 @@
+diff -ruN zbar-0.10.orig/configure.ac zbar-0.10/configure.ac
+--- zbar-0.10.orig/configure.ac 2009-10-23 20:16:44.000000000 +0200
++++ zbar-0.10/configure.ac 2011-11-27 21:14:05.407241311 +0100
+@@ -147,19 +147,13 @@
+ 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_HEADERS([linux/videodev2.h], [with_video="v4l2"],
+ [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
+diff -ruN zbar-0.10.orig/zbar/Makefile.am.inc zbar-0.10/zbar/Makefile.am.inc
+--- zbar-0.10.orig/zbar/Makefile.am.inc 2009-10-23 20:16:44.000000000 +0200
++++ zbar-0.10/zbar/Makefile.am.inc 2011-11-27 21:14:05.407241311 +0100
+@@ -53,12 +53,9 @@
+ 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
+ zbar_libzbar_la_SOURCES += zbar/video/vfw.c
+diff -ruN zbar-0.10.orig/zbar/video/v4l2.c zbar-0.10/zbar/video/v4l2.c
+--- zbar-0.10.orig/zbar/video/v4l2.c 2009-10-23 20:16:44.000000000 +0200
++++ zbar-0.10/zbar/video/v4l2.c 2011-11-27 21:14:05.408241505 +0100
+@@ -39,6 +39,9 @@
+ # include <sys/mman.h>
+ #endif
+ #include <linux/videodev2.h>
++#include <sys/stat.h>
++#include <unistd.h>
++#include <fcntl.h>
+
+ #include "video.h"
+ #include "image.h"
+@@ -507,3 +510,23 @@
+ vdo->dq = v4l2_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;
++ if(vdo->intf != VIDEO_V4L1)
++ rc = _zbar_v4l2_probe(vdo);
++
++ if(rc && vdo->fd >= 0) {
++ close(vdo->fd);
++ vdo->fd = -1;
++ }
++ return(rc);
++}
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/zbar/zbar.spec?r1=1.4&r2=1.5&f=u
More information about the pld-cvs-commit
mailing list