Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 389683 - media-gfx/zbar-0.10[v4l] fails to build when v4l1 is not available
Summary: media-gfx/zbar-0.10[v4l] fails to build when v4l1 is not available
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michael Weber (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2011-11-05 23:53 UTC by Andrew Savchenko
Modified: 2011-11-10 08:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,9.34 KB, text/plain)
2011-11-05 23:54 UTC, Andrew Savchenko
Details
emerge --info (emerge.info,7.35 KB, text/plain)
2011-11-05 23:54 UTC, Andrew Savchenko
Details
zbar-0.10-no-v4l1-check.patch (zbar-0.10-no-v4l1-check.patch,2.58 KB, patch)
2011-11-05 23:57 UTC, Andrew Savchenko
Details | Diff
zbar-0.10.ebuild.patch (zbar-0.10.ebuild.patch,511 bytes, patch)
2011-11-05 23:58 UTC, Andrew Savchenko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Savchenko gentoo-dev 2011-11-05 23:53:04 UTC
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.
Comment 1 Andrew Savchenko gentoo-dev 2011-11-05 23:54:30 UTC
Created attachment 291781 [details]
build.log

This is what happens if you build zbar[v4l] on a kernel without v4l1 support.
Comment 2 Andrew Savchenko gentoo-dev 2011-11-05 23:54:52 UTC
Created attachment 291783 [details]
emerge --info
Comment 3 Andrew Savchenko gentoo-dev 2011-11-05 23:57:13 UTC
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
Comment 4 Andrew Savchenko gentoo-dev 2011-11-05 23:58:33 UTC
Created attachment 291787 [details, diff]
zbar-0.10.ebuild.patch

Patch to zbar's ebuild: eautoreconf should be called as well before ac change.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2011-11-06 09:37:21 UTC
Note to maintainer: v4l1 is not available anymore in our stable linux-headers, so this bug and the attached patch looks valid.
Comment 6 Michael Weber (RETIRED) gentoo-dev 2011-11-10 08:47:24 UTC
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
Comment 7 Michael Weber (RETIRED) gentoo-dev 2011-11-10 08:50:42 UTC
+*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)
+