From 1d19ad6ae47815606604032fa6d4f66115c73de6 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Jul 16 2009 10:56:36 +0000 Subject: - Build with gstreamer support - #491223 - Backport gcc43 fix from trunk --- diff --git a/opencv-1.1pre1-backport_gcc43.patch b/opencv-1.1pre1-backport_gcc43.patch new file mode 100644 index 0000000..e0d74a1 --- /dev/null +++ b/opencv-1.1pre1-backport_gcc43.patch @@ -0,0 +1,40 @@ +diff -up opencv-1.1.0/otherlibs/highgui/cvcap_xine.cpp.gcc43 opencv-1.1.0/otherlibs/highgui/cvcap_xine.cpp +--- opencv-1.1.0/otherlibs/highgui/cvcap_xine.cpp.gcc43 2008-05-03 20:20:57.000000000 +0200 ++++ opencv-1.1.0/otherlibs/highgui/cvcap_xine.cpp 2009-07-16 12:30:58.000000000 +0200 +@@ -784,7 +784,7 @@ public: + CvCaptureAVI_XINE_CPP() { captureXINE = 0; } + virtual ~CvCaptureAVI_XINE_CPP() { close(); } + +- virtual bool open( int index ); ++ virtual bool open( const char* filename ); + virtual void close(); + + virtual double getProperty(int); +@@ -796,10 +796,10 @@ protected: + CvCaptureAVI_XINE* captureXINE; + }; + +-bool CvCaptureAVI_XINE_CPP::open( int index ) ++bool CvCaptureAVI_XINE_CPP::open( const char* filename ) + { + close(); +- captureXINE = icvCaptureFromFile_XINE(index); ++ captureXINE = icvCaptureFromFile_XINE(filename); + return captureXINE != 0; + } + +@@ -832,11 +832,11 @@ + return captureXINE ? icvSetPropertyAVI_XINE( captureXINE, propId, value ) != 0 : false; + } + +-CvCapture* cvCreateCameraCapture_XINE( int index ) ++CvCapture* cvCreateFileCapture_XINE(const char* filename) + { + CvCaptureAVI_XINE_CPP* capture = new CvCaptureAVI_XINE_CPP; + +- if( capture->open( index )) ++ if( capture->open(filename)) + return capture; + + delete capture; + diff --git a/opencv.spec b/opencv.spec index c3843a1..aa0c0ab 100644 --- a/opencv.spec +++ b/opencv.spec @@ -3,7 +3,7 @@ Name: opencv Version: 1.1.0 -Release: 0.2.pre1%{?dist} +Release: 0.3.pre1%{?dist} Summary: Collection of algorithms for computer vision Group: Development/Libraries @@ -17,6 +17,7 @@ Patch1: opencv-1.1-nooptim.patch Patch2: opencv-1.1.0-pythondir.diff Patch3: opencv-1.1.0-conflicts.patch Patch4: opencv-1.1pre1-automake.patch +Patch5: opencv-1.1pre1-backport_gcc43.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libtool @@ -31,6 +32,8 @@ BuildRequires: swig >= 1.3.24, zlib-devel, pkgconfig BuildRequires: python-devel BuildRequires: python-imaging, numpy %{?_with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9} +%{!?_without_gstreamer:BuildRequires: gstreamer-devel} +%{?_with_xine:BuildRequires: xine-lib-devel} %description @@ -70,6 +73,7 @@ This package contains Python bindings for the OpenCV library. #autotools conflicts between AC_CONFIG_MACRO_DIR and AM_FLAGS %patch3 -p1 -b .conflicts %patch4 -p1 -b .automake +%patch5 -p1 -b .gcc43 #Renew the autotools (and remove rpath). @@ -78,6 +82,9 @@ autoreconf -vif %build export SWIG_PYTHON_LIBS=%{_libdir} %configure --disable-static --enable-apps \ + %{?_with_ffmpeg:--with-ffmpeg}%{!?_with_ffmpeg:--without-ffmpeg} \ + %{!?_without_gstreamer:--with-gstreamer} \ + %{?_with_xine:--with-xine --without-quicktime} \ %ifarch i386 i586 --disable-sse2 \ %endif @@ -148,6 +155,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jul 16 2009 kwizart < kwizart at gmail.com > - 1.1.0-0.3.pre1 +- Build with gstreamer support - #491223 +- Backport gcc43 fix from trunk + * Thu Jul 16 2009 kwizart < kwizart at gmail.com > - 1.1.0-0.2.pre1 - Fix FTBFS #511705