diff options
author | Jan Vesely <jano.vesely@gmail.com> | 2018-06-10 15:02:48 -0400 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2018-06-14 16:32:12 +0200 |
commit | f60fa1adf7f70561409f47dc241519b3e8b22fd4 (patch) | |
tree | b47fc3f02a2c50293ee99905a06571854ed076ca /dev-libs/libclc | |
parent | dev-libs/libclc: Add 0.2.0_pre20180610 snapshot (diff) | |
download | gentoo-f60fa1adf7f70561409f47dc241519b3e8b22fd4.tar.gz gentoo-f60fa1adf7f70561409f47dc241519b3e8b22fd4.tar.bz2 gentoo-f60fa1adf7f70561409f47dc241519b3e8b22fd4.zip |
dev-libs/libclc: Make use of VIDEO_CARDS use flags
Drop runtime depend on clang.
Closes: https://bugs.gentoo.org/603454
Diffstat (limited to 'dev-libs/libclc')
-rw-r--r-- | dev-libs/libclc/libclc-0.2.0_pre20180610.ebuild | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/dev-libs/libclc/libclc-0.2.0_pre20180610.ebuild b/dev-libs/libclc/libclc-0.2.0_pre20180610.ebuild index ee4e3e25904f..41bd87a99224 100644 --- a/dev-libs/libclc/libclc-0.2.0_pre20180610.ebuild +++ b/dev-libs/libclc/libclc-0.2.0_pre20180610.ebuild @@ -31,17 +31,18 @@ fi LICENSE="|| ( MIT BSD )" SLOT="0" KEYWORDS="~amd64 ~arm64 ~x86" -IUSE="" +IUSE_VIDEO_CARDS="video_cards_nvidia video_cards_r600 video_cards_radeonsi" +IUSE="${IUSE_VIDEO_CARDS}" +REQUIRED_USE="|| ( ${IUSE_VIDEO_CARDS} )" -RDEPEND=" +DEPEND=" || ( sys-devel/clang:7 sys-devel/clang:6 sys-devel/clang:5 sys-devel/clang:4 >=sys-devel/clang-3.9:0 - )" -DEPEND="${RDEPEND} + ) ${PYTHON_DEPS}" LLVM_MAX_SLOT=7 @@ -63,10 +64,18 @@ pkg_setup() { } src_configure() { + local libclc_targets=() + + use video_cards_nvidia && libclc_targets+=("nvptx--" "nvptx64--" "nvptx--nvidiacl" "nvptx64--nvidiacl") + use video_cards_r600 && libclc_targets+=("r600--") + use video_cards_radeonsi && libclc_targets+=("amdgcn--" "amdgcn-mesa-mesa3d" "amdgcn--amdhsa") + + [[ ${#libclc_targets[@]} ]] || die "libclc target missing!" + ./configure.py \ --with-cxx-compiler="$(tc-getCXX)" \ --with-llvm-config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config" \ - --prefix="${EPREFIX}/usr" || die + --prefix="${EPREFIX}/usr" "${libclc_targets[@]}" || die } src_compile() { |