Accepting request 214181 from KDE:Extra

- Fix build with altivec:
  opencv-altivec-vector.patch (forwarded request 214130 from k0da)

OBS-URL: https://build.opensuse.org/request/show/214181
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/opencv?expand=0&rev=48
This commit is contained in:
Stephan Kulow 2014-01-19 20:42:03 +00:00 committed by Git OBS Bridge
parent 2b1552364b
commit 13a9870924
3 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,25 @@
Index: opencv-2.4.7/3rdparty/include/opencl/1.2/CL/cl_platform.h
===================================================================
--- opencv-2.4.7.orig/3rdparty/include/opencl/1.2/CL/cl_platform.h
+++ opencv-2.4.7/3rdparty/include/opencl/1.2/CL/cl_platform.h
@@ -332,13 +332,13 @@ typedef unsigned int cl_GLenum;
/* Define basic vector types */
#if defined( __VEC__ )
#include <altivec.h> /* may be omitted depending on compiler. AltiVec spec provides no way to detect whether the header is required. */
- typedef vector unsigned char __cl_uchar16;
- typedef vector signed char __cl_char16;
- typedef vector unsigned short __cl_ushort8;
- typedef vector signed short __cl_short8;
- typedef vector unsigned int __cl_uint4;
- typedef vector signed int __cl_int4;
- typedef vector float __cl_float4;
+ typedef __vector unsigned char __cl_uchar16;
+ typedef __vector signed char __cl_char16;
+ typedef __vector unsigned short __cl_ushort8;
+ typedef __vector signed short __cl_short8;
+ typedef __vector unsigned int __cl_uint4;
+ typedef __vector signed int __cl_int4;
+ typedef __vector float __cl_float4;
#define __CL_UCHAR16__ 1
#define __CL_CHAR16__ 1
#define __CL_USHORT8__ 1

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jan 16 17:11:21 UTC 2014 - dvlaeev@suse.com
- Fix build with altivec:
opencv-altivec-vector.patch
-------------------------------------------------------------------
Sun Dec 1 17:37:36 UTC 2013 - hrvoje.senjan@gmail.com

View File

@ -1,7 +1,7 @@
#
# spec file for package opencv
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -37,7 +37,9 @@ Patch2: %{name}-underlinking.patch
Patch3: improve-sphinx-search.diff
# PATCH-FIX-UPSTREAM opencv-pkgconfig.patch -- Make sure to provide link flags in OpenCV pc file (bnc#853036). Issue is exposed when e.g. a project relies on
# getting opencv vars via pc (first), and then via CMake, as is the case with nomacs
# PATCH-FIX-UPSTREAM opencv-altivec-vector.patch -- use __vector for altivec. https://github.com/Itseez/opencv/pull/2157
Patch4: opencv-pkgconfig.patch
Patch5: opencv-altivec-vector.patch
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gstreamer-0_10-plugins-base-devel
@ -124,6 +126,7 @@ This package contains the documentation and examples for the OpenCV library.
%patch2 -p1
%patch3 -p0
%patch4 -p1
%patch5 -p1
# Remove Windows specific files
rm -f doc/packaging.txt