mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-16 22:27:02 +02:00
darktable: enable opencl on ppc
[ci skip]
This commit is contained in:
parent
3c052ea7dd
commit
fbaa28bd91
2 changed files with 37 additions and 1 deletions
37
srcpkgs/darktable/patches/altivec.patch
Normal file
37
srcpkgs/darktable/patches/altivec.patch
Normal file
|
@ -0,0 +1,37 @@
|
|||
This fixes compilation on ppc with opencl on. Prevent opencl
|
||||
headers from defining keywords as macros which would conflict
|
||||
with C++ keywords as well as C99 keyword macro bool.
|
||||
|
||||
--- src/external/CL/cl_platform.h
|
||||
+++ src/external/CL/cl_platform.h
|
||||
@@ -275,14 +275,23 @@ typedef unsigned int cl_GLenum;
|
||||
|
||||
/* Define basic vector types */
|
||||
#if defined( __VEC__ )
|
||||
+ #ifndef __APPLE_ALTIVEC__
|
||||
+ /* prevent gcc from defining the keywords as macros
|
||||
+ * do not manually undef for c99 stdbool.h compat
|
||||
+ */
|
||||
+ #define __APPLE_ALTIVEC__ 1
|
||||
+ #include <altivec.h>
|
||||
+ #undef __APPLE_ALTIVEC__
|
||||
+ #else
|
||||
#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;
|
||||
+ #endif
|
||||
+ 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
|
|
@ -25,6 +25,5 @@ distfiles="https://github.com/darktable-org/darktable/releases/download/release-
|
|||
checksum=a518999c8458472edfc04577026ce5047d74553052af0f52d10ba8ce601b78f0
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
ppc64le*) configure_args+=" -DUSE_OPENCL=OFF" ;;
|
||||
aarch64*) broken="https://build.voidlinux.org/builders/aarch64_builder/builds/22479/steps/shell_3/logs/stdio" ;;
|
||||
esac
|
||||
|
|
Loading…
Add table
Reference in a new issue