media-libs/mesa: Add llvm_check_deps() to enable slot matching
authorMichał Górny <mgorny@gentoo.org>
Sun, 17 Sep 2017 09:45:28 +0000 (11:45 +0200)
committerMichał Górny <mgorny@gentoo.org>
Thu, 28 Sep 2017 13:15:25 +0000 (15:15 +0200)
media-libs/mesa/mesa-9999.ebuild

index 61bcd2822dbb81a495ae6bec5a3604d0543320b6..667956a123fecf67b8021e0584a5741c1e7f202b 100644 (file)
@@ -231,6 +231,19 @@ x86? (
        )
 )"
 
+llvm_check_deps() {
+       local flags=${MULTILIB_USEDEP}
+       if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
+       then
+               flags+=",llvm_targets_AMDGPU(-)"
+       fi
+
+       if use opencl; then
+               has_version "sys-devel/clang[${flags}]" || return 1
+       fi
+       has_version "sys-devel/llvm[${flags}]"
+}
+
 pkg_setup() {
        # warning message for bug 459306
        if use llvm && has_version sys-devel/llvm[!debug=]; then