--- opencv-2.1.0.orig/debian/watch
+++ opencv-2.1.0/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://sf.net/opencvlibrary/(?i:opencv)-([\d.]+)\.tar\.bz2
--- opencv-2.1.0.orig/debian/copyright
+++ opencv-2.1.0/debian/copyright
@@ -0,0 +1,71 @@
+This package was debianized by Sam Hocevar <sam@zoy.org> on
+Thu,  1 Apr 2004 17:32:06 +0200.
+
+It was downloaded from http://www.sourceforge.net/projects/opencvlibrary/
+
+Upstream Authors: Abrosimov, Dmitry (Intel Corp.)
+                  Bradski, Gary (Intel Corp.)
+                  Bouguet, Jean-Yves (Intel Corp.)
+                  Bovyrin, Alexander (Intel Corp.)
+                  Burenkov, Denis (Moscow State Uni)
+                  Cherepanova, Tatiana (Novosibirsk University)
+                  Cherepennikov, Valery (Intel Corp.)
+                  Chudinovich, Boris (Intel Corp.)
+                  Cowperthwaite, David (Intel Corp.)
+                  Cox, Cory (Intel Corp.)
+                  Davies, Bob (Intel Corp.)
+                  Eaton, Daniel
+                  Eruhimov, Victor (Intel Corp.)
+                  Grachev, Ilya (Intel Corp.)
+                  Khudyakov, Vasily (Novosibirsk University)
+                  Kuranov, Alexander (Intel Corp.)
+                  Kuriakin, Valery (Intel Corp.)
+                  Lantz, Philip (Intel Corp.)
+                  Lienhart, Rainer (Intel Corp.)
+                  Molinov, Sergey (Intel Corp.)
+                  Mosyagin, Valery (Intel Corp.)
+                  Nefian, Ara (Intel Corp.)
+                  Oblomov, Sergey (Intel Corp.)
+                  Pisarevsky, Vadim (Intel Corp.)
+                  Pleskov, Alexander (Intel Corp.)
+                  Sobolev, Andrey (Moscow State Uni)
+                  Zaguskin, Victor (Intel Corp.)
+
+IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
+
+ By downloading, copying, installing or using the software you agree to this license.
+ If you do not agree to this license, do not download, install,
+ copy or use the software.
+
+
+                          License Agreement
+               For Open Source Computer Vision Library
+
+Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
+Copyright (C) 2008-2009, Willow Garage Inc., all rights reserved.
+Third party copyrights are property of their respective owners.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+  * Redistributions of source code must retain the above copyright notice,
+    this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+  * The name of the copyright holders may not be used to endorse or promote products
+    derived from this software without specific prior written permission.
+
+This software is provided by the copyright holders and contributors "as is" and
+any express or implied warranties, including, but not limited to, the implied
+warranties of merchantability and fitness for a particular purpose are disclaimed.
+In no event shall the Intel Corporation or contributors be liable for any direct,
+indirect, incidental, special, exemplary, or consequential damages
+(including, but not limited to, procurement of substitute goods or services;
+loss of use, data, or profits; or business interruption) however caused
+and on any theory of liability, whether in contract, strict liability,
+or tort (including negligence or otherwise) arising in any way out of
+the use of this software, even if advised of the possibility of such damage.
+
--- opencv-2.1.0.orig/debian/python-opencv.install
+++ opencv-2.1.0/debian/python-opencv.install
@@ -0,0 +1,3 @@
+usr/lib/python*/*-packages/opencv/*.py
+usr/lib/python*/*-packages/opencv/*.so
+usr/lib/python*/*-packages/cv.so
--- opencv-2.1.0.orig/debian/libcv2.1.install
+++ opencv-2.1.0/debian/libcv2.1.install
@@ -0,0 +1,3 @@
+usr/lib/libcv.so.*
+usr/lib/libcxcore.so.*
+usr/lib/libml.so.*
--- opencv-2.1.0.orig/debian/libcv-dev.install
+++ opencv-2.1.0/debian/libcv-dev.install
@@ -0,0 +1,28 @@
+usr/include/opencv/cv.h
+usr/include/opencv/cv.hpp
+usr/include/opencv/cvcompat.h
+usr/include/opencv/cvinternal.h
+usr/include/opencv/cvtypes.h
+usr/include/opencv/cvver.h
+usr/include/opencv/cvvidsurv.hpp
+usr/include/opencv/cvwimage.h
+usr/include/opencv/cxcore.h
+usr/include/opencv/cxcore.hpp
+usr/include/opencv/cxerror.h
+usr/include/opencv/cxflann.h
+usr/include/opencv/cxmat.hpp
+usr/include/opencv/cxmisc.h
+usr/include/opencv/cxoperations.hpp
+usr/include/opencv/cxtypes.h
+usr/include/opencv/ml.h
+usr/lib/libcv.a
+usr/lib/libcv.so
+usr/lib/libcxcore.a
+usr/lib/libcxcore.so
+usr/lib/libml.a
+usr/lib/libml.so
+usr/lib/pkgconfig
+#usr/share/opencv/haarcascades
+#usr/share/opencv/lbpcascades
+usr/bin
+usr/share/opencv/OpenCVConfig.cmake
--- opencv-2.1.0.orig/debian/compat
+++ opencv-2.1.0/debian/compat
@@ -0,0 +1 @@
+7
--- opencv-2.1.0.orig/debian/libhighgui-dev.install
+++ opencv-2.1.0/debian/libhighgui-dev.install
@@ -0,0 +1,3 @@
+usr/include/opencv/highgui.*
+usr/lib/libhighgui.a
+usr/lib/libhighgui.so
--- opencv-2.1.0.orig/debian/README.Debian
+++ opencv-2.1.0/debian/README.Debian
@@ -0,0 +1,13 @@
+Notes for the Debian OpenCV packages:
+
+ To compile code against OpenCV, use `pkg-config --cflags opencv`:
+
+   gcc `pkg-config --cflags opencv` -c code.c -o code.o
+
+ To link it afterwards, use `pkg-config --libs opencv`:
+
+   gcc code.o -o code `pkg-config --libs opencv` -lotherlibs
+
+ There is currently no way to exclude libcvaux or libhighgui from the
+link process. I will talk with upstream about this.
+
--- opencv-2.1.0.orig/debian/control
+++ opencv-2.1.0/debian/control
@@ -0,0 +1,170 @@
+Source: opencv
+Priority: optional
+Section: devel
+Maintainer: Debian Scientific Computing Team <pkg-scicomp-devel@lists.alioth.debian.org>
+Uploaders: Sam Hocevar (Debian packages) <sam+deb@zoy.org>, Nobuhiro Iwamatsu <iwamatsu@debian.org>
+Build-Depends: debhelper (>= 7.0.50~), quilt (>= 0.46-7~), cmake,
+ libavcodec-dev, libavformat-dev, libswscale-dev, libgtk2.0-dev,
+ libjasper-dev, libjpeg-dev, libpng12-dev, libtiff4-dev,
+ libraw1394-dev [!kfreebsd-amd64 !kfreebsd-i386 !hurd-i386],
+ libdc1394-22-dev [!kfreebsd-amd64 !kfreebsd-i386 !hurd-i386],
+ libv4l-dev [!kfreebsd-amd64 !kfreebsd-i386 !hurd-i386],
+ zlib1g-dev, liblapack-dev, python-dev, swig, python-support (>= 0.4.1), python-numpy,
+ texlive-fonts-extra, texlive-latex-extra, texlive-latex-recommended,
+ latex-xcolor, texlive-fonts-recommended
+Standards-Version: 3.9.1
+Vcs-Svn: svn://svn.debian.org/svn/pkg-scicomp/opencv/trunk/
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-scicomp/opencv/
+Homepage: http://opencvlibrary.sourceforge.net/
+
+Package: opencv-doc
+Section: doc
+Architecture: all
+Depends: ${misc:Depends}
+Conflicts: libopencv-doc
+Replaces: libopencv-doc
+Description: OpenCV documentation and examples
+ This package contains the OpenCV documentation and example programs.
+ .
+ The Open Computer Vision Library is a collection of algorithms and sample
+ code for various computer vision problems. The library is compatible with
+ IPL (Intel's Image Processing Library) and, if available, can use IPP
+ (Intel's Integrated Performance Primitives) for better performance.
+ .
+ OpenCV provides low level portable data types and operators, and a set
+ of high level functionalities for video acquisition, image processing and
+ analysis, structural analysis, motion analysis and object tracking, object
+ recognition, camera calibration and 3D reconstruction.
+
+Package: libcv-dev
+Section: libdevel
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}, libcv2.1 (= ${binary:Version}), pkg-config
+Conflicts: libopencv-dev
+Replaces: libopencv-dev
+Description: development files for libcv
+ This package contains the header files and static library needed to compile
+ applications that use OpenCV (Open Computer Vision).
+ .
+ The Open Computer Vision Library is a collection of algorithms and sample
+ code for various computer vision problems. The library is compatible with
+ IPL (Intel's Image Processing Library) and, if available, can use IPP
+ (Intel's Integrated Performance Primitives) for better performance.
+ .
+ OpenCV provides low level portable data types and operators, and a set
+ of high level functionalities for video acquisition, image processing and
+ analysis, structural analysis, motion analysis and object tracking, object
+ recognition, camera calibration and 3D reconstruction.
+
+Package: libcvaux-dev
+Section: libdevel
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}, libcvaux2.1 (= ${binary:Version}), libcv-dev (>= ${binary:Version}), pkg-config
+Description: development files for libcvaux
+ This package contains the header files and static library needed to compile
+ applications that use the OpenCV (Open Computer Vision) extensions.
+ .
+ The Open Computer Vision Library is a collection of algorithms and sample
+ code for various computer vision problems. The library is compatible with
+ IPL (Intel's Image Processing Library) and, if available, can use IPP
+ (Intel's Integrated Performance Primitives) for better performance.
+ .
+ OpenCV provides low level portable data types and operators, and a set
+ of high level functionalities for video acquisition, image processing and
+ analysis, structural analysis, motion analysis and object tracking, object
+ recognition, camera calibration and 3D reconstruction.
+
+Package: libhighgui-dev
+Section: libdevel
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}, libhighgui2.1 (= ${binary:Version}), 
+	libcv-dev (>= ${binary:Version}), libpng12-dev, libjpeg-dev, zlib1g-dev,
+	libtiff4-dev, libgtk2.0-dev, libavcodec-dev (>= 0.cvs20050918-2),
+	libavformat-dev, libswscale-dev, libjasper-dev, pkg-config
+Description: development files for libhighgui
+ This package contains the header files and static library needed to compile
+ applications that use the OpenCV (Open Computer Vision) GUI.
+ .
+ The Open Computer Vision Library is a collection of algorithms and sample
+ code for various computer vision problems. The library is compatible with
+ IPL (Intel's Image Processing Library) and, if available, can use IPP
+ (Intel's Integrated Performance Primitives) for better performance.
+ .
+ OpenCV provides low level portable data types and operators, and a set
+ of high level functionalities for video acquisition, image processing and
+ analysis, structural analysis, motion analysis and object tracking, object
+ recognition, camera calibration and 3D reconstruction.
+
+Package: libcv2.1
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: computer vision library
+ This package contains the OpenCV (Open Computer Vision) runtime libraries.
+ .
+ The Open Computer Vision Library is a collection of algorithms and sample
+ code for various computer vision problems. The library is compatible with
+ IPL (Intel's Image Processing Library) and, if available, can use IPP
+ (Intel's Integrated Performance Primitives) for better performance.
+ .
+ OpenCV provides low level portable data types and operators, and a set
+ of high level functionalities for video acquisition, image processing and
+ analysis, structural analysis, motion analysis and object tracking, object
+ recognition, camera calibration and 3D reconstruction.
+
+Package: libcvaux2.1
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: computer vision extension library
+ This package contains the OpenCV (Open Computer Vision) extensions runtime
+ library.
+ .
+ The Open Computer Vision Library is a collection of algorithms and sample
+ code for various computer vision problems. The library is compatible with
+ IPL (Intel's Image Processing Library) and, if available, can use IPP
+ (Intel's Integrated Performance Primitives) for better performance.
+ .
+ OpenCV provides low level portable data types and operators, and a set
+ of high level functionalities for video acquisition, image processing and
+ analysis, structural analysis, motion analysis and object tracking, object
+ recognition, camera calibration and 3D reconstruction.
+
+Package: libhighgui2.1
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: computer vision GUI library
+ This package contains the OpenCV (Open Computer Vision) GUI library.
+ .
+ The Open Computer Vision Library is a collection of algorithms and sample
+ code for various computer vision problems. The library is compatible with
+ IPL (Intel's Image Processing Library) and, if available, can use IPP
+ (Intel's Integrated Performance Primitives) for better performance.
+ .
+ OpenCV provides low level portable data types and operators, and a set
+ of high level functionalities for video acquisition, image processing and
+ analysis, structural analysis, motion analysis and object tracking, object
+ recognition, camera calibration and 3D reconstruction.
+
+Package: python-opencv
+Section: python
+Architecture: any
+Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Provides: ${python:Provides}
+Replaces: python2.3-opencv (<= 0.9.7-3)
+Conflicts: python2.3-opencv (<= 0.9.7-3)
+Description: Python bindings for the computer vision library
+ This package contains Python bindings for the OpenCV (Open Computer Vision)
+ library.
+ .
+ The Open Computer Vision Library is a collection of algorithms and sample
+ code for various computer vision problems. The library is compatible with
+ IPL (Intel's Image Processing Library) and, if available, can use IPP
+ (Intel's Integrated Performance Primitives) for better performance.
+ .
+ OpenCV provides low level portable data types and operators, and a set
+ of high level functionalities for video acquisition, image processing and
+ analysis, structural analysis, motion analysis and object tracking, object
+ recognition, camera calibration and 3D reconstruction.
+
--- opencv-2.1.0.orig/debian/libcv-dev.manpages
+++ opencv-2.1.0/debian/libcv-dev.manpages
@@ -0,0 +1,4 @@
+debian/man/opencv_createsamples.1
+debian/man/opencv_haartraining.1
+debian/man/opencv_performance.1
+debian/man/opencv_traincascade.1
--- opencv-2.1.0.orig/debian/libhighgui2.1.install
+++ opencv-2.1.0/debian/libhighgui2.1.install
@@ -0,0 +1 @@
+usr/lib/libhighgui*.so.*
--- opencv-2.1.0.orig/debian/libcvaux-dev.install
+++ opencv-2.1.0/debian/libcvaux-dev.install
@@ -0,0 +1,3 @@
+usr/include/opencv/cvaux.*
+usr/lib/libcvaux.a
+usr/lib/libcvaux.so
--- opencv-2.1.0.orig/debian/changelog
+++ opencv-2.1.0/debian/changelog
@@ -0,0 +1,542 @@
+opencv (2.1.0-7) unstable; urgency=low
+
+  * Fix FTBFS with libav 0.7. (Closes: #634818)
+    Add patches/vcap_ffmpeg_fix_compile_against_libav0.7.patch.
+
+ -- Nobuhiro Iwamatsu <iwamatsu@debian.org>  Mon, 25 Jul 2011 17:06:08 +0900
+
+opencv (2.1.0-6) unstable; urgency=low
+
+  * Update debian/control.
+    - Add libv4l-dev to Build-Depends.
+    - Change Build-Depends from libjpeg62-dev to libjpeg-dev.
+
+ -- Nobuhiro Iwamatsu <iwamatsu@debian.org>  Tue, 12 Jul 2011 03:38:17 +0900
+
+opencv (2.1.0-5) unstable; urgency=high
+
+  * Update debian/control.
+    - Bumped standards-version to 3.9.2. No changes needed.
+  * Update debian/opencv-doc.lintian-overrides.
+    - Add opencv-doc: wrong-name-for-upstream-changelog.
+  * Update debian/rules.
+    - Remove usr/share/opencv/doc/license.txt, before installing.
+  * Fix build using gcc-4.6 (Closes: #624917).
+    - Add patches/fix_ftbfs_with_gcc-4.6.patch.
+  * Fix build without v4l1 (Closes: #623418).
+    - Add patches/support_v4lv2_only.patch.
+  * Fix optimize of i386 (Closes: #629414).
+    - Opencv was optimized to i686. This chenged optimization to i486.
+    - Add patch/optimize_i486.patch.
+
+ -- Nobuhiro Iwamatsu <iwamatsu@debian.org>  Mon, 11 Jul 2011 01:01:23 +0900
+
+opencv (2.1.0-4) unstable; urgency=low
+
+  * Fix install path of opencv-doc (Closes: #610803).
+  * Fix FTBFS on gcc-4.5(Closes: #607086, #618045).
+    - Add patches/fix_stdint_gcc45.patch 
+
+ -- Nobuhiro Iwamatsu <iwamatsu@debian.org>  Wed, 16 Mar 2011 01:55:22 +0900
+
+opencv (2.1.0-3) unstable; urgency=low
+
+  * Fix set opencv minor version on Python (Closes: #600836).
+
+ -- Nobuhiro Iwamatsu <iwamatsu@debian.org>  Tue, 02 Nov 2010 19:55:47 +0900
+
+opencv (2.1.0-2) unstable; urgency=low
+
+  * Update debian/control.
+    - Bumped standards-version to 3.9.1. No changes needed.
+    - Add python-numpy to Build-depends (Closes: #593310)
+  * Add hurd support patch (Closes: #589586).
+
+ -- Nobuhiro Iwamatsu <iwamatsu@debian.org>  Wed, 25 Aug 2010 01:49:14 +0900
+
+opencv (2.1.0-1) unstable; urgency=low
+
+  * New upstream release. (Closes: #577594, #587232, #563717)
+  * Update debian/rules.
+    - Update build-system to debhelper v7.
+  * Update debian/control.
+    - Bumped standards-version to 3.9.0. No changes needed.
+    - library package name update.
+      Soname of opencv library changed from 4 to 2.1.
+    - Add cmake, liblapack-dev, texlive-fonts-extra, texlive-latex-extra,
+      texlive-latex-recommended, latex-xcolor and  texlive-fonts-recommended
+      to Build-depends.
+    - Add arch depends to libraw1394-dev and libdc1394-22-dev.
+      Thanks to Pino Toscano. (Closes: #581210)
+  * Add opencv-doc.lintian-overrides.
+    opencv-doc has some sample program of python.
+  * Update man files.
+  * Update patches
+    - Update and rename 500_remove_bashism.patch.
+      And rename to remove_bashism.patch.
+  * Add new patches.
+    - Enable build static library.
+      enable_static.patch
+    - Disable build 3rd party library.
+      Use zlib and lapack in debian package.
+      fix_3rdparty_build.patch
+    - Fix build pdf.
+      fix_build_pdf.patch
+    - Remove cvconfig.h
+      remove_cvconfig.h.patch
+  * Remove some patches.
+
+ -- Nobuhiro Iwamatsu <iwamatsu@debian.org>  Fri, 16 Jul 2010 13:12:28 +0900
+
+opencv (2.0.0-4) unstable; urgency=low
+
+  * Update debian/control.
+    - Bumped standards-version to 3.8.4. No changes needed.
+  * Change install path of python-opencv. (Closes: #565121)  
+
+ -- Nobuhiro Iwamatsu <iwamatsu@debian.org>  Sun, 14 Mar 2010 13:19:00 +0900
+
+opencv (2.0.0-3) unstable; urgency=low
+
+  * Remove libcv1, libhighgui1 and libcvaux1 from Conflicts and Replaces.
+    (Closes: #560283)
+  * Remove cvconfig.h from libcv-dev package. (Closes: #559857)
+    Update libcv-dev.install and backport r2242 of commit from upstream.
+    Thanks to Filippo Giunchedi.
+    debian/patches/110_backport_r2242.diff 
+  * Fix FTBFS with GCC 4.4. (Closes: #562742)
+    Backport r2255 of commit from upstream. Thanks to Filippo Giunchedi.
+    debian/patches/110_backport_r2255.diff
+
+ -- Nobuhiro Iwamatsu <iwamatsu@debian.org>  Thu, 07 Jan 2010 20:48:47 +0900
+
+opencv (2.0.0-2) unstable; urgency=low
+
+  * Add cvconfig.h to libcv-dev. (Closes: #559857)
+
+ -- Nobuhiro Iwamatsu <iwamatsu@debian.org>  Tue, 08 Dec 2009 10:00:14 +0900
+
+opencv (2.0.0-1) unstable; urgency=low
+
+  * New upstream release. (Closes: #507588, #549997, #492445)
+  * Update Standards-Version to 3.8.3
+  * Add debian/README.source
+  * Add libdc1394-22-dev to Build-Depends. (Closes: #507584, #516794)
+  * Remove libcvaux-dev and libhighgui-dev from Depends of libcv-dev.
+    (Closes: #525023)
+  * Remove all .la files.
+  * Update debian/watch file. (Closes: #557140)
+  * Update debian/rules file.
+    Add --disable-sse and --disable-optimization to configure.
+  * Remove bashism. (Closes: #530153)
+    500_remove_bashism.patch
+  * Update debian/patches
+    010_m4_syntax.diff
+    010_fix_optimisations.diff
+    010_makefile_syntax.diff
+    010_python_cspec.diff
+    020_python_linking.diff
+    100_static_inline.diff
+    100_amd64.diff
+    120_header_warnings.diff
+  * Remove debian/patches
+    - Merge to upstream
+      030_install_hook.diff      
+      100_ffmpeg_updates.diff
+      210_openmp_compilation.diff
+      300_fix_segfault_in_window_gtk.diff
+      400_ffmpeg_splitting_autofoo.diff
+      410_ffmpeg_use_swscale.diff
+      420_typedef_longint.diff
+      430_highgui_jpeg_camera.diff 
+    - Don't need new version
+      010_ffmpeg_linking.diff
+      050_rebootstrap.diff
+      200_documentation.diff
+      500_ftbfs_gcc44.diff
+
+ -- Nobuhiro Iwamatsu <iwamatsu@debian.org>  Tue, 01 Dec 2009 01:13:18 +0900
+
+opencv (1.0.0-6.3) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Rebuild against new libraw1394 (Closes: #516646, #516920)
+  * Add libhighgui-dev dependency on libswscale-dev thanks Giel van Schijndel
+    (Closes: #547729)
+  * debian/patches/420_typedef_longint.diff: define int64/uint64 as int64_t
+    and uint64_t respectively, patch pulled from upstream r2163
+    (Closes: #543546)
+  * debian/patches/410_ffmpeg_use_swscale.diff: move
+    #define __STDC_CONSTANT_MACROS before #include <stdint.h> into
+    debian/patches/420_typedef_longint.diff
+  * debian/patches/500_ftbfs_gcc44.diff: fix FTBFS with gcc-4.4
+    thanks to Martin Michlmayr (Closes: #504831)
+  * debian/patches/430_highgui_jpeg_camera.diff: recognize JPEG cameras
+    (Closes: #536041)
+
+ -- Filippo Giunchedi <filippo@debian.org>  Sat, 14 Nov 2009 17:04:41 +0100
+
+opencv (1.0.0-6.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Port to newer ffmpeg. Closes: #487638, #490700, #493915
+    Loosely based on patch Gijs Molenaar, thanks.
+
+ -- Thomas Viehmann <tv@beamnet.de>  Thu, 09 Jul 2009 21:43:02 +0200
+
+opencv (1.0.0-6.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * debian/control:
+    + Dropped build dependency on libdc1394-22-dev (Closes: #497689)
+    + Added ${misc:Depends} where missing
+
+ -- Raphael Geissert <atomo64@gmail.com>  Thu, 11 Sep 2008 14:36:06 -0500
+
+opencv (1.0.0-6) unstable; urgency=low
+
+  * debian/patches/120_header_warnings.diff:
+    + Fix more warnings in shipped headers.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Thu, 28 Aug 2008 22:53:43 +0000
+
+opencv (1.0.0-5) unstable; urgency=high
+
+  [ Daniel Leidert ]
+
+  * debian/control: Added Homepage field.
+    (Vcs-Svn): Fixed.
+    (Depends, Build-Depends): Added libjasper-dev (closes: #428474).
+  * debian/dirs: Removed (useless). Avoids empty directories.
+  * debian/libcv-dev.install: Small cosmetic fix.
+  * debian/libcv-dev.manpages: Added for haartraining utilities.
+  * debian/opencv-createsamples.1: Initially added.
+  * debian/opencv-haartraining.1: Ditto.
+  * debian/opencv-performance.1: Ditto.
+  * debian/opencv-doc.install: Install Makefile.debian here.
+  * debian/rules (install, binary-arch, binary-indep): Removed most of the
+    unused debhelper calls. Let dh_install exclude files we don't want. Don't
+    install examples twice. Removed installation of opencv-config.1 (closes:
+    #407946).
+  * debian/watch: Added.
+  * debian/patches/300_fix_segfault_in_window_gtk.diff: Added. Merged from
+    Ubuntu.
+  * debian/patches/series: Adjusted.
+
+  [ Sam Hocevar ]
+
+  * High urgency to ease testing propagations.
+  * debian/patches/100_ffmpeg_updates.diff:
+    + Updated patch to latest ffmpeg version (Closes: #482217).
+  * debian/patches/020_python_linking.diff:
+    + Link python bindings with required libraries.
+  * debian/patches/030_install_hook.diff:
+    + Use install-exec-hook instead of install-hook.
+
+  * debian/control:
+    + Build-depend on more recent libavcodec-dev.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Sun, 08 Jun 2008 15:01:18 +0000
+
+opencv (1.0.0-4) unstable; urgency=low
+
+  * debian/rules:
+    + Support CONCURRENCY_LEVEL.
+    + Don't ignore make distclean errors.
+
+  * debian/control:
+    + Add ${shlibs:Depends} to -dev packages, to get a proper dependency
+      when these packages ship binaries.
+    + Use ${binary:Version} instead of ${Source-Version} (Closes: 430726).
+    + Set policy to 3.7.3.
+    + Use Vcs-Svn: instead of XS-Vcs-Svn: fields.
+
+  * debian/patches/100_ffmpeg_updates.diff:
+    + Updated patch. Getting and setting framerate in FFmpeg streams now
+      works properly again. Thanks to Eric Beets for half the fix.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Mon, 10 Mar 2008 16:41:56 +0000
+
+opencv (1.0.0-3) unstable; urgency=low
+
+  * debian/control:
+    + Set maintainer to the pkg-scicomp team.
+    + Updated Vcs fields.
+  * debian/compat:
+    + Set compat version to 5.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Sun,  1 Apr 2007 15:19:15 +0200
+
+opencv (1.0.0-2) unstable; urgency=low
+
+  * Upload to unstable.
+  * debian/patches/120_header_warnings.diff:
+    + New patch. Fix warnings in shipped headers.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Wed, 28 Mar 2007 19:02:18 +0200
+
+opencv (1.0.0-1) experimental; urgency=low
+
+  * New upstream release.
+  * debian/control:
+    + Depend on pkg-config now that opencv-config is deprecated.
+  * debian/rules:
+    + Do not remove haartraining files (Closes: #368568).
+
+  * debian/patches/010_python_cspec.diff:
+    + New patch. Add -fno-strict-aliasing because of numerous aliasing
+      issues in the code (Closes: #388129).
+
+  * debian/patches/110_dc1394.diff:
+    + Fix a few bugs in the dc1394 code.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Tue, 14 Nov 2006 17:12:26 +0100
+
+opencv (0.9.7-4) unstable; urgency=low
+
+  * Migrate package to the new python policy (Closes: #373469), thanks to
+    Pierre Habouzit.
+  * debian/control: add XS-Vcs-Svn information.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Thu, 12 Oct 2006 09:21:14 +0200
+
+opencv (0.9.7-3) unstable; urgency=low
+
+  * debian/patches/110_dereferencement.diff:
+    + Fix compilation warnings due to type-punned pointer dereferencement.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Mon, 12 Jun 2006 12:14:44 +0200
+
+opencv (0.9.7-2) unstable; urgency=low
+
+  * Switched patch system from dpatch to quilt.
+  * debian/control:
+    + Set policy to 3.7.2.
+    + Build-depend on newer versions of libavcodec-dev so that we can get
+      dynamically linked with it.
+    + Build-depend on quilt instead of dpatch.
+
+  * debian/patches/010_enable_static.diff:
+    + Old patch -- enable static libraries.
+
+  * debian/patches/010_ffmpeg_linking.diff:
+    + Old patch -- correct ffmpeg linking.
+
+  * debian/patches/010_fix_optimisations.diff:
+    + Old patch -- fix optimisation flags for GCC bug workarounds.
+
+  * debian/patches/010_m4_syntax.diff:
+    + Old patch -- fix m4 syntax.
+
+  * debian/patches/010_makefile_syntax.diff:
+    + Old patch -- fix Makefile.am syntax.
+
+  * debian/patches/010_proper_sonames.diff:
+    + Old patch -- fix library sonames.
+
+  * debian/patches/020_rebootstrap.diff:
+    + Old patch -- rebootstrap package.
+
+  * debian/patches/100_amd64.diff:
+    + Fix inclusion of <emmintrin.h> on AMD64 (Closes: #365752, #366105).
+
+  * debian/patches/100_ffmpeg_updates.diff:
+    + Old patch -- update ffmpeg code to get in sync with newer API.
+
+  * debian/patches/100_python_files.diff:
+    + Old patch -- remove shebang from non-executable python files.
+
+  * debian/patches/100_static_inline.diff:
+    + Old patch -- replace inline with static inline in public headers.
+
+  * debian/patches/200_documentation.diff:
+    + Old patch -- get documentation in sync with the API.
+
+  * debian/patches/200_examples_makefile.diff:
+    + Old patch -- add a Makefile to the examples directory.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Sun, 14 May 2006 05:40:42 +0200
+
+opencv (0.9.7-1) unstable; urgency=low
+
+  * New upstream release.
+  * Maintainer upload.
+  * Acknowledging previous NMU (Closes: #339240). Thanks to Steve Langasek.
+  * debian/control:
+    + Build-depend on swig because of the Python bindings.
+    + Renamed 0.9-0c2 packages to 0.9.7-0 due to API changes.
+    + Depend and build-depend on libavformat-dev.
+  * debian/rules:
+    + Activated Python wrappers.
+    + Build example apps.
+  * cxtypes.h highgui.h: Replace "static" with "static inline" for inline
+    functions declared in the public headers.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Wed, 19 Apr 2006 09:37:55 +0200
+
+opencv (0.9.6-4.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Medium-urgency upload for RC bugfix.
+  * Rename libcvaux0.9-0c2 to libcvaux0.9-0c2a for the C++ mt allocator ABI
+    transition, and conflict/replace libcvaux0.9-0c2 accordingly
+    (closes: #339240).
+
+ -- Steve Langasek <vorlon@debian.org>  Sat,  3 Dec 2005 21:27:40 -0800
+
+opencv (0.9.6-4) unstable; urgency=low
+
+  * tests/cv/src/asobel.cpp:
+    + Fixed an illegal int/void* cast.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Mon, 26 Sep 2005 19:39:52 +0200
+
+opencv (0.9.6-3) unstable; urgency=low
+
+  * debian/control:
+    + Build-depend on a newer libavcodec-dev.
+    + Make libhighgui-dev depend on all required -dev packages such as
+      libtheora-dev (Closes: #319018).
+  * debian/rules:
+    + Hint --build and --host to configure.
+  * configure.in:
+    + Use -O2 on m68k instead of -O3 to bypass gcc ICEs (Closes: #321106).
+  * tests/cv/src/apyramids.cpp: fixed 64 bits compilation (Closes: #318791).
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Fri, 16 Sep 2005 11:53:13 +0200
+
+opencv (0.9.6-2) unstable; urgency=low
+
+  * The great g++ transition upload.
+  * debian/control:
+    + Renamed 0.9-0 packages to 0.9-0c2.
+    + Set policy to 3.6.2.1.
+    + Build-depend on a newer libavcodec-dev.
+  * docs/index.htm:
+    + Encoded invalid HTML characters.
+    + Fixed links to the reference manual (Closes: #306922).
+  * docs/ref/opencvref_cv.htm:
+    + Encoded invalid HTML characters.
+    + Fixed the definition of CvHistogram (Closes: #307269).
+  * otherlibs/highgui/cvcap.cpp:
+    + Hardcoded the capture framerate because ffmpeg no longer easily provides
+      the information.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Thu, 14 Jul 2005 15:48:31 +0200
+
+opencv (0.9.6-1) unstable; urgency=low
+
+  * New upstream release (Closes: #267825).
+  * Major upstream changes:
+    + This release merged most Debian-specific patches upstream.
+    + This version now uses pkg-config instead of opencv-config.
+    + This version uses GTK+ instead of Motif widgets.
+    + Example programs were fixed (Closes: #254150).
+  * debian/control:
+    + Build-depend on libdc1394 and libavcodec. As a result, build no longer
+      fails if libavcodec-dev is installed (Closes: #270345).
+  * debian/copyright:
+    + Fixed upstream URL (Closes: #270344).
+  * cvaux/src/cvvideo.cpp: the code portion causing an FTBFS on amd64 is no
+    longer there (Closes: #297625).
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Fri,  1 Apr 2005 19:30:58 +0200
+
+opencv (0.9.5-10) unstable; urgency=high
+
+  * debian/patches/30_delete.dpatch:
+    + Fixed a crash at program exit (Closes: #269799).
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Fri,  3 Sep 2004 21:59:26 +0200
+
+opencv (0.9.5-9) unstable; urgency=high
+
+  * debian/control:
+    + Build-depend on lesstif2-dev to take advantage of new Motif 2 features.
+    + libhighgui-dev depends on lesstif2-dev as well.
+  * debian/patches/20_old.dpatch:
+    + No longer patch/unpatch the Makefiles to avoid clock skew issues
+      (Closes: #266622).
+  * debian/patches/30_delete.dpatch:
+    + Fixed delete[] / delete mismatches.
+  * debian/patches/30_window_lnx.cpp.setTrackbarPos_crash.dpatch:
+    + Fix a crash in cvSetTrackbarPos() for closed windows, courtesy of
+      micha137 at users.sourceforge.net.
+  * debian/patches/40_linux_trackbar.dpatch
+    debian/patches/30_linux_mouse.dpatch:
+    + Add arrows to trackbars, courtesy of Filip Sadlo.
+    + Fixed position of mouse button events, courtesy of Filip Sadlo.
+  * debian/patches/30_render.dpatch:
+    + Fixed pointer casts, courtesy of buddha_pht at users.sourceforge.net.
+  * debian/patches/30_xshm.dpatch:
+    + Don't use XShm over network connections.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Tue, 17 Aug 2004 18:01:23 +0200
+
+opencv (0.9.5-8) unstable; urgency=low
+
+  * debian/control:
+    + Added missing build dependency on dpatch (Closes: #262209).
+  * debian/rules:
+    + Call unpatch before make clean.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Fri, 30 Jul 2004 08:34:59 +0200
+
+opencv (0.9.5-7) unstable; urgency=low
+
+  * Rebuilt against libtiff4 due to an ABI change.
+  * Fixed numerous compilation warning due to pointer/int size assumptions and
+    char signedness assumption.
+  * debian/control:
+    + Set policy to 3.6.1.1.
+    + Switched packaging method to dpatch.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Sun, 25 Jul 2004 21:54:33 +0200
+
+opencv (0.9.5-6) unstable; urgency=low
+
+  * cv/include/cvcompat.h cv/include/cvtypes.h:
+    + Fixed more C preprocessor warnings.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Wed, 30 Jun 2004 14:04:12 +0200
+
+opencv (0.9.5-5) unstable; urgency=low
+
+  * cv/include/cv.h:
+    + Fixed C preprocessor warnings.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Wed, 30 Jun 2004 11:59:36 +0200
+
+opencv (0.9.5-4) unstable; urgency=low
+
+  * debian/control:
+    + Added missing lesstif-dev build dependency to the libhighgui-dev
+      package (Closes: #252304).
+  * debian/README.Debian:
+    + Minor updates.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Wed,  2 Jun 2004 13:27:07 -0300
+
+opencv (0.9.5-3) unstable; urgency=low
+
+  * debian/rules:
+    + Enabled static libraries in the build (Closes: #249471).
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Wed, 19 May 2004 21:48:47 +0200
+
+opencv (0.9.5-2) unstable; urgency=low
+
+  * debian/control:
+    + Added libxaw7-dev to the build dependencies.
+    + Added libxaw7-dev to the libcvcam-dev dependencies.
+  * debian/copyright:
+    + Removed a duplicate copyright entry.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Wed, 28 Apr 2004 10:25:56 +0200
+
+opencv (0.9.5-1) unstable; urgency=low
+
+  * Initial release.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Thu, 22 Apr 2004 14:55:19 +0200
+
--- opencv-2.1.0.orig/debian/opencv-doc.lintian-overrides
+++ opencv-2.1.0/debian/opencv-doc.lintian-overrides
@@ -0,0 +1,29 @@
+opencv-doc: wrong-name-for-upstream-changelog usr/share/doc/opencv-doc/ChangeLog.htm
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/cam-histo.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/capture-cam.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/chessboard.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/contours.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/convexhull.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/delaunay.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/demhist.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/dft.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/distrans.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/drawing.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/edge.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/facedetect.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/ffilldemo.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/fitellipse.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/houghlines.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/inpaint.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/kalman.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/kmeans.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/laplace.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/lkdemo.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/logpolar.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/minarea.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/minidemo.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/morphology.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/motempl.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/pyramid_segmentation.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/squares.py
+opencv-doc: python-script-but-no-python-dep ./usr/share/opencv/samples/python/watershed.py
--- opencv-2.1.0.orig/debian/opencv-doc.install
+++ opencv-2.1.0/debian/opencv-doc.install
@@ -0,0 +1,19 @@
+#usr/share/opencv/doc/CMakeLists.txt
+#usr/share/opencv/doc/ChangeLog.htm
+#usr/share/opencv/doc/README.txt
+#usr/share/opencv/doc/haartraining.htm
+#usr/share/opencv/doc/index.htm
+#usr/share/opencv/doc/opencv-logo.png
+#usr/share/opencv/doc/opencv-logo2.png
+#usr/share/opencv/doc/opencv.jpg
+#usr/share/opencv/doc/opencv.pdf
+#usr/share/opencv/doc/packaging.txt
+#usr/share/opencv/doc/papers
+#usr/share/opencv/doc/pattern.pdf
+#usr/share/opencv/doc/vidsurv
+usr/share/opencv/doc/*		usr/share/doc/opencv-doc/
+usr/share/opencv/haarcascades	usr/share/doc/opencv-doc/examples/
+usr/share/opencv/lbpcascades	usr/share/doc/opencv-doc/examples/
+usr/share/opencv/samples/c	usr/share/doc/opencv-doc/examples/
+usr/share/opencv/samples/python usr/share/doc/opencv-doc/examples
+#../../samples/c/Makefile.debian	usr/share/doc/opencv-doc/examples/c/
--- opencv-2.1.0.orig/debian/rules
+++ opencv-2.1.0/debian/rules
@@ -0,0 +1,49 @@
+#!/usr/bin/make -f
+
+CMAKE_FLAGS = \
+	-DCMAKE_BUILD_TYPE=Release	\
+	-DENABLE_SSE=OFF	\
+	-DENABLE_SSE2=OFF	\
+	-DENABLE_SSE3=OFF	\
+	-DENABLE_SSSE3=OFF	\
+	-DUSE_FAST_MATH=ON	\
+	-DUSE_O3=OFF	\
+	-DUSE_OMIT_FRAME_POINTER=ON	\
+	-DBUILD_EXAMPLES=ON	\
+	-DINSTALL_C_EXAMPLES=ON	\
+	-DINSTALL_OCTAVE_EXAMPLES=OFF	\
+	-DINSTALL_PYTHON_EXAMPLES=ON	\
+	-DBUILD_NEW_PYTHON_SUPPORT=ON	\
+	-DBUILD_SWIG_PYTHON_SUPPORT=ON	\
+	-DBUILD_OCTAVE_SUPPORT=OFF	\
+	-DUSE_IPP=ON	\
+	-DWITH_FFMPEG=ON	\
+	-DWITH_GSTREAMER=OFF	\
+	-DWITH_GTK=ON	\
+	-DWITH_JASPER=ON	\
+	-DWITH_JPEG=ON	\
+	-DWITH_PNG=ON	\
+	-DWITH_TIFF=ON	\
+	-DWITH_PVAPI=ON	\
+	-DWITH_TBB=OFF	\
+	-DWITH_UNICAP=OFF	\
+	-DWITH_1394=ON	\
+	-DWITH_V4L=ON	\
+	-DWITH_XINE=OFF	\
+	-DBUILD_TESTS=OFF \
+	-DBUILD_LATEX_DOCS=ON \
+	-DCMAKE_SKIP_RPATH=ON
+
+%:
+	dh --with quilt $@ --buildsystem=cmake
+
+override_dh_auto_configure:
+	dh_auto_configure -- $(CMAKE_FLAGS)
+
+override_dh_install:
+	rm -rf debian/tmp/usr/share/opencv/samples/octave
+	rm debian/tmp/usr/share/opencv/samples/c/cvsample.dsp
+	-rm -f debian/tmp/usr/share/opencv/doc/license.txt
+	chmod +x debian/tmp/usr/share/opencv/samples/c/build_all.sh
+
+	dh_install -O--buildsystem=cmake
--- opencv-2.1.0.orig/debian/README.source
+++ opencv-2.1.0/debian/README.source
@@ -0,0 +1,8 @@
+README.source
+
+The source package uses quilt to manage all modifications to the upstream
+source. Changes are stored in the source package as diffs in debian/patches
+and applied during the build.
+
+See /usr/share/doc/quilt/README.source for a detailed explanation.
+
--- opencv-2.1.0.orig/debian/libcvaux2.1.install
+++ opencv-2.1.0/debian/libcvaux2.1.install
@@ -0,0 +1 @@
+usr/lib/libcvaux*.so.*
--- opencv-2.1.0.orig/debian/source/format
+++ opencv-2.1.0/debian/source/format
@@ -0,0 +1 @@
+1.0
--- opencv-2.1.0.orig/debian/patches/remove_bashism.patch
+++ opencv-2.1.0/debian/patches/remove_bashism.patch
@@ -0,0 +1,26 @@
+# https://code.ros.org/trac/opencv/ticket/355
+From 272691313cba7867ece69c06371bb088de724048 Mon Sep 17 00:00:00 2001
+From: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
+Date: Thu, 20 May 2010 17:33:00 +0900
+Subject: [PATCH] Remove bashism and fix operator
+
+Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
+---
+ samples/c/build_all.sh |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/samples/c/build_all.sh b/samples/c/build_all.sh
+index 711412b..787474a 100644
+--- a/samples/c/build_all.sh
++++ b/samples/c/build_all.sh
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+ 
+-if [[ $# > 0 ]] ; then
++if [ $# -gt 0 ] ; then
+ 	base=`basename $1 .c`
+ 	echo "compiling $base"
+ 	gcc -ggdb `pkg-config opencv --cflags --libs` $base.c -o $base 
+-- 
+1.7.1
+
--- opencv-2.1.0.orig/debian/patches/enable_static.patch
+++ opencv-2.1.0/debian/patches/enable_static.patch
@@ -0,0 +1,198 @@
+diff --git a/src/cv/CMakeLists.txt b/src/cv/CMakeLists.txt
+index 5db832f..15b49d6 100644
+--- a/src/cv/CMakeLists.txt
++++ b/src/cv/CMakeLists.txt
+@@ -22,9 +22,13 @@ source_group("Include\\External" FILES ${lib_hdrs})
+ file(GLOB lib_int_hdrs "*.h*")
+ source_group("Include\\Internal" FILES ${lib_int_hdrs})
+ 
++set(need_files ${lib_srcs} ${lib_hdrs} ${lib_int_hdrs})
++
+ set(the_target "cv")
++set(the_target_s "cv_s")
+ 
+-add_library(${the_target} ${lib_srcs} ${lib_hdrs} ${lib_int_hdrs})
++add_library(${the_target} SHARED ${need_files})
++add_library(${the_target_s} STATIC ${need_files})
+ 
+ if(PCHSupport_FOUND)
+     set(pch_header ${CMAKE_CURRENT_SOURCE_DIR}/_cv.h)
+@@ -45,6 +49,9 @@ set_target_properties(${the_target} PROPERTIES
+     OUTPUT_NAME "${the_target}${OPENCV_DLLVERSION}"
+     )
+ 
++# For static link library
++set_target_properties(${the_target_s} PROPERTIES OUTPUT_NAME ${the_target})
++
+ # Additional target properties
+ set_target_properties(${the_target} PROPERTIES
+     DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
+@@ -69,7 +76,7 @@ endif()
+ # Dependencies of this target:
+ add_dependencies(${the_target} cxcore)
+ 
+-install(TARGETS ${the_target}
++install(TARGETS ${the_target} ${the_target_s}
+     RUNTIME DESTINATION bin COMPONENT main
+     LIBRARY DESTINATION lib COMPONENT main
+     ARCHIVE DESTINATION lib COMPONENT main)
+diff --git a/src/cvaux/CMakeLists.txt b/src/cvaux/CMakeLists.txt
+index fc4edc4..2acb3db 100644
+--- a/src/cvaux/CMakeLists.txt
++++ b/src/cvaux/CMakeLists.txt
+@@ -32,9 +32,14 @@ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../include/opencv"
+ # ----------------------------------------------------------------------------------
+ # 				Define the library target:
+ # ----------------------------------------------------------------------------------
++
++set(need_files ${lib_srcs} ${lib_hdrs})
++
+ set(the_target "cvaux")
++set(the_target_s "cvaux_s")
+ 
+-add_library(${the_target} ${lib_srcs} ${lib_hdrs})
++add_library(${the_target} SHARED ${need_files})
++add_library(${the_target_s} STATIC ${need_files})
+ 
+ if(PCHSupport_FOUND)
+     set(pch_header ${CMAKE_CURRENT_SOURCE_DIR}/_cvaux.h)
+@@ -55,6 +60,9 @@ set_target_properties(${the_target} PROPERTIES
+ 	OUTPUT_NAME "${the_target}${OPENCV_DLLVERSION}"
+ 	)
+ 
++# For static link library
++set_target_properties(${the_target_s} PROPERTIES OUTPUT_NAME ${the_target})
++
+ # Additional target properties
+ set_target_properties(${the_target} PROPERTIES
+ 	DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
+@@ -74,7 +82,7 @@ endif()
+ # Dependencies of this target:
+ add_dependencies(${the_target} cxcore cv highgui ml)
+ 
+-install(TARGETS ${the_target}
++install(TARGETS ${the_target} ${the_target_s}
+ 	RUNTIME DESTINATION bin COMPONENT main
+ 	LIBRARY DESTINATION lib COMPONENT main
+ 	ARCHIVE DESTINATION lib COMPONENT main)
+diff --git a/src/cxcore/CMakeLists.txt b/src/cxcore/CMakeLists.txt
+index e13bf32..6017d01 100644
+--- a/src/cxcore/CMakeLists.txt
++++ b/src/cxcore/CMakeLists.txt
+@@ -22,9 +22,13 @@ source_group("Include\\External" FILES ${lib_hdrs})
+ file(GLOB lib_int_hdrs "*.h*")
+ source_group("Include\\Internal" FILES ${lib_int_hdrs})
+ 
++set(need_files ${lib_srcs} ${lib_hdrs} ${lib_int_hdrs})
++
+ set(the_target "cxcore")
++set(the_target_s "cxcore_s")
+ 
+-add_library(${the_target} ${lib_srcs} ${lib_hdrs} ${lib_int_hdrs})
++add_library(${the_target} SHARED ${need_files})
++add_library(${the_target_s} STATIC ${need_files})
+ 
+ if(PCHSupport_FOUND)
+     set(pch_header ${CMAKE_CURRENT_SOURCE_DIR}/_cxcore.h)
+@@ -45,6 +49,9 @@ set_target_properties(${the_target} PROPERTIES
+     OUTPUT_NAME "${the_target}${OPENCV_DLLVERSION}"
+     )
+ 
++# For static link library
++set_target_properties(${the_target_s} PROPERTIES OUTPUT_NAME ${the_target})
++
+ # Additional target properties
+ set_target_properties(${the_target} PROPERTIES
+     DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
+@@ -69,7 +76,7 @@ endif()
+ 
+ add_dependencies(${the_target} opencv_lapack zlib)
+ 
+-install(TARGETS ${the_target}
++install(TARGETS ${the_target} ${the_target_s}
+     RUNTIME DESTINATION bin COMPONENT main
+     LIBRARY DESTINATION lib COMPONENT main
+     ARCHIVE DESTINATION lib COMPONENT main)
+diff --git a/src/highgui/CMakeLists.txt b/src/highgui/CMakeLists.txt
+index 19b93e4..e6946ff 100644
+--- a/src/highgui/CMakeLists.txt
++++ b/src/highgui/CMakeLists.txt
+@@ -183,7 +183,11 @@ set(lib_srcs ${highgui_srcs} ${grfmt_srcs})
+ # ----------------------------------------------------------------------------------
+ # 				Define the library target:
+ # ----------------------------------------------------------------------------------
++
++set(need_files ${lib_srcs} ${highgui_hdrs} ${grfmt_hdrs} ${highgui_ext_hdrs})
++
+ set(the_target "highgui")
++set(the_target_s "highgui_s")
+ 
+ add_definitions(-DHIGHGUI_EXPORTS -DCVAPI_EXPORTS)
+ 
+@@ -191,7 +195,8 @@ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../include/opencv"
+                     "${CMAKE_CURRENT_SOURCE_DIR}"
+                     "${CMAKE_CURRENT_BINARY_DIR}")
+ 
+-add_library(${the_target} ${lib_srcs} ${highgui_hdrs} ${grfmt_hdrs} ${highgui_ext_hdrs})
++add_library(${the_target} SHARED ${need_files})
++add_library(${the_target_s} STATIC ${need_files})
+ 
+ if(PCHSupport_FOUND)
+     set(pch_header ${CMAKE_CURRENT_SOURCE_DIR}/_highgui.h)
+@@ -212,6 +217,9 @@ set_target_properties(${the_target} PROPERTIES
+     OUTPUT_NAME "${the_target}${OPENCV_DLLVERSION}"
+     )
+ 
++# For static link library
++set_target_properties(${the_target_s} PROPERTIES OUTPUT_NAME ${the_target})
++
+ # Additional target properties
+ set_target_properties(${the_target} PROPERTIES
+ 	DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
+@@ -280,7 +288,7 @@ if(APPLE)
+ 	endif()
+ endif()
+ 
+-install(TARGETS ${the_target}
++install(TARGETS ${the_target} ${the_target_s}
+ 	RUNTIME DESTINATION bin COMPONENT main
+ 	LIBRARY DESTINATION lib COMPONENT main
+ 	ARCHIVE DESTINATION lib COMPONENT main)
+diff --git a/src/ml/CMakeLists.txt b/src/ml/CMakeLists.txt
+index ef6279c..31be9f7 100644
+--- a/src/ml/CMakeLists.txt
++++ b/src/ml/CMakeLists.txt
+@@ -16,9 +16,13 @@ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../include/opencv"
+                     "${CMAKE_CURRENT_SOURCE_DIR}"
+                     "${CMAKE_CURRENT_BINARY_DIR}")
+ 
++set(need_files ${lib_srcs} ${lib_hdrs} ${lib_int_hdrs})
++
+ set(the_target "ml")
++set(the_target_s "ml_s")
+ 
+-add_library(${the_target} ${lib_srcs} ${lib_hdrs} ${lib_int_hdrs})
++add_library(${the_target} SHARED ${need_files})
++add_library(${the_target_s} STATIC ${need_files})
+ 
+ if(PCHSupport_FOUND)
+     set(pch_header ${CMAKE_CURRENT_SOURCE_DIR}/_ml.h)
+@@ -39,6 +43,9 @@ set_target_properties(${the_target} PROPERTIES
+     OUTPUT_NAME "${the_target}${OPENCV_DLLVERSION}"
+     )
+ 
++# For static link library
++set_target_properties(${the_target_s} PROPERTIES OUTPUT_NAME ${the_target})
++
+ # Additional target properties
+ set_target_properties(${the_target} PROPERTIES
+ 	DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
+@@ -59,7 +66,7 @@ target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} cxcore)
+ # Dependencies of this target:
+ add_dependencies(${the_target} cxcore)
+ 
+-install(TARGETS ${the_target}
++install(TARGETS ${the_target} ${the_target_s}
+ 	RUNTIME DESTINATION bin COMPONENT main
+ 	LIBRARY DESTINATION lib COMPONENT main
+ 	ARCHIVE DESTINATION lib COMPONENT main)
--- opencv-2.1.0.orig/debian/patches/examples_makefile.diff
+++ opencv-2.1.0/debian/patches/examples_makefile.diff
@@ -0,0 +1,63 @@
+Index: opencv-0.9.7/samples/c/Makefile.debian
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ opencv-0.9.7/samples/c/Makefile.debian	2006-05-14 05:24:27.000000000 +0200
+@@ -0,0 +1,58 @@
++OBJECTS = demhist convexhull delaunay distrans drawing edge facedetect ffilldemo fitellipse kalman kmeans laplace minarea morphology motempl pyramid_segmentation squares
++
++all: $(OBJECTS)
++
++clean:
++	rm -f $(OBJECTS)
++
++demhist: demhist.c
++	$(CXX) $^ -o $@ `pkg-config --cflags --libs opencv`
++
++convexhull: convexhull.c
++	$(CXX) $^ -o $@ `pkg-config --cflags --libs opencv`
++
++delaunay: delaunay.c
++	$(CXX) $^ -o $@ `pkg-config --cflags --libs opencv`
++
++distrans: distrans.c
++	$(CXX) $^ -o $@ `pkg-config --cflags --libs opencv`
++
++drawing: drawing.c
++	$(CXX) $^ -o $@ `pkg-config --cflags --libs opencv`
++
++edge: edge.c
++	$(CXX) $^ -o $@ `pkg-config --cflags --libs opencv`
++
++facedetect: facedetect.c
++	$(CXX) $^ -o $@ `pkg-config --cflags --libs opencv` # cvaux !!!
++
++ffilldemo: ffilldemo.c
++	$(CXX) $^ -o $@ `pkg-config --cflags --libs opencv`
++
++fitellipse: fitellipse.c
++	$(CXX) $^ -o $@ `pkg-config --cflags --libs opencv`
++
++kalman: kalman.c
++	$(CXX) $^ -o $@ `pkg-config --cflags --libs opencv`
++
++kmeans: kmeans.c
++	$(CXX) $^ -o $@ `pkg-config --cflags --libs opencv`
++
++laplace: laplace.c
++	$(CXX) $^ -o $@ `pkg-config --cflags --libs opencv`
++
++minarea: minarea.c
++	$(CXX) $^ -o $@ `pkg-config --cflags --libs opencv`
++
++morphology: morphology.c
++	$(CXX) $^ -o $@ `pkg-config --cflags --libs opencv`
++
++motempl: motempl.c
++	$(CXX) $^ -o $@ `pkg-config --cflags --libs opencv`
++
++pyramid_segmentation: pyramid_segmentation.c
++	$(CXX) $^ -o $@ `pkg-config --cflags --libs opencv`
++
++squares: squares.c
++	$(CXX) $^ -o $@ `pkg-config --cflags --libs opencv`
++
--- opencv-2.1.0.orig/debian/patches/series
+++ opencv-2.1.0/debian/patches/series
@@ -0,0 +1,12 @@
+fix_3rdparty_build.patch
+enable_static.patch 
+fix_build_pdf.patch 
+remove_bashism.patch
+remove_cvconfig.h.patch
+hurd.patch
+fix_minor_version_python.patch
+fix_stdint_gcc45.patch
+fix_ftbfs_with_gcc-4.6.patch
+optimize_i486.patch
+support_v4lv2_only.patch
+cvcap_ffmpeg_fix_compile_against_libav0.7.patch
--- opencv-2.1.0.orig/debian/patches/fix_ftbfs_with_gcc-4.6.patch
+++ opencv-2.1.0/debian/patches/fix_ftbfs_with_gcc-4.6.patch
@@ -0,0 +1,17 @@
+# From 1ab75d4416360e4b38670c565f090ea834171f1c Mon Sep 17 00:00:00 2001
+# From: vrabaud <vrabaud@73c94f0f-984f-4a5f-82bc-2d8db8d8ee08>
+# Date: Wed, 6 Apr 2011 22:00:09 +0000
+# Subject: [PATCH] - make sure the code compiles under gcc-4.6
+#
+#git-svn-id: https://code.ros.org/svn/opencv/trunk/opencv@4861 73c94f0f-984f-4a5f-82bc-2d8db8d8ee08
+# Update for opencv 2.1.
+--- a/include/opencv/cxcore.hpp	2011-07-11 08:20:05.000000000 +0900
++++ b/include/opencv/cxcore.hpp	2011-07-11 08:20:22.000000000 +0900
+@@ -50,6 +50,7 @@
+ #ifndef SKIP_INCLUDES
+ #include <algorithm>
+ #include <cmath>
++#include <cstddef>
+ #include <complex>
+ #include <map>
+ #include <new>
--- opencv-2.1.0.orig/debian/patches/fix_3rdparty_build.patch
+++ opencv-2.1.0/debian/patches/fix_3rdparty_build.patch
@@ -0,0 +1,46 @@
+# Copyright Nobuhiro Iwamatsu <iwamatsu@debian.org>
+# This patch disable building 3rdparty library and set using debian package.
+
+--- a/3rdparty/CMakeLists.txt	2010-04-26 05:48:58.000000000 +0900
++++ b/3rdparty/CMakeLists.txt	2010-04-26 05:49:17.000000000 +0900
+@@ -1,6 +1,6 @@
+-add_subdirectory(flann)
+-add_subdirectory(lapack)
+-add_subdirectory(zlib)
++add_subdirectory(flann) #
++# add_subdirectory(lapack)
++# add_subdirectory(zlib)
+ if(WITH_JASPER AND NOT JASPER_FOUND)
+ 	add_subdirectory(libjasper)
+ endif()
+--- a/src/cxcore/CMakeLists.txt	2010-04-26 05:59:37.000000000 +0900
++++ b/src/cxcore/CMakeLists.txt	2010-04-26 06:00:09.000000000 +0900
+@@ -53,7 +53,7 @@
+     )
+ 
+ # Add the required libraries for linking:
+-target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${IPP_LIBS} opencv_lapack zlib flann)
++target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${IPP_LIBS} lapack z flann)
+ 
+ # Linker flag needed for Windows Mobile 5 and 6 SDKs
+ if(MSVC)
+@@ -67,7 +67,7 @@
+         )
+ endif()
+ 
+-add_dependencies(${the_target} opencv_lapack zlib)
++add_dependencies(${the_target} lapack z)
+ 
+ install(TARGETS ${the_target}
+     RUNTIME DESTINATION bin COMPONENT main
+--- a/CMakeLists.txt	2010-05-17 05:00:10.000000000 +0900
++++ b/CMakeLists.txt	2010-05-17 05:00:23.000000000 +0900
+@@ -839,7 +839,7 @@
+         set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} stdc++)
+     endif()
+ 
+-    set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} flann zlib opencv_lapack)
++    set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} flann)
+ endif()
+ 
+ 
--- opencv-2.1.0.orig/debian/patches/remove_cvconfig.h.patch
+++ opencv-2.1.0/debian/patches/remove_cvconfig.h.patch
@@ -0,0 +1,17 @@
+# https://code.ros.org/trac/opencv/ticket/356
+
+diff --git a/include/opencv/cvinternal.h b/include/opencv/cvinternal.h
+index a278469..ba107ff 100644
+--- a/include/opencv/cvinternal.h
++++ b/include/opencv/cvinternal.h
+@@ -50,10 +50,6 @@
+ 
+ #include <vector>
+ 
+-#ifdef HAVE_CONFIG_H
+-    #include <cvconfig.h>
+-#endif
+-
+ #if defined WIN32 || defined _WIN32
+ #  ifndef WIN32
+ #    define WIN32
--- opencv-2.1.0.orig/debian/patches/fix_stdint_gcc45.patch
+++ opencv-2.1.0/debian/patches/fix_stdint_gcc45.patch
@@ -0,0 +1,13 @@
+# From Matthias Klose <doko@ubuntu.com>
+# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=607086
+
+--- opencv-2.1.0.orig/src/highgui/cvcap_ffmpeg.cpp
++++ opencv-2.1.0/src/highgui/cvcap_ffmpeg.cpp
+@@ -53,6 +53,7 @@
+ #define __STDC_CONSTANT_MACROS
+ // force re-inclusion of stdint.h to get INT64_C macro
+ #undef _STDINT_H
++#undef _GCC_WRAP_STDINT_H
+ #include <stdint.h>
+ #endif
+ #include <errno.h>
--- opencv-2.1.0.orig/debian/patches/hurd.patch
+++ opencv-2.1.0/debian/patches/hurd.patch
@@ -0,0 +1,35 @@
+Author: Pino Toscano <toscano.pino@tiscali.it>
+Debian BTS: #589586
+Description: fix build on GNU/Hurd
+ GNU/Hurd runs the gnumach kernel so there is the __MACH__ symbol defined as
+ well; given the instructions are specific to the Mac OS X kernel, check for
+ both __MACH__ and __APPLE__.
+--- a/src/cxcore/cxsystem.cpp
++++ b/src/cxcore/cxsystem.cpp
+@@ -72,7 +72,7 @@
+ #include <sys/time.h>
+ #include <time.h>
+ 
+-#ifdef __MACH__
++#if (defined __MACH__ && defined __APPLE__)
+ #include <mach/mach.h>
+ #include <mach/mach_time.h>
+ #endif
+@@ -192,7 +192,7 @@
+     struct timespec tp;
+     clock_gettime(CLOCK_MONOTONIC, &tp);
+     return (int64)tp.tv_sec*1000000000 + tp.tv_nsec;
+-#elif defined __MACH__
++#elif (defined __MACH__ && defined __APPLE__)
+     return (int64)mach_absolute_time();
+ #else    
+     struct timeval tv;
+@@ -210,7 +210,7 @@
+     return (double)freq.QuadPart;
+ #elif defined __linux || defined __linux__
+     return 1e9;
+-#elif defined __MACH__
++#elif (defined __MACH__ && defined __APPLE__)
+     static double freq = 0;
+     if( freq == 0 )
+     {
--- opencv-2.1.0.orig/debian/patches/cvcap_ffmpeg_fix_compile_against_libav0.7.patch
+++ opencv-2.1.0/debian/patches/cvcap_ffmpeg_fix_compile_against_libav0.7.patch
@@ -0,0 +1,120 @@
+Author: Gal Shalif <gal@fourier-sys.com>
+Debian BTS: N/A
+Bug-Ubuntu: https://launchpad.net/bugs/756154
+Description: Fix opencv-2.1.0 compilation errors when copiled with libav-0.7 (a.k.a. ffmpeg 0.7) - as applicable for Ubuntu 11.10 Oneiric
+ Note: Ubuntu 11.04 Natty use libav-0.6.2 with:
+       #define LIBAVCODEC_VERSION_MAJOR 52
+       #define LIBAVUTIL_VERSION_MAJOR  50
+       #define LIBAVFORMAT_BUILD       (52<<16 | 64<<8 | 2)
+ Note: Ubuntu 11.10 Oneiric use libav-0.7 with:
+       #define LIBAVCODEC_VERSION_MAJOR 53 
+       #define LIBAVUTIL_VERSION_MAJOR  51
+       #define LIBAVFORMAT_BUILD       (53<<16 | 2<<8 | 0)
+--- a/src/highgui/cvcap_ffmpeg.cpp	2011-07-06 12:44:09.585566733 +0300
++++ b/src/highgui/cvcap_ffmpeg.cpp	2011-07-06 13:09:43.261010471 +0300
+@@ -464,7 +464,7 @@
+         AVCodecContext *enc = &ic->streams[i]->codec;
+ #endif
+ 
+-        if( CODEC_TYPE_VIDEO == enc->codec_type && video_stream < 0) {
++        if( AVMEDIA_TYPE_VIDEO == enc->codec_type && video_stream < 0) {
+             AVCodec *codec = avcodec_find_decoder(enc->codec_id);
+             if (!codec ||
+             avcodec_open(enc, codec) < 0)
+@@ -514,6 +514,24 @@
+ }
+ 
+ 
++#if LIBAVFORMAT_BUILD >= (53<<16 | 0<<8 | 0) /* As defined when compiled against libav-0.7 from Ubuntu 11.10 Oneiric */
++/* Gal Shalif: temporary add a backward compatible function - till OpenCV is properly ported to compile against ffmpeg 0.7 */
++/* Gal Shalif: code is copy from Ubuntu 11.04 Natty libav-0.6.2/libavcodec/utils.c */
++int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture,
++                         int *got_picture_ptr,
++                         uint8_t *buf, int buf_size)
++{
++    AVPacket avpkt;
++    av_init_packet(&avpkt);
++    avpkt.data = buf;
++    avpkt.size = buf_size;
++    // HACK for CorePNG to decode as normal PNG by default
++    avpkt.flags = AV_PKT_FLAG_KEY;
++
++    return avcodec_decode_video2(avctx, picture, got_picture_ptr, &avpkt);
++}
++#endif /* LIBAVFORMAT_BUILD >= (53<<16 | 0<<8 | 0) */
++
+ bool CvCapture_FFMPEG::grabFrame()
+ {
+     bool valid = false;
+@@ -795,6 +813,17 @@
+ #endif
+ };
+ 
++#if LIBAVFORMAT_BUILD >= (53<<16 | 0<<8 | 0) /* As defined when compiled against libav-0.7 from Ubuntu 11.10 Oneiric */
++/* Gal Shalif: temporary add a backward compatible define - till OpenCV is properly ported to compile against ffmpeg 0.7 */
++
++/* Gal Shalif: code is copy from Ubuntu 11.04 Natty libav-0.6.2/libavutil/error.h and is enclosed within LIBAVUTIL_VERSION_MAJOR < 51 ... #endif */
++#define AVERROR_NUMEXPECTED AVERROR(EDOM)    ///< Number syntax expected in filename
++#define AVERROR_NOFMT       AVERROR(EILSEQ)  ///< Unknown format
++#define AVERROR_IO          AVERROR(EIO)     ///< I/O error
++#define AVERROR_NOMEM       AVERROR(ENOMEM)  ///< Not enough memory
++
++#endif /* LIBAVFORMAT_BUILD >= (53<<16 | 0<<8 | 0) */
++
+ static const char * icvFFMPEGErrStr(int err)
+ {
+     switch(err) {
+@@ -891,7 +920,7 @@
+ #endif
+ 
+ #if LIBAVFORMAT_BUILD > 4621
+-	c->codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, CODEC_TYPE_VIDEO);
++	c->codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_VIDEO);
+ #else
+ 	c->codec_id = oc->oformat->video_codec;
+ #endif
+@@ -903,7 +932,7 @@
+     //if(codec_tag) c->codec_tag=codec_tag;
+ 	codec = avcodec_find_encoder(c->codec_id);
+ 
+-	c->codec_type = CODEC_TYPE_VIDEO;
++	c->codec_type = AVMEDIA_TYPE_VIDEO;
+ 
+ 	/* put sample parameters */
+ 	c->bit_rate = bitrate;
+@@ -990,7 +1019,7 @@
+         AVPacket pkt;
+         av_init_packet(&pkt);
+ 
+-        pkt.flags |= PKT_FLAG_KEY;
++        pkt.flags |= AV_PKT_FLAG_KEY;
+         pkt.stream_index= video_st->index;
+         pkt.data= (uint8_t *)picture;
+         pkt.size= sizeof(AVPicture);
+@@ -1010,7 +1039,7 @@
+ 			pkt.pts = c->coded_frame->pts;
+ #endif
+             if(c->coded_frame->key_frame)
+-                pkt.flags |= PKT_FLAG_KEY;
++                pkt.flags |= AV_PKT_FLAG_KEY;
+             pkt.stream_index= video_st->index;
+             pkt.data= outbuf;
+             pkt.size= out_size;
+@@ -1210,7 +1239,7 @@
+ 	av_register_all ();
+ 
+ 	/* auto detect the output format from the name and fourcc code. */
+-	fmt = guess_format(NULL, filename, NULL);
++	fmt = av_guess_format(NULL, filename, NULL);
+ 	if (!fmt)
+         return false;
+ 
+@@ -1233,7 +1262,7 @@
+ #endif
+ 
+     // alloc memory for context
+-	oc = av_alloc_format_context();
++	oc = avformat_alloc_context();
+ 	assert (oc);
+ 
+ 	/* set file name */
--- opencv-2.1.0.orig/debian/patches/optimize_i486.patch
+++ opencv-2.1.0/debian/patches/optimize_i486.patch
@@ -0,0 +1,19 @@
+Description: Fix optimize of i386.
+  Opencv was optimized to i686. This chenged optimization to i486.
+  This patch is for opencv-2.1.x.
+Forwarded: not-needed
+Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=80;bug=629414
+Bug-Debian: http://bugs.debian.org/629414
+Author: Nobuhiro Iwamatsu <iwamatsu@debian.org>
+
+--- a/CMakeLists.txt	2011-07-11 08:03:01.000000000 +0900
++++ b/CMakeLists.txt	2011-07-11 08:03:08.000000000 +0900
+@@ -760,7 +760,7 @@
+     if(X86)
+         if(NOT X86_64)
+             if(NOT APPLE)
+-                set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -march=i686")
++                set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -march=i486")
+             endif()
+         endif()
+     endif()
--- opencv-2.1.0.orig/debian/patches/fix_minor_version_python.patch
+++ opencv-2.1.0/debian/patches/fix_minor_version_python.patch
@@ -0,0 +1,11 @@
+--- a/interfaces/swig/filtered/constants.h	2010-11-02 19:53:40.000000000 +0900
++++ b/interfaces/swig/filtered/constants.h	2010-11-02 19:53:51.000000000 +0900
+@@ -230,7 +230,7 @@
+ 
+ #define CV_MAJOR_VERSION    2
+ 
+-#define CV_MINOR_VERSION    0
++#define CV_MINOR_VERSION    1
+ 
+ #define CV_SUBMINOR_VERSION 0
+ 
--- opencv-2.1.0.orig/debian/patches/fix_build_pdf.patch
+++ opencv-2.1.0/debian/patches/fix_build_pdf.patch
@@ -0,0 +1,13 @@
+diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
+index 6a2a046..23aa3d1 100644
+--- a/doc/CMakeLists.txt
++++ b/doc/CMakeLists.txt
+@@ -41,7 +41,7 @@ foreach(f ${FILES_TEX})
+     list(APPEND refman_copied_srcs ${outputf})
+ endforeach()
+ 
+-set(pdflatex_args -interaction=batchmode
++set(pdflatex_args 
+ "\"\\newcommand{\\genc}{true}\\newcommand{\\genpy}{true}\\newcommand{\\targetlang}{c}\\input{opencv.tex}\"")
+ 
+ add_custom_command(
--- opencv-2.1.0.orig/debian/patches/support_v4lv2_only.patch
+++ opencv-2.1.0/debian/patches/support_v4lv2_only.patch
@@ -0,0 +1,36 @@
+--- a/src/highgui/cvcap_libv4l.cpp	2011-07-11 01:45:09.000000000 +0900
++++ b/src/highgui/cvcap_libv4l.cpp	2011-07-11 01:47:00.000000000 +0900
+@@ -202,7 +202,7 @@
+ 
+ #include "_highgui.h"
+ 
+-#if !defined WIN32 && defined HAVE_CAMV4L && defined HAVE_CAMV4L2
++#if !defined WIN32 && defined HAVE_LIBV4L
+ 
+ #define CLEAR(x) memset (&(x), 0, sizeof (x))
+ 
+@@ -219,8 +219,12 @@
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+ 
++#ifdef HAVE_CAMV4L
+ #include <linux/videodev.h>
++#endif
++#ifdef HAVE_CAMV4L2
+ #include <linux/videodev2.h>
++#endif
+ 
+ #include <libv4l1.h>
+ #include <libv4l2.h>
+--- a/cvconfig.h.cmake	2011-07-11 01:47:12.000000000 +0900
++++ b/cvconfig.h.cmake	2011-07-11 01:47:59.000000000 +0900
+@@ -19,6 +19,9 @@
+ /* V4L2 capturing support */
+ #cmakedefine HAVE_CAMV4L2
+ 
++/* V4L/V4L2 capturing support via libv4l */
++#cmakedefine HAVE_LIBV4L
++
+ /* Carbon windowing environment */
+ #cmakedefine HAVE_CARBON
+ 
--- opencv-2.1.0.orig/debian/man/opencv_createsamples.1
+++ opencv-2.1.0/debian/man/opencv_createsamples.1
@@ -0,0 +1,147 @@
+.TH "OPENCV_CREATESAMPLES" "1" "May 2010" "OpenCV" "User Commands"
+
+
+.SH NAME
+opencv_createsamples \- create training and testing samples
+
+
+.SH SYNOPSIS
+.B opencv_createsamples [options]
+
+
+.SH DESCRIPTION
+.PP
+.B opencv_createsamples
+creates positive samples from a single object image or a collection of
+positive images.
+.PP
+The scheme of test samples creation is similar to training samples creation
+since each test sample is a background image into which a randomly
+distorted and randomly scaled instance of the object picture is pasted at a
+random position.
+
+.SH OPTIONS
+.PP
+.B opencv_createsamples
+supports the following options:
+
+.PP
+.TP
+.BI "\-info " collection_file_name
+A database of positive source images. Use it together with
+.B \-img
+to create test samples instead.
+
+.TP
+.BI "\-img " image_file_name
+A positive source image. Use it together with
+.B \-info
+to create test samples instead.
+
+.TP
+.BI "\-vec " vec_file_name
+The output file name containing the generated positive samples for training.
+
+.TP
+.BI "\-bg " background_file_name
+The background description file (the negative sample set). It contains a list
+of images into which randomly distorted versions of the object are pasted for
+positive sample generation.
+
+.TP
+.BI "\-num " number_of_samples
+The number of positive samples to generate/train. The default is
+.IR 1000 .
+
+.TP
+.BI "\-bgcolor " background_color
+The background color (currently grayscale images are assumed); the background
+color denotes the transparent color. The default is
+.IR 0 .
+.\" TODO: What does 0 mean? How are colors expressed with integers?
+
+.TP
+.B \-inv
+Invert the colors.
+.TP
+
+.TP
+.BI "\-maxidev " max_intensity_deviation
+The desired maximum intensity deviation of foreground samples pixels. The
+default is
+.IR 40 .
+
+.TP
+.BI "\-maxxangle " max_x_rotation_angle
+The maximum rotation angle in x-direction in radians. The default is
+.IR 1.1 .
+
+.TP
+.BI "\-maxyangle " max_y_rotation_angle
+The maximum rotation angle in y-direction in radians. The default is 
+.IR 1.1 .
+
+.TP
+.BI "\-maxzangle " max_z_rotation_angle
+The maximum rotation angle in z-direction in radians. The default is 
+.IR 0.5 .
+
+.TP
+.BI "\-show [" scale_factor "]"
+Show each created sample during the creation process. Optionally a scaling
+factor can be defined. The default is
+.IR 4.0 .
+.IP
+If <\fBESC\fR> is pressed, the creation process will continue without showing
+the samples. This can be useful for debugging purposes.
+
+.TP
+.BI "\-h " sample_height
+For the creation of training samples, it is the resulting sample height.
+The default is
+.IR 24 .
+.IP
+In case of creating test samples, it is the minimal height of placed object 
+picture.
+
+.TP
+.BI "\-w " sample_width
+For the creation of training samples, it is the resulting sample width.
+The default is
+.IR 24 .
+.IP
+In case of creating test samples, it is the minimal width of placed object
+picture.
+
+.PP
+The same information is shown, if
+.B opencv_createsamples
+is called without any arguments/options.
+
+
+.SH EXAMPLES
+.PP
+To create training samples from one image applying distortions and show the
+results:
+.IP
+.B opencv_createsamples -img source.png -num 10 -bg negatives.dat -vec samples_out.vec -show
+.PP
+To create training samples of size 40x40 from some images without applying
+distortions:
+.IP
+.B opencv_creasamples -info source.dat -vec samples_out.vec -w 40 -h 40
+
+
+.SH SEE ALSO
+.PP
+.BR opencv_haartraing (1),
+.BR opencv_performance (1)
+.PP
+More information and examples can be found in the OpenCV documentation.
+
+
+.SH AUTHORS
+.PP
+This manual page was written by \fBDaniel Leidert\fR <\&daniel.leidert@wgdd.de\&>
+and \fBNobuhiro Iwamatsu\fR <\&iwamatsu@debian.org\&>
+for the Debian project (but may be used by others).
--- opencv-2.1.0.orig/debian/man/opencv_traincascade.1
+++ opencv-2.1.0/debian/man/opencv_traincascade.1
@@ -0,0 +1,140 @@
+.TH "OPENCV_TRAINCASCADE" "1" "May 2010" "OpenCV" "User Commands"
+
+
+.SH NAME
+opencv_traincascade \- transcascade application
+
+
+
+.SH SYNOPSIS
+.B opencv_traincascade [options]
+
+
+.SH DESCRIPTION
+.PP
+.B traincascade application.
+
+.SH OPTIONS
+
+.PP
+.B opencv_traincascade
+supports the following options:
+
+.SH BASIC OPTIONS
+
+.PP
+.BI " \-data " cascade_dir_name
+
+.PP  
+.BI " \-vec " vec_file_name
+
+.PP
+.BI " \-bg " background_file_name
+"-numPos " number_of_positive_samples
+The default is
+.IR 2000 .
+
+.PP
+.BI " \-numNeg " number_of_negative_samples
+The default is
+.IR 1000 .
+
+.PP
+.BI " \-num " Stages number_of_stages 
+The default is
+.IR 20 .
+
+.PP
+.BI " \-precalcValBufSize " precalculated_vals_buffer_size_in_Mb
+The default is
+.IR 256 .
+
+.PP
+.BI " \-precalcIdxBufSize " precalculated_idxs_buffer_size_in_Mb
+The default is
+.IR 256 .
+
+.PP
+.BI " \-baseFormatSave "
+
+.SH CASCADE OPTIONS
+ 
+.PP
+.BI " \-stageType "
+The default is
+.IR BOOST .
+
+.PP
+.BI " \-featureType "
+Set feauture type . You can select HAAR or LBP.
+The default is
+.IR HAAR .
+
+.PP
+.BI " \-w " sampleWidth
+The default is
+.IR 24 .
+
+.PP
+.BI " \-h " sampleHeight
+The default is
+.IR 24 .
+
+.SH BOOST OPTIONS
+
+.PP
+.BI " \-bt {" DAB | RAB | LB | GAB "}"
+The type of the applied boosting algorithm. You can choose between Discrete
+AdaBoost (\fIDAB\fR), Real AdaBoost (\fIRAB\fR), LogitBoost (\fILB\fR) and
+Gentle AdaBoost (\fIGAB\fR). The default is
+.IR GAB .
+
+.PP
+.BI " \-minHitRate " min_hit_rate
+The default is
+.IR 0.995 .
+
+.PP
+.BI " \-maxFalseAlarmRate " max_false_alarm_rate
+The default is
+.IR 0.5 .
+
+.PP
+.BI " \-weightTrimRate " weight_trim_rate
+The default is
+.IR 0.95 .
+
+.PP
+.BI " \-maxDepth " max_depth_of_weak_tree
+The default is
+.IR 1 .
+
+.PP
+.BI " \-maxWeakCount max_weak_tree_count
+The default is
+.IR 100 .
+
+.SH HAARFEATURE OPTIONS
+
+.PP
+.BI " \-mode " <BASIC(default) | CORE | ALL
+The type of the applied haarFeature mode. You can choose between \fIBASIC\fR, 
+\fCORE\fR and \fIALL\fR. The default is
+.IR BASIC .
+
+.SH EXAMPLES
+.PP
+TODO
+
+.SH SEE ALSO
+.PP
+.BR opencv_haartraing (1),
+.BR opencv_performance (1)
+.PP
+More information and examples can be found in the OpenCV documentation.
+
+
+.SH AUTHORS
+.PP
+This manual page was written by \fBNobuhiro Iwamatsu\fR <\&iwamatsu@debian.org\&>
+for the Debian project (but may be used by others).
--- opencv-2.1.0.orig/debian/man/opencv_performance.1
+++ opencv-2.1.0/debian/man/opencv_performance.1
@@ -0,0 +1,126 @@
+.TH "OPENCV_PERFORMANCE" "1" "May 2010" "OpenCV" "User Commands"
+
+
+.SH NAME
+opencv_performance \- evaluate the performance of the classifier
+
+
+.SH SYNOPSIS
+.B opencv_performance [options]
+
+
+.SH DESCRIPTION
+.PP
+.B opencv_performance
+evaluates the performance of the classifier. It takes a collection of marked
+up test images, applies the classifier and outputs the performance, i.e. number of
+found objects, number of missed objects, number of false alarms and other
+information.
+.PP
+When there is no such collection available test samples may be created from single
+object image by the
+.BR opencv_createsamples (1)
+utility. The scheme of test samples creation in this case is similar to training samples
+.PP
+In the output, the table should be read:
+.TP
+.RB \(aq Hits \(aq
+shows the number of correctly found objects
+.TP
+.RB \(aq Missed \(aq
+shows the number of missed objects (must exist but are not found, also known
+as false negatives)
+.TP
+.RB \(aq False \(aq
+shows the number of false alarms (must not exist but are found, also known
+as false positives)
+
+
+.SH OPTIONS
+.PP
+.B opencv_performance
+supports the following options:
+
+.PP
+
+.TP
+.BI "\-data " classifier_directory_name
+The directory, in which the classifier can be found.
+
+.TP
+.BI "\-info " collection_file_name
+File with test samples description.
+
+.TP
+.BI "\-maxSizeDiff " max_size_difference
+Determine the size criterion of reference and detected coincidence.
+The default is
+.IR 1.500000 .
+
+.TP
+.BI "\-maxPosDiff " max_position_difference
+Determine the position criterion of reference and detected coincidence.
+The default is
+.IR 0.300000 .
+
+.TP
+.BI "\-sf " scale_factor
+Scale the detection window in each iteration. The default is
+.IR 1.200000 .
+
+.TP
+.B \-ni
+Don't save detection result to an image. This could be useful, if
+.I collection_file_name
+contains paths.
+
+.TP
+.BI "\-nos " number_of_stages
+Number of stages to use. The default is
+.I \-1
+(all stages are used).
+
+.TP
+.BI "\-rs " roc_size
+The default is
+.IR \40 .
+
+.TP
+.BI "\-h " sample_height
+The sample height (must have the same value as used during creation).
+The default is
+.IR 24 .
+
+.TP
+.BI "\-w " sample_width
+The sample width (must have the same value as used during creation).
+The default is
+.IR 24 .
+
+.PP
+The same information is shown, if
+.B opencv_performance
+is called without any arguments/options.
+
+
+.SH EXAMPLES
+.PP
+To create training samples from one image applying distortions and show the
+results:
+.IP
+.B opencv_performance -data trainout -info tests.dat
+
+
+.SH SEE ALSO
+.PP
+.BR opencv_createsamples (1),
+.BR opencv_haartraing (1)
+.PP
+More information and examples can be found in the OpenCV documentation.
+
+
+.SH AUTHORS
+.PP
+This manual page was written by \fBDaniel Leidert\fR <\&daniel.leidert@wgdd.de\&>
+and \fBNobuhiro Iwamatsu\fR <\&iwamatsu@debian.org\&>
+for the Debian project (but may be used by others).
--- opencv-2.1.0.orig/debian/man/opencv_haartraining.1
+++ opencv-2.1.0/debian/man/opencv_haartraining.1
@@ -0,0 +1,215 @@
+.TH "OPENCV_HAARTRAINING" "1" "May 2010" "OpenCV" "User Commands"
+
+
+.SH NAME
+opencv_haartraining \- train classifier
+
+
+.SH SYNOPSIS
+.B opencv_haartraining [options]
+
+
+.SH DESCRIPTION
+.PP
+.B opencv_haartraining
+is training the classifier. While it is running, you can already get an
+impression, whether the classifier will be suitable or if you need to improve
+the training set and/or parameters.
+.PP
+In the output:
+.TP
+.RB \(aq POS: \(aq
+shows the hitrate in the set of training samples (should be equal or near to
+.I 1.0
+as in stage 0)
+.TP
+.RB \(aq NEG: \(aq
+indicates the false alarm rate (should reach at least
+.I 5*10-6
+to be a usable classifier for real world applications)
+.PP
+If one of the above values gets
+.IR 0 " (" zero ")"
+there is an overflow. In this case the false alarm rate is so low, that
+further training doesn't make sense anymore, so it can be stopped.
+
+
+.SH OPTIONS
+.PP
+.B opencv_haartraining
+supports the following options:
+
+.PP
+.TP
+.BI "\-data " dir_name
+The directory in which the trained classifier is stored.
+
+.TP
+.BI "\-vec " vec_file_name
+The file name of the positive samples file (e.g. created by the
+.BR opencv_createsamples (1)
+utility).
+
+.TP
+.BI "\-bg " background_file_name
+The background description file (the negative sample set). It contains a list
+of images into which randomly distorted versions of the object are pasted for
+positive sample generation.
+
+.TP
+.BI "\-bg-vecfile
+This option is that bgfilename represents a vec file with discrete negatives. The default is
+.BR "not set".
+
+.TP
+.BI "\-npos " number_of_positive_samples
+The number of positive samples used in training of each classifier stage.
+The default is
+.IR 2000 .
+
+.TP
+.BI "\-nneg " number_of_negative_samples
+The number of negative samples used in training of each classifier stage.
+The default is
+.IR 2000 .
+
+.PP
+Reasonable values are
+.BR "\-npos 7000 \-nneg 3000" .
+
+.TP
+.BI "\-nstages " number_of_stage
+The number of stages to be trained. The default is
+.IR 14 .
+
+.TP
+.BI "\-nsplits " number_of_splits
+Determine the weak classifier used in stage classifiers. If the value is
+.IP
+.BR 1 ,
+then a simple stump classifier is used
+.IP
+.BR >=2 ,
+then CART classifier with
+.I number_of_splits
+internal (split) nodes is used
+.IP
+The default is
+.IR 1 .
+
+.TP
+.BI "\-mem " memory_in_MB
+Available memory in
+.B MB
+for precalculation. The more memory you have the faster the training process is.
+The default is
+.IR 200 .
+
+.TP
+.B \-sym, \-nonsym
+Specify whether the object class under training has vertical symmetry or not.
+Vertical symmetry speeds up training process and reduces memory usage. For
+instance, frontal faces show off vertical symmetry. The default is
+.BR \-sym .
+
+.TP
+.BI "\-minhitrate " min_hit_rate
+The minimal desired hit rate for each stage classifier. Overall hit rate may
+be estimated as
+.IR "\%min_hit_rate^number_of_stages" .
+The default is
+.IR 0.950000 .
+
+.TP
+.BI "\-maxfalsealarm " max_false_alarm_rate
+The maximal desired false alarm rate for each stage classifier. Overall false
+alarm rate may be estimated as
+.IR "\%max_false_alarm_rate^number_of_stages" .
+The default is
+.IR 0.500000 .
+
+.TP
+.BI "\-weighttrimming " weight_trimming
+Specifies whether and how much weight trimming should be used. The default is
+.IR 0.950000 .
+A decent choice is
+.IR 0.900000 .
+
+.TP
+.B \-eqw
+Specify if initial weights of all samples will be equal.
+
+.TP
+.BI "\-mode {" BASIC | CORE | ALL "}"
+Select the type of haar features set used in training.
+.I BASIC
+uses only upright features, while
+.I CORE
+uses the full upright feature set and
+.I ALL
+uses the full set of upright and 45 degree rotated feature set.
+The default is
+.IR BASIC .
+.IP
+For more information on this see \%http://www.lienhart.de/ICIP2002.pdf.
+
+.TP
+.BI "\-h " sample_height
+The sample height (must have the same value as used during creation).
+The default is
+.IR 24 .
+
+.TP
+.BI "\-w " sample_width
+The sample width (must have the same value as used during creation).
+The default is
+.IR 24 .
+
+.TP
+.BI "\-bt {" DAB | RAB | LB | GAB "}"
+The type of the applied boosting algorithm. You can choose between Discrete
+AdaBoost (\fIDAB\fR), Real AdaBoost (\fIRAB\fR), LogitBoost (\fILB\fR) and
+Gentle AdaBoost (\fIGAB\fR). The default is
+.IR GAB .
+
+.TP
+.BI "\-err {" misclass | gini | entropy "}"
+The type of used error if Discrete AdaBoost (\fB\-bt DAB\fR) algorithm is
+applied. The default is
+.IR misclass .
+
+.TP
+.BI "\-maxtreesplits " max_number_of_splits_in_tree_cascade
+The maximal number of splits in a tree cascade. The default is
+.IR 0 .
+
+.TP
+.BI "\-minpos " min_number_of_positive_samples_per_cluster
+The minimal number of positive samples per cluster. The default is
+.IR 500 .
+
+.PP
+The same information is shown, if
+.B opencv_haartraining
+is called without any arguments/options.
+
+
+.SH EXAMPLES
+.PP
+TODO
+.\" http://robotik.inflomatik.info/other/opencv/OpenCV_ObjectDetection_HowTo.pdf
+
+
+.SH SEE ALSO
+.PP
+.BR opencv_createsamples (1),
+.BR opencv_performance (1)
+.PP
+More information and examples can be found in the OpenCV documentation.
+
+
+.SH AUTHORS
+.PP
+This manual page was written by \fBDaniel Leidert\fR <\&daniel.leidert@wgdd.de\&>
+and \fBNobuhiro Iwamatsu\fR <\&iwamatsu@debian.org\&>
+for the Debian project (but may be used by others).
