summaryrefslogtreecommitdiff
path: root/source/d/opencl-headers
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/opencl-headers')
-rwxr-xr-xsource/d/opencl-headers/opencl-headers.SlackBuild8
-rw-r--r--source/d/opencl-headers/opencl.no.pragma.for.default.version.diff11
2 files changed, 18 insertions, 1 deletions
diff --git a/source/d/opencl-headers/opencl-headers.SlackBuild b/source/d/opencl-headers/opencl-headers.SlackBuild
index 1b33a02b..130d860b 100755
--- a/source/d/opencl-headers/opencl-headers.SlackBuild
+++ b/source/d/opencl-headers/opencl-headers.SlackBuild
@@ -28,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=opencl-headers
VERSION=${VERSION:-$(echo OpenCL-Headers-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
PKGVER=${PKGVER:-2.2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
@@ -51,6 +51,12 @@ cd $TMP
rm -rf OpenCL-Headers-$VERSION
tar xvf $CWD/OpenCL-Headers-$VERSION.tar.?z* || exit 1
cd OpenCL-Headers-$VERSION || exit 1
+
+# Don't trigger "#pragma message" in cl_version.h when falling back on a default
+# version of OpenCL to target. Applications such as ffmpeg are detecting this as
+# an error and failing to compile:
+zcat $CWD/opencl.no.pragma.for.default.version.diff.gz | patch -p1 --verbose || exit 1
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff --git a/source/d/opencl-headers/opencl.no.pragma.for.default.version.diff b/source/d/opencl-headers/opencl.no.pragma.for.default.version.diff
new file mode 100644
index 00000000..725012b1
--- /dev/null
+++ b/source/d/opencl-headers/opencl.no.pragma.for.default.version.diff
@@ -0,0 +1,11 @@
+--- ./CL/cl_version.h.orig 2019-01-17 12:40:56.000000000 -0600
++++ ./CL/cl_version.h 2019-02-06 15:22:44.022548935 -0600
+@@ -31,7 +31,7 @@
+
+ /* Detect which version to target */
+ #if !defined(CL_TARGET_OPENCL_VERSION)
+-#pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)")
++/* #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)") */
+ #define CL_TARGET_OPENCL_VERSION 220
+ #endif
+ #if CL_TARGET_OPENCL_VERSION != 100 && \