[opencv] Some fix that doesn't prevent a FTBFS still

Nicolas Chauvet kwizart at fedoraproject.org
Thu Feb 3 16:59:21 UTC 2011


commit 6f18b86f652b1cdeb76614dc03d7b21d5feef018
Author: Nicolas Chauvet <kwizart at gmail.com>
Date:   Thu Feb 3 18:01:15 2011 +0100

    Some fix that doesn't prevent a FTBFS still

 OpenCV-2.2-gcc46.patch  |   11 +++++++++++
 OpenCV-2.2-nov4l1.patch |   13 +++++++++++++
 opencv.spec             |   14 +++++++++++++-
 3 files changed, 37 insertions(+), 1 deletions(-)
---
diff --git a/OpenCV-2.2-gcc46.patch b/OpenCV-2.2-gcc46.patch
new file mode 100644
index 0000000..c1ed29b
--- /dev/null
+++ b/OpenCV-2.2-gcc46.patch
@@ -0,0 +1,11 @@
+diff -up OpenCV-2.2.0/modules/core/include/opencv2/core/core.hpp.gcc46 OpenCV-2.2.0/modules/core/include/opencv2/core/core.hpp
+--- OpenCV-2.2.0/modules/core/include/opencv2/core/core.hpp.gcc46	2010-12-05 04:35:24.000000000 +0100
++++ OpenCV-2.2.0/modules/core/include/opencv2/core/core.hpp	2011-02-02 16:44:02.177243993 +0100
+@@ -52,6 +52,7 @@
+ #ifdef __cplusplus
+ 
+ #ifndef SKIP_INCLUDES
++#include <cstddef>
+ #include <limits.h>
+ #include <algorithm>
+ #include <cmath>
diff --git a/OpenCV-2.2-nov4l1.patch b/OpenCV-2.2-nov4l1.patch
new file mode 100644
index 0000000..3cedf72
--- /dev/null
+++ b/OpenCV-2.2-nov4l1.patch
@@ -0,0 +1,13 @@
+diff -up OpenCV-2.2.0/modules/highgui/src/cap_v4l.cpp.nov4l1 OpenCV-2.2.0/modules/highgui/src/cap_v4l.cpp
+--- OpenCV-2.2.0/modules/highgui/src/cap_v4l.cpp.nov4l1	2011-02-02 16:55:22.844244001 +0100
++++ OpenCV-2.2.0/modules/highgui/src/cap_v4l.cpp	2011-02-02 16:53:22.224244002 +0100
+@@ -214,7 +214,9 @@ make & enjoy!
+ #include <sys/types.h>
+ #include <sys/mman.h>
+ 
++#ifdef HAVE_LINUX_VIDEODEV_H
+ #include <linux/videodev.h>
++#endif
+ 
+ #include <string.h>
+ #include <stdlib.h>
diff --git a/opencv.spec b/opencv.spec
index 6c7724e..68bba8f 100644
--- a/opencv.spec
+++ b/opencv.spec
@@ -4,7 +4,7 @@
 
 Name:           opencv
 Version:        2.2.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Collection of algorithms for computer vision
 
 Group:          Development/Libraries
@@ -22,6 +22,8 @@ Patch3:         OpenCV-2.2-fixpc.patch
 # the cmake bump, if that's preferable -- Rex
 Patch4:         opencv-2.1.0-opencvconfig.patch
 Patch5:         OpenCV-2.2-numpy.patch
+Patch6:         OpenCV-2.2-gcc46.patch
+Patch7:         OpenCV-2.2-nov4l1.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  libtool
@@ -101,6 +103,8 @@ This package contains Python bindings for the OpenCV library.
 %patch3 -p1 -b .fixpc
 %patch4 -p1 -b .opencvconfig
 %patch5 -p1 -b .numpy
+%patch6 -p1 -b .gcc46
+%patch7 -p1 -b .nov4l1
 
 #Save some convant headers for now:
 cp -p 3rdparty/include/cblas.h 3rdparty
@@ -155,6 +159,9 @@ sed -i -e 's/ENABLE_SSE2 ON/ENABLE_SSE2 OFF/' CMakeLists.txt
  -DINSTALL_C_EXAMPLES=1 \
  -DINSTALL_PYTHON_EXAMPLES=1 \
  -DWITH_LAPACK=1 \
+%if 0%{?fedora} >= 15
+ -DWITH_V4L=0 \
+%endif
  .
 
 make VERBOSE=1 %{?_smp_mflags}
@@ -237,6 +244,11 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Wed Feb 02 2011 Nicolas Chauvet <kwizart at gmail.com> - 2.2.0-2
+- Fix with gcc46
+- Disable V4L as V4L1 is disabled for Fedora 15
+  This still needs work to escape from FTBFS
+
 * Thu Jan 06 2011 Nicolas Chauvet <kwizart at gmail.com> - 2.2.0-1
 - Update to 2.2.0
 - Disable -msse and -msse2 on x86_32


More information about the scm-commits mailing list