From 258f9a0aeda7ae633533d001dc1a5581f87d2c4d Mon Sep 17 00:00:00 2001 From: Karel Klíč Date: Mar 09 2010 09:44:42 +0000 Subject: re-enable testing on CMake build system fix memory corruption in the gaussian random number generator --- diff --git a/opencv-2.0.0-gaussianrng.patch b/opencv-2.0.0-gaussianrng.patch new file mode 100644 index 0000000..38ca720 --- /dev/null +++ b/opencv-2.0.0-gaussianrng.patch @@ -0,0 +1,11 @@ +--- trunk/opencv/src/cxcore/cxrand.cpp 2009/11/13 13:53:03 2281 ++++ trunk/opencv/src/cxcore/cxrand.cpp 2009/11/13 14:55:04 2282 +@@ -303,7 +303,7 @@ + { + const float r = 3.442620f; // The start of the right tail + const float rng_flt = 2.3283064365386962890625e-10f; // 2^-32 +- static unsigned kn[127]; ++ static unsigned kn[128]; + static float wn[128], fn[128]; + uint64 temp = *state; + static bool initialized=false; diff --git a/opencv.spec b/opencv.spec index 45dbadb..d70fc32 100644 --- a/opencv.spec +++ b/opencv.spec @@ -4,7 +4,7 @@ Name: opencv Version: 2.0.0 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Collection of algorithms for computer vision Group: Development/Libraries @@ -15,6 +15,9 @@ Source0: http://prdownloads.sourceforge.net/opencvlibrary/%{tar_name}-%{v Source1: opencv-samples-Makefile # Fedora cmake macros define -DLIB_SUFFIX=64 on 64 bits platforms Patch0: opencv-cmake-libdir.patch +# Fixes memory corruption in the gaussian random number generator. +# Fixed in the revision 2282 of the upstream svn repository. +Patch1: opencv-2.0.0-gaussianrng.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libtool @@ -82,6 +85,7 @@ This package contains Python bindings for the OpenCV library. %prep %setup -q -n %{tar_name}-%{version} %patch0 -p1 +%patch1 -p2 -b .gaussianrng %build @@ -129,8 +133,9 @@ rm -rf $RPM_BUILD_ROOT%{_datadir}/opencv/{doc/,samples/octave/} %check # Check fails since we don't support most video # read/write capability and we don't provide a display +# ARGS=-V increases output verbosity %ifnarch ppc64 - make check || : + LD_LIBRARY_PATH=%{_builddir}/%{tar_name}-%{version}/lib:$LD_LIBARY_PATH make test ARGS=-V || : %endif %clean @@ -179,6 +184,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Mar 08 2010 Karel Klic - 2.0.0-8 +- re-enable testing on CMake build system +- fix memory corruption in the gaussian random number generator + * Sat Feb 27 2010 Haïkel Guémar - 2.0.0-7 - replaced BR unicap-devel by libucil-devel (unicap split)