From 13a98709249b575154c3c532e7572fb9e3a938781aa886f03facd0e253735db2 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sun, 19 Jan 2014 20:42:03 +0000 Subject: [PATCH] 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 --- opencv-altivec-vector.patch | 25 +++++++++++++++++++++++++ opencv.changes | 6 ++++++ opencv.spec | 5 ++++- 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 opencv-altivec-vector.patch diff --git a/opencv-altivec-vector.patch b/opencv-altivec-vector.patch new file mode 100644 index 0000000..9253e4b --- /dev/null +++ b/opencv-altivec-vector.patch @@ -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 /* 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 diff --git a/opencv.changes b/opencv.changes index f39ebf2..8324a4b 100644 --- a/opencv.changes +++ b/opencv.changes @@ -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 diff --git a/opencv.spec b/opencv.spec index e6682e5..7d671d5 100644 --- a/opencv.spec +++ b/opencv.spec @@ -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