summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-09-17 11:45:28 +0200
committerMichał Górny <mgorny@gentoo.org>2017-09-28 15:15:25 +0200
commit976533254cfbfd7d68036e0cf9ca17e137b540b6 (patch)
treeb22ae28e54b614069af3aaf14b47682b45ce294c /media-libs/mesa
parentmedia-libs/mesa: Fix LLVM dep to pull exactly one version (diff)
downloadgentoo-976533254cfbfd7d68036e0cf9ca17e137b540b6.tar.gz
gentoo-976533254cfbfd7d68036e0cf9ca17e137b540b6.tar.bz2
gentoo-976533254cfbfd7d68036e0cf9ca17e137b540b6.zip
media-libs/mesa: Add llvm_check_deps() to enable slot matching
Diffstat (limited to 'media-libs/mesa')
-rw-r--r--media-libs/mesa/mesa-9999.ebuild13
1 files changed, 13 insertions, 0 deletions
diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild
index 61bcd2822dbb..667956a123fe 100644
--- a/media-libs/mesa/mesa-9999.ebuild
+++ b/media-libs/mesa/mesa-9999.ebuild
@@ -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