media-libs/mesa: Replace vulkan REQUIRED_USE with pkg_pretend()
authorMatt Turner <mattst88@gentoo.org>
Wed, 29 Apr 2020 17:35:51 +0000 (10:35 -0700)
committerMatt Turner <mattst88@gentoo.org>
Wed, 29 Apr 2020 17:37:25 +0000 (10:37 -0700)
Ignore USE=vulkan if no supported VIDEO_CARDS are set, like we do with
other USE flags.

Signed-off-by: Matt Turner <mattst88@gentoo.org>
media-libs/mesa/mesa-20.0.5.ebuild
media-libs/mesa/mesa-9999.ebuild

index 85944a36141eaa2ba0c7216a2777b317e32a3e4b..0bd61593e8deff3493c6fb7a3c3107f649c109a4 100644 (file)
@@ -44,7 +44,6 @@ REQUIRED_USE="
        gles1?  ( egl )
        gles2?  ( egl )
        vulkan? ( dri3
-                         || ( video_cards_i965 video_cards_iris video_cards_radeonsi )
                          video_cards_radeonsi? ( llvm ) )
        vulkan-overlay? ( vulkan )
        wayland? ( egl gbm )
@@ -260,6 +259,14 @@ llvm_check_deps() {
 }
 
 pkg_pretend() {
+       if use vulkan; then
+               if ! use video_cards_i965 &&
+                  ! use video_cards_iris &&
+                  ! use video_cards_radeonsi; then
+                       ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain i965, irisi, or radeonsi"
+               fi
+       fi
+
        if use opencl; then
                if ! use video_cards_r600 &&
                   ! use video_cards_radeonsi; then
index 59a1d4fc57ca58c7b13c970531027266e8966bd9..800cbffbe700696acce0cae409f4034da378225e 100644 (file)
@@ -44,7 +44,6 @@ REQUIRED_USE="
        gles1?  ( egl )
        gles2?  ( egl )
        vulkan? ( dri3
-                         || ( video_cards_i965 video_cards_iris video_cards_radeonsi )
                          video_cards_radeonsi? ( llvm ) )
        vulkan-overlay? ( vulkan )
        wayland? ( egl gbm )
@@ -261,6 +260,14 @@ llvm_check_deps() {
 }
 
 pkg_pretend() {
+       if use vulkan; then
+               if ! use video_cards_i965 &&
+                  ! use video_cards_iris &&
+                  ! use video_cards_radeonsi; then
+                       ewarn "Ignoring USE=vulkan     since VIDEO_CARDS does not contain i965, irisi, or radeonsi"
+               fi
+       fi
+
        if use opencl; then
                if ! use video_cards_r600 &&
                   ! use video_cards_radeonsi; then