Hello, zbar supports v4l2, but this support is implemented on top of the v4l1 code, that's why when v4l1 is unavailable, v4l2 is also disabled. To solve this problem two issues must be addressed: 1) Get rid of v4l1 configure check. 2) Fix v4l2 implementation to not depend on v4l1 code.
Created attachment 291781 [details] build.log This is what happens if you build zbar[v4l] on a kernel without v4l1 support.
Created attachment 291783 [details] emerge --info
Created attachment 291785 [details, diff] zbar-0.10-no-v4l1-check.patch This patch fixes both issues pointed out above: 1) Remove v4l1 checks and code build. 2) Add necessary code from v4l1.c to v4l2.c
Created attachment 291787 [details, diff] zbar-0.10.ebuild.patch Patch to zbar's ebuild: eautoreconf should be called as well before ac change.
Note to maintainer: v4l1 is not available anymore in our stable linux-headers, so this bug and the attached patch looks valid.
Thanks for the path, but 2 diff headers are missing ;-) I'll commit this as 0.10-r1. Michael --- files/zbar-0.10-no-v4l1-check.patch.orig 2011-11-10 09:45:57.834092498 +0100 +++ files/zbar-0.10-no-v4l1-check.patch 2011-11-10 09:45:30.947428628 +0100 @@ -1,5 +1,5 @@ ---- zbar-0.10/configure.ac.orig 2009-10-23 22:16:44.000000000 +0400 -+++ zbar-0.10/configure.ac.orig 2011-11-06 02:58:15.968375890 +0400 +--- zbar-0.10/configure.ac ++++ zbar-0.10/configure.ac @@ -147,19 +147,13 @@ with_video="no" AS_IF([test "x$enable_video" != "xno"], @@ -21,6 +21,8 @@ AM_CONDITIONAL([HAVE_V4L2], [test "x$with_video" = "xv4l2"]) dnl X +--- zbar-0.10/zbar/Makefile.am.inc ++++ zbar-0.10/zbar/Makefile.am.inc @@ -53,12 +53,9 @@ zbar_libzbar_la_SOURCES += zbar/processor/posix.h zbar/processor/posix.c endif @@ -34,6 +36,8 @@ if WIN32 if HAVE_VIDEO zbar_libzbar_la_SOURCES += zbar/video/vfw.c +--- zbar-0.10/zbar/video/v4l2.c ++++ zbar-0.10/zbar/video/v4l2.c @@ -39,6 +39,9 @@ # include <sys/mman.h> #endif
+*zbar-0.10-r1 (10 Nov 2011) + + 10 Nov 2011; Michael Weber <xmw@gentoo.org> +zbar-0.10-r1.ebuild, + +files/zbar-0.10-no-v4l1-check.patch: + Remove v4l1 from headers, thanks to Andrew Savchenko for the patch (bug + 389683) +