Fix opencl dlopen (rfbz#5185)

el8
Leigh Scott 6 years ago
parent 6c49d5d14b
commit 61df5414f6

@ -0,0 +1,11 @@
--- a/common/opencl.c 2019-03-12 00:41:42.000000000 +0000
+++ b/common/opencl.c 2019-04-28 22:39:02.672147762 +0100
@@ -36,7 +36,7 @@
#if SYS_MACOSX
#define ocl_open dlopen( "/System/Library/Frameworks/OpenCL.framework/OpenCL", RTLD_NOW )
#else
-#define ocl_open dlopen( "libOpenCL.so", RTLD_NOW )
+#define ocl_open dlopen( "libOpenCL.so.1", RTLD_NOW )
#endif
#define ocl_close dlclose
#define ocl_address dlsym

@ -42,6 +42,7 @@ Patch0: x264-nover.patch
# add 10b suffix to high bit depth build # add 10b suffix to high bit depth build
Patch1: x264-10b.patch Patch1: x264-10b.patch
Patch10: x264-gpac.patch Patch10: x264-gpac.patch
Patch11: x264-opencl.patch
BuildRequires: gcc BuildRequires: gcc
%{!?_without_gpac:BuildRequires: gpac-devel-static zlib-devel openssl-devel libpng-devel libjpeg-devel} %{!?_without_gpac:BuildRequires: gpac-devel-static zlib-devel openssl-devel libpng-devel libjpeg-devel}
@ -65,6 +66,7 @@ This package contains the frontend.
%package libs %package libs
Summary: Library for encoding H264/AVC video streams Summary: Library for encoding H264/AVC video streams
Recommends: %{_libdir}/libOpenCL.so.1
%description libs %description libs
x264 is a free library for encoding H264/AVC video streams, written from x264 is a free library for encoding H264/AVC video streams, written from
@ -98,6 +100,7 @@ pushd %{name}-0.%{api}-%{snapshot}
%patch0 -p1 -b .nover %patch0 -p1 -b .nover
%patch1 -p1 -b .10b %patch1 -p1 -b .10b
%patch10 -p1 -b .gpac %patch10 -p1 -b .gpac
%patch11 -p1 -b .opencl
popd popd
variants="generic generic10" variants="generic generic10"

Loading…
Cancel
Save