Merge lp:~gal-fourier/ubuntu/natty/opencv/bug-756154 into lp:ubuntu/natty/opencv

Proposed by Gal Shalif
Status: Superseded
Proposed branch: lp:~gal-fourier/ubuntu/natty/opencv/bug-756154
Merge into: lp:ubuntu/natty/opencv
Diff against target: 95 lines (+63/-1)
4 files modified
debian/changelog (+8/-0)
debian/control (+1/-1)
debian/patches/series (+1/-0)
debian/patches/ubuntu11.04_no_videodev.h_include_file.patch (+53/-0)
To merge this branch: bzr merge lp:~gal-fourier/ubuntu/natty/opencv/bug-756154
Reviewer Review Type Date Requested Status
Martin Pitt Disapprove
Review via email: mp+60312@code.launchpad.net

This proposal has been superseded by a proposal from 2011-06-01.

Description of the change

Fix bug 756154 package fail to build because kernel of Ubuntu 11.04 Natty do not provide the obsolete linux/videodev.h file. See details at https://bugs.launchpad.net/ubuntu/+source/opencv/+bug/756154

To post a comment you must log in.
18. By Gal Shalif

add a forgoten patch file

19. By Gal Shalif

add a forgoten patch file

Revision history for this message
Martin Pitt (pitti) wrote :

I don't think we should use this patch, but the upstream one which adds proper v4l2 support. Please see my bug comments.

Thanks!

review: Disapprove
Revision history for this message
Gal Shalif (gal-fourier) wrote :

Start testing a new patch that is derived from upstream version 2.2 changeset at https://code.ros.org/trac/opencv/changeset/5206 (thanks to Martin for pointing to the changeset).
It seem that a proper V4L2 support do require more V4L2-related changes (about 500+ lines of code) from upstream version 2.2 file
https://code.ros.org/trac/opencv/changeset/5206/branches/2.2/opencv/modules/highgui/src/cap_libv4l.cpp

Revision history for this message
Gal Shalif (gal-fourier) wrote :

Update with a rewrite of the patch that is now derived from upstream changeset https://code.ros.org/trac/opencv/changeset/5206 (see Martin's comment above).

Note: Large V4L2-related changes from upstream are NOT included within this bugfix. See also at:
 * Upstream (i.e. version 2.2 file) with the V4L2-related changes: https://code.ros.org/trac/opencv/changeset/5206/branches/2.2/opencv/modules/highgui/src/cap_libv4l.cpp
 * Affected file (i.e. version 2.1 used by Ubuntu 11.04 Natty): src/highgui/cvcap_libv4l.cpp

20. By Gal Shalif

* Add patch ubuntu11.04_no_videodev.h_include_file.patch - fix build error on Ubuntu 11.04 Natty (LP: #756154):
  - Backport the upstream 2.2 changeset to void the use of the obsolete V4L1 (linux/videodev.h)

21. By Gal Shalif

Add patch ubuntu11.10_oneiric_fix_compilation_error_with_gcc4.6.patch - fix build error on Ubuntu 11.10 Oneiric (LP: #791527):

22. By Gal Shalif

Add cvcap_ffmpeg_fix_compile_against_libav0.7.patch - fix compilation errors when compiled against libav-0.7 (as applicable for Ubuntu 11.10 Oneiric) (LP: 756154)

23. By Gal Shalif

* Add patch ubuntu11.10_oneiric_fix_compilation_error_with_gcc4.6.patch:
  + fix build error on Ubuntu 11.10 Oneiric (LP: #791527):
* Add cvcap_ffmpeg_fix_compile_against_libav0.7.patch:
  fix compilation errors when compiled against libav-0.7
  (as applicable for Ubuntu 11.10 Oneiric) (LP: 756154)
* Add patch ubuntu11.04_no_videodev.h_include_file.patch:
  fix build error on Ubuntu 11.04 Natty (LP: #756154):
  - Backport the upstream 2.2 changeset to void the use of the obsolete V4L1
    (i.e. do not use the obsolete linux/videodev.h)

Unmerged revisions

23. By Gal Shalif

* Add patch ubuntu11.10_oneiric_fix_compilation_error_with_gcc4.6.patch:
  + fix build error on Ubuntu 11.10 Oneiric (LP: #791527):
* Add cvcap_ffmpeg_fix_compile_against_libav0.7.patch:
  fix compilation errors when compiled against libav-0.7
  (as applicable for Ubuntu 11.10 Oneiric) (LP: 756154)
* Add patch ubuntu11.04_no_videodev.h_include_file.patch:
  fix build error on Ubuntu 11.04 Natty (LP: #756154):
  - Backport the upstream 2.2 changeset to void the use of the obsolete V4L1
    (i.e. do not use the obsolete linux/videodev.h)

22. By Gal Shalif

Add cvcap_ffmpeg_fix_compile_against_libav0.7.patch - fix compilation errors when compiled against libav-0.7 (as applicable for Ubuntu 11.10 Oneiric) (LP: 756154)

21. By Gal Shalif

Add patch ubuntu11.10_oneiric_fix_compilation_error_with_gcc4.6.patch - fix build error on Ubuntu 11.10 Oneiric (LP: #791527):

20. By Gal Shalif

* Add patch ubuntu11.04_no_videodev.h_include_file.patch - fix build error on Ubuntu 11.04 Natty (LP: #756154):
  - Backport the upstream 2.2 changeset to void the use of the obsolete V4L1 (linux/videodev.h)

19. By Gal Shalif

add a forgoten patch file

18. By Gal Shalif

add a forgoten patch file

17. By Gal Shalif

* Use libv4l1-videodev.h (from libv4l-dev) as a replacement for the obsolete linux/videodev.h on Ubuntu 11.04
  - Add libv4l-dev to build dependencies
  - ubuntu11.04_no_videodev.h_include_file.patch: modify src/highgui/cvcap_libv4l.cpp, src/highgui/cvcap_v4l.cpp

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2010-12-14 14:34:19 +0000
3+++ debian/changelog 2011-05-08 13:51:39 +0000
4@@ -1,3 +1,11 @@
5+opencv (2.1.0-3ubuntu2) natty; urgency=low
6+
7+ * Use libv4l1-videodev.h (from libv4l-dev) as a replacement for the obsolete linux/videodev.h on Ubuntu 11.04
8+ - Add libv4l-dev to build dependencies
9+ - ubuntu11.04_no_videodev.h_include_file.patch: modify src/highgui/cvcap_libv4l.cpp, src/highgui/cvcap_v4l.cpp
10+
11+ -- Gal Shalif (Work at Fourier Systems) <gal_fourier@shalif.com> Sun, 08 May 2011 15:45:35 +0300
12+
13 opencv (2.1.0-3ubuntu1) natty; urgency=low
14
15 * Adjust hack to re-included stdint.h for GCC-4.5. LP: #685500.
16
17=== modified file 'debian/control'
18--- debian/control 2010-08-25 01:49:14 +0000
19+++ debian/control 2011-05-08 13:51:39 +0000
20@@ -4,7 +4,7 @@
21 Maintainer: Debian Scientific Computing Team <pkg-scicomp-devel@lists.alioth.debian.org>
22 Uploaders: Sam Hocevar (Debian packages) <sam+deb@zoy.org>, Nobuhiro Iwamatsu <iwamatsu@debian.org>
23 Build-Depends: debhelper (>= 7.0.50~), quilt (>= 0.46-7~), cmake,
24- libavcodec-dev (>= 0.svn20080206), libavformat-dev, libswscale-dev, libgtk2.0-dev,
25+ libavcodec-dev (>= 0.svn20080206), libavformat-dev, libswscale-dev, libgtk2.0-dev, libv4l-dev,
26 libjasper-dev, libjpeg62-dev, libpng12-dev, libtiff4-dev,
27 libraw1394-dev [!kfreebsd-amd64 !kfreebsd-i386 !hurd-i386],
28 libdc1394-22-dev [!kfreebsd-amd64 !kfreebsd-i386 !hurd-i386],
29
30=== modified file 'debian/patches/series'
31--- debian/patches/series 2010-12-14 14:34:19 +0000
32+++ debian/patches/series 2011-05-08 13:51:39 +0000
33@@ -6,3 +6,4 @@
34 hurd.patch
35 fix_minor_version_python.patch
36 fix_stdint_gcc45.patch
37+ubuntu11.04_no_videodev.h_include_file.patch
38
39=== added file 'debian/patches/ubuntu11.04_no_videodev.h_include_file.patch'
40--- debian/patches/ubuntu11.04_no_videodev.h_include_file.patch 1970-01-01 00:00:00 +0000
41+++ debian/patches/ubuntu11.04_no_videodev.h_include_file.patch 2011-05-08 13:51:39 +0000
42@@ -0,0 +1,53 @@
43+Author: Gal Shalif <gal@fourier-sys.com>
44+Debian BTS: N/A
45+Bug-Ubuntu: https://launchpad.net/bugs/756154
46+Description: Use libv4l1-videodev.h from package libv4l-dev if kernel do not provide the obsolete linux/videodev.h file (i.e. Ubuntu 11.04 Natty)
47+Forwarded: yes/no/not-needed
48+Reviewed-by: TBD
49+Last-Update: 2011-05-08
50+--- a/src/highgui/cvcap_libv4l.cpp 2010-04-06 04:24:44.000000000 +0300
51++++ b/src/highgui/cvcap_libv4l.cpp 2011-05-06 05:56:06.781620436 +0300
52+@@ -202,7 +202,7 @@
53+
54+ #include "_highgui.h"
55+
56+-#if !defined WIN32 && defined HAVE_CAMV4L && defined HAVE_CAMV4L2
57++#if !defined WIN32 && defined HAVE_CAMV4L2
58+
59+ #define CLEAR(x) memset (&(x), 0, sizeof (x))
60+
61+@@ -219,7 +219,11 @@
62+ #include <sys/stat.h>
63+ #include <sys/ioctl.h>
64+
65++#ifdef HAVE_CAMV4L
66+ #include <linux/videodev.h>
67++#else /* not HAVE_CAMV4L */
68++#include <libv4l1-videodev.h> /* Ubuntu 11.04 Natty do not have linux/videodev.h */
69++#endif /* not HAVE_CAMV4L */
70+ #include <linux/videodev2.h>
71+
72+ #include <libv4l1.h>
73+--- a/src/highgui/cvcap_v4l.cpp 2010-04-06 04:24:44.000000000 +0300
74++++ b/src/highgui/cvcap_v4l.cpp 2011-05-06 07:31:08.735530066 +0300
75+@@ -202,7 +202,7 @@
76+
77+ #include "_highgui.h"
78+
79+-#if !defined WIN32 && defined HAVE_CAMV4L
80++#if !defined WIN32 && defined HAVE_CAMV4L2 /* Gal Shalif: HAVE_CAMV4L (include file <linux/videodev.h>) is not defined for Ubuntu 11.04 Natty */
81+
82+ #define CLEAR(x) memset (&(x), 0, sizeof (x))
83+
84+@@ -214,7 +214,11 @@
85+ #include <sys/types.h>
86+ #include <sys/mman.h>
87+
88++#ifdef HAVE_CAMV4L
89+ #include <linux/videodev.h>
90++#else
91++#include <libv4l1-videodev.h> /* Gal Shalif: libv4l-videodev.h from libv4l-dev is a replacement for the obsolete linux/videodev.h */
92++#endif
93+
94+ #include <string.h>
95+ #include <stdlib.h>

Subscribers

People subscribed via source and target branches

to all changes: