From dc75279b36f36b39e0e71084f04a052eb2f367a4f3f5881b2a3829f1ff5eb41a Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Wed, 7 Apr 2010 19:12:07 +0000 Subject: [PATCH] Accepting request 37230 from KDE:KDE4:Factory:Desktop Copy from KDE:KDE4:Factory:Desktop/opencv based on submit request 37230 from user coolo OBS-URL: https://build.opensuse.org/request/show/37230 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/opencv?expand=0&rev=4 --- libpng14.patch | 13 +++++++++++++ opencv.changes | 5 +++++ opencv.spec | 9 ++++++++- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 libpng14.patch diff --git a/libpng14.patch b/libpng14.patch new file mode 100644 index 0000000..82b48fd --- /dev/null +++ b/libpng14.patch @@ -0,0 +1,13 @@ +Index: OpenCV-2.0.0/src/highgui/grfmt_png.cpp +=================================================================== +--- OpenCV-2.0.0.orig/src/highgui/grfmt_png.cpp 2009-10-01 02:20:58.000000000 +0200 ++++ OpenCV-2.0.0/src/highgui/grfmt_png.cpp 2010-04-07 15:57:36.000000000 +0200 +@@ -223,7 +223,7 @@ bool PngDecoder::readData( Mat& img ) + png_set_palette_to_rgb( png_ptr ); + + if( m_color_type == PNG_COLOR_TYPE_GRAY && m_bit_depth < 8 ) +- png_set_gray_1_2_4_to_8( png_ptr ); ++ png_set_expand_gray_1_2_4_to_8( png_ptr ); + + if( CV_MAT_CN(m_type) > 1 && color ) + png_set_bgr( png_ptr ); // convert RGB to BGR diff --git a/opencv.changes b/opencv.changes index 58c51f5..7f3e8d3 100644 --- a/opencv.changes +++ b/opencv.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Apr 7 14:12:03 UTC 2010 - coolo@novell.com + +- fix build with libpng14 + ------------------------------------------------------------------- Thu Mar 18 06:33:27 UTC 2010 - coolo@novell.com diff --git a/opencv.spec b/opencv.spec index 996b4c0..3a6d392 100644 --- a/opencv.spec +++ b/opencv.spec @@ -22,7 +22,7 @@ Name: opencv %define libname lib%{name} %define soname 2 Version: 2.0.0 -Release: 2 +Release: 3 Summary: Collection of algorithms for computer vision Group: Development/Libraries License: BSD3c @@ -30,6 +30,7 @@ Url: http://%{name}.willowgarage.com/wiki/ Source0: http://downloads.sourceforge.net/project/%{name}library/%{name}-unix/2.0/OpenCV-%{version}.tar.bz2 Patch0: %{libname}-libdir.patch Patch1: %{libname}-samples.patch +Patch2: libpng14.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: gstreamer-0_10-devel libdc1394-devel libv4l-devel libxine-devel BuildRequires: gtk2-devel libjasper-devel libjpeg-devel libtiff-devel @@ -45,6 +46,7 @@ Computer Vision algorithms. %package -n %{libname}%{soname} + Summary: Development files for using the OpenCV library Group: Development/Libraries @@ -55,6 +57,7 @@ utilizes Intel Integrated Performance Primitives for better performance. %package -n %{libname}-devel + Summary: Development files for using the OpenCV library Group: Development/Libraries Requires: %{libname}%{soname} = %{version} @@ -67,6 +70,7 @@ use the OpenCV library. %package -n python-%{name} + Summary: Python bindings for apps which use OpenCV Group: Development/Libraries Requires: python-base @@ -76,6 +80,7 @@ This package contains Python bindings for the OpenCV library. %package -n python-%{name}-compat + Summary: Old Python bindings for apps which use OpenCV Group: Development/Libraries Requires: python-base @@ -85,6 +90,7 @@ This package contains the old Python bindings for the OpenCV library. %package -n %{name}-doc + Summary: Documentation and examples for OpenCV Group: Documentation # Since this package also contains examples that need -devel to be compiled @@ -97,6 +103,7 @@ This package contains the documentation and examples for the OpenCV library. %setup -qn OpenCV-%{version} %patch0 %patch1 +%patch2 -p1 # Windows specific and with wrong end of line %{__rm} -f doc/packaging.txt %{__chmod} +x samples/c/build_all.sh