From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3C1A51396D0 for ; Thu, 28 Sep 2017 13:19:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 804942BC00E; Thu, 28 Sep 2017 13:19:17 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4FE5A2BC00E for ; Thu, 28 Sep 2017 13:19:17 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4C3FD34170F for ; Thu, 28 Sep 2017 13:19:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 68EEB909A for ; Thu, 28 Sep 2017 13:19:13 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1506604583.135bd0f4429ba1508b7bbf47ffabfc6f3de238ee.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/mesa/mesa-17.2.1.ebuild X-VCS-Directories: media-libs/mesa/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 135bd0f4429ba1508b7bbf47ffabfc6f3de238ee X-VCS-Branch: master Date: Thu, 28 Sep 2017 13:19:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: e740a2f2-9f5f-4d71-9c78-e1cb9be946c1 X-Archives-Hash: 97d90fcf16d883dd4201e2abfd008046 commit: 135bd0f4429ba1508b7bbf47ffabfc6f3de238ee Author: Michał Górny gentoo org> AuthorDate: Thu Sep 28 13:16:23 2017 +0000 Commit: Michał Górny gentoo org> CommitDate: Thu Sep 28 13:16:23 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=135bd0f4 media-libs/mesa: Backport LLVM dep fixes to 17.2.1 media-libs/mesa/mesa-17.2.1.ebuild | 103 ++++++++++++++++++++++++++++++++----- 1 file changed, 89 insertions(+), 14 deletions(-) diff --git a/media-libs/mesa/mesa-17.2.1.ebuild b/media-libs/mesa/mesa-17.2.1.ebuild index f54779f9572..2b6f32728db 100644 --- a/media-libs/mesa/mesa-17.2.1.ebuild +++ b/media-libs/mesa/mesa-17.2.1.ebuild @@ -97,7 +97,6 @@ RDEPEND=" llvm? ( video_cards_radeonsi? ( virtual/libelf:0=[${MULTILIB_USEDEP}] - vulkan? ( >=sys-devel/llvm-3.9.0:=[${MULTILIB_USEDEP}] ) ) video_cards_r600? ( virtual/libelf:0=[${MULTILIB_USEDEP}] @@ -105,7 +104,6 @@ RDEPEND=" video_cards_radeon? ( virtual/libelf:0=[${MULTILIB_USEDEP}] ) - >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}] ) opencl? ( app-eselect/eselect-opencl @@ -139,20 +137,84 @@ RDEPEND="${RDEPEND} video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) " -# FIXME: kill the sys-devel/llvm[video_cards_radeon] compat once -# LLVM < 3.9 is out of the game -DEPEND="${RDEPEND} - ${PYTHON_DEPS} +# Please keep the LLVM dependency block separate. Since LLVM is slotted, +# we need to *really* make sure we're not pulling one than more slot +# simultaneously. +# +# How to use it: +# 1. List all the working slots (with min versions) in ||, newest first. +# 2. Update the := to specify *max* version, e.g. < 7. +# 3. Specify LLVM_MAX_SLOT, e.g. 6. +LLVM_DEPSTR=" + || ( + sys-devel/llvm:6[${MULTILIB_USEDEP}] + sys-devel/llvm:5[${MULTILIB_USEDEP}] + sys-devel/llvm:4[${MULTILIB_USEDEP}] + >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] + ) + sys-devel/llvm:=[${MULTILIB_USEDEP}] +" +LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} +CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} +CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]} +RDEPEND="${RDEPEND} llvm? ( - video_cards_radeonsi? ( || ( - sys-devel/llvm[llvm_targets_AMDGPU] - sys-devel/llvm[video_cards_radeon] - ) ) + opencl? ( + video_cards_r600? ( + ${CLANG_DEPSTR_AMDGPU} + ) + !video_cards_r600? ( + video_cards_radeonsi? ( + ${CLANG_DEPSTR_AMDGPU} + ) + ) + !video_cards_r600? ( + !video_cards_radeonsi? ( + video_cards_radeon? ( + ${CLANG_DEPSTR_AMDGPU} + ) + ) + ) + !video_cards_r600? ( + !video_cards_radeon? ( + !video_cards_radeonsi? ( + ${CLANG_DEPSTR} + ) + ) + ) + ) + !opencl? ( + video_cards_r600? ( + ${LLVM_DEPSTR_AMDGPU} + ) + !video_cards_r600? ( + video_cards_radeonsi? ( + ${LLVM_DEPSTR_AMDGPU} + ) + ) + !video_cards_r600? ( + !video_cards_radeonsi? ( + video_cards_radeon? ( + ${LLVM_DEPSTR_AMDGPU} + ) + ) + ) + !video_cards_r600? ( + !video_cards_radeon? ( + !video_cards_radeonsi? ( + ${LLVM_DEPSTR} + ) + ) + ) + ) ) +" +unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} + +DEPEND="${RDEPEND} + ${PYTHON_DEPS} opencl? ( - >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}] - >=sys-devel/clang-3.6.0:=[${MULTILIB_USEDEP}] - >=sys-devel/gcc-4.6 + >=sys-devel/gcc-4.6 ) sys-devel/gettext virtual/pkgconfig @@ -187,6 +249,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 @@ -194,7 +269,7 @@ pkg_setup() { ewarn "detected! This can cause problems. For details, see bug 459306." fi - if use llvm || use opencl; then + if use llvm; then llvm_pkg_setup fi python-any-r1_pkg_setup