Skip to content

Commit

Permalink
blender: add patch that misses
Browse files Browse the repository at this point in the history
  • Loading branch information
Gottox committed Apr 20, 2021
1 parent bf3ccf4 commit 7763059
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions srcpkgs/blender/patches/altivec-all.patch
@@ -0,0 +1,32 @@
This applies a better workaround for C++ type conflicts
in AltiVec/C++, allowing it to build on BE ppc(64).

--- a/extern/clew/include/clew.h
+++ b/extern/clew/include/clew.h
@@ -370,15 +370,18 @@ typedef unsigned int cl_GLenum;

/* Define basic vector types */
/* Workaround for ppc64el platform: conflicts with bool from C++. */
-#if defined( __VEC__ ) && !(defined(__PPC64__) && defined(__LITTLE_ENDIAN__))
+#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;
+ #undef vector
+ #undef bool
+ #undef pixel
+ 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
2 changes: 1 addition & 1 deletion srcpkgs/blender/template
@@ -1,7 +1,7 @@
# Template file for 'blender'
pkgname=blender
version=2.92.0
revision=1
revision=2
archs="x86_64* ppc64*"
build_style="cmake"
pycompile_dirs="/usr/share/blender/${version%.*}/scripts"
Expand Down

0 comments on commit 7763059

Please sign in to comment.