summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2020-04-04 22:38:36 +0100
committerMarek Szuba <marecki@gentoo.org>2020-04-08 15:44:45 +0100
commit5c96095946f50914c26b4b6507c93dc8c81b3650 (patch)
tree5aeab8b2c81b6d9a832ba2cb788cc85e03ffef63 /virtual/opencl
parentnet-misc/axel: clean up of old versions. (diff)
downloadgentoo-5c96095946f50914c26b4b6507c93dc8c81b3650.tar.gz
gentoo-5c96095946f50914c26b4b6507c93dc8c81b3650.tar.bz2
gentoo-5c96095946f50914c26b4b6507c93dc8c81b3650.zip
virtual/opencl: new version
One, instead of pulling in various OpenCL runtimes, only depend on an OpenCL ICD loader (dev-libs/ocl-icd, with dev-libs/opencl-icd-loader to be added later) in order to provide hardware-independent header files and libraries for OpenCL-aware software to build against. Actual runtimes are now simply suggested to the user via a postinst message / README.gentoo file. Two, do not depend on eselect-opencl either - both ICD loaders pull in their own OpenCL headers so there is no need to depend on the legacy headers provided by this package, and for being able to switch to a specific loader it is enough for loaders themselves to depend on this. Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'virtual/opencl')
-rw-r--r--virtual/opencl/files/README.gentoo18
-rw-r--r--virtual/opencl/opencl-3.ebuild25
2 files changed, 43 insertions, 0 deletions
diff --git a/virtual/opencl/files/README.gentoo b/virtual/opencl/files/README.gentoo
new file mode 100644
index 000000000000..aa2dc0ef5190
--- /dev/null
+++ b/virtual/opencl/files/README.gentoo
@@ -0,0 +1,18 @@
+In order to take advantage of OpenCL you will need a runtime for your hardware.
+Currently included in Gentoo are:
+
+ * open:
+ - dev-libs/intel-neo - integrated Intel GPUs from Broadwell onwards. 64-bit only;
+ - dev-libs/rocm-opencl-runtime - AMD GPUs supported by the amdgpu kernel driver.
+ Image support still requires a proprietary extension [1]. 64-bit only;
+ - media-libs/mesa[opencl] - some older AMD GPUs; see [2]. 32-bit support;
+
+ * proprietary:
+ - dev-libs/amdgpu-pro-opencl - AMD Polaris GPUs. 32-bit support;
+ - dev-util/intel-ocl-sdk - Intel CPUs (*not* GPUs). 64-bit only;
+ - x11-drivers/nvidia-drivers[uvm] - Nvidia GPUs; specific package versions
+ required for older devices [3]. 32-bit support.
+
+ [1] dev-libs/hsa-ext-rocr
+ [2] https://dri.freedesktop.org/wiki/GalliumCompute/
+ [3] https://www.nvidia.com/en-us/drivers/unix/legacy-gpu/
diff --git a/virtual/opencl/opencl-3.ebuild b/virtual/opencl/opencl-3.ebuild
new file mode 100644
index 000000000000..6268723a166f
--- /dev/null
+++ b/virtual/opencl/opencl-3.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib-build readme.gentoo-r1
+
+DESCRIPTION="Virtual for OpenCL API"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+# Will add dev-libs/opencl-icd-loader here as an alternative once all potential
+# file collisions with eselect-opencl have been resolved
+RDEPEND="dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}]"
+
+# so that src_install() doesn't fail on missing directory
+S="${WORKDIR}"
+
+src_install() {
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}