virtual/opencl: updates for amdgpu and i965 providers
authorMarek Szuba <marecki@gentoo.org>
Wed, 10 Jul 2019 18:05:44 +0000 (19:05 +0100)
committerMarek Szuba <marecki@gentoo.org>
Wed, 10 Jul 2019 18:07:20 +0000 (19:07 +0100)
Committed with the maintainers' approval. Changes:
1. Remove ABI constraints on dev-libs/amdgpu-pro-opencl - it now both
   supports amd64 multilib and has been keyworded for x86;
2. For amd64 users with no need for 32-bit multilib the preferred OpenCL
   provider is now dev-libs/intel-neo - it is more modern and faster,
   moreover dev-libs/beignet has been deprecated upstream in favour of
   NEO for systems which support the latter (i.e. native amd64
   on Skylake and up);
3. Move the Beignet/NEO dependency ahead of the media-libs/mesa[opencl]
   dependency - Mesa only provides OpenCL support to Gallium-based
   drivers and i965 doesn't use Gallium at all.

Closes: https://bugs.gentoo.org/686964
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Package-Manager: Portage-2.3.66, Repoman-2.3.11

virtual/opencl/opencl-1.ebuild [new file with mode: 0644]

diff --git a/virtual/opencl/opencl-1.ebuild b/virtual/opencl/opencl-1.ebuild
new file mode 100644 (file)
index 0000000..1edfbbc
--- /dev/null
@@ -0,0 +1,25 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib-build
+
+DESCRIPTION="Virtual for OpenCL implementations"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+CARDS=( amdgpu i965 nvidia )
+IUSE="${CARDS[@]/#/video_cards_}"
+
+# intel-neo and intel-ocl-sdk are amd64-only
+RDEPEND="app-eselect/eselect-opencl
+       || (
+               video_cards_i965? ( || (
+                       abi_x86_64? ( !abi_x86_32? ( dev-libs/intel-neo ) )
+                       dev-libs/beignet ) )
+               >=media-libs/mesa-9.1.6[opencl,${MULTILIB_USEDEP}]
+               video_cards_amdgpu? ( dev-libs/amdgpu-pro-opencl )
+               video_cards_nvidia? (
+                       >=x11-drivers/nvidia-drivers-290.10-r2[uvm] )
+               abi_x86_64? ( !abi_x86_32? ( dev-util/intel-ocl-sdk ) )
+       )"