From 75205bab9d6c7551669998560a622431a16c70f4 Mon Sep 17 00:00:00 2001 From: q66 Date: Sat, 7 Dec 2019 15:03:14 +0100 Subject: [PATCH] opencv: unbreak on big endian altivec builds --- .../patches/undef-altivec-macros-cpp.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 srcpkgs/opencv/patches/undef-altivec-macros-cpp.patch diff --git a/srcpkgs/opencv/patches/undef-altivec-macros-cpp.patch b/srcpkgs/opencv/patches/undef-altivec-macros-cpp.patch new file mode 100644 index 00000000000..67dd2a7a6da --- /dev/null +++ b/srcpkgs/opencv/patches/undef-altivec-macros-cpp.patch @@ -0,0 +1,16 @@ +This is necessary because otherwise conflicts are introduced in C++ code that +includes this. The header itself does not rely on the macros. The issue is not +visible on little endian because they undef the macros somewhere else. + +--- 3rdparty/include/opencl/1.2/CL/cl_platform.h ++++ 3rdparty/include/opencl/1.2/CL/cl_platform.h +@@ -332,6 +332,9 @@ 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. */ ++ #undef vector ++ #undef pixel ++ #undef bool + typedef __vector unsigned char __cl_uchar16; + typedef __vector signed char __cl_char16; + typedef __vector unsigned short __cl_ushort8;