summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2016-11-28 14:55:34 +0100
committerMarek Szuba <marecki@gentoo.org>2016-11-28 14:57:46 +0100
commit3677ef1db84606d689bea66d9212ed2cd3346d62 (patch)
treeea1c7300be772f121f11b44601f7ce77d377ec6e /dev-libs/beignet/files
parentkde-base/libkworkspace -> kde-plasma/libkworkspace (diff)
downloadgentoo-3677ef1db84606d689bea66d9212ed2cd3346d62.tar.gz
gentoo-3677ef1db84606d689bea66d9212ed2cd3346d62.tar.bz2
gentoo-3677ef1db84606d689bea66d9212ed2cd3346d62.zip
dev-libs/beignet: fix detection of OCL ICD and installation of ICD files
In the past, Beignet CMake scripts would automatically enable its compatibility with the OCL ICD Loader depending on whether dev-libs/ocl-icd was found in the system or not. Patch the scripts so that ocl-icd is only searched for if an appropriate option is set, and define a local use flag which controls the value of this option (and of course the dependency on dev-libs/ocl-icd). Nb. the patch has been submitted upstream. Moreover, given we always install Beignet ICD files (they are needed by eselect-opencl) do not install another copy when OCL ICD Loader has been enabled. Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=599512 Package-Manager: portage-2.3.2
Diffstat (limited to 'dev-libs/beignet/files')
-rw-r--r--dev-libs/beignet/files/beignet-1.2.1-oclicd_optional_gentoo.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/dev-libs/beignet/files/beignet-1.2.1-oclicd_optional_gentoo.patch b/dev-libs/beignet/files/beignet-1.2.1-oclicd_optional_gentoo.patch
new file mode 100644
index 000000000000..89fed3308768
--- /dev/null
+++ b/dev-libs/beignet/files/beignet-1.2.1-oclicd_optional_gentoo.patch
@@ -0,0 +1,23 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -223,17 +223,15 @@
+ # MESSAGE(STATUS "Looking for mesa source code - not found, cl_khr_gl_sharing will be disabled.")
+ #ENDIF(MESA_SOURCE_FOUND)
+
++OPTION(OCLICD_COMPAT "OCL ICD compatibility mode" ON)
++IF(OCLICD_COMPAT)
+ Find_Package(OCLIcd)
+ IF(OCLIcd_FOUND)
+ MESSAGE(STATUS "Looking for OCL ICD header file - found")
+- configure_file (
+- "intel-beignet.icd.in"
+- "${ICD_FILE_NAME}"
+- )
+- install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${ICD_FILE_NAME} DESTINATION /etc/OpenCL/vendors)
+ ELSE(OCLIcd_FOUND)
+ MESSAGE(STATUS "Looking for OCL ICD header file - not found")
+ ENDIF(OCLIcd_FOUND)
++ENDIF(OCLICD_COMPAT)
+
+ Find_Package(PythonInterp)
+