Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libclc/
Date: Sun, 01 Nov 2020 07:52:23
Message-Id: 1604216821.acedf744a78fc5cb3f32ca094d115f4726d49030.mgorny@gentoo
1 commit: acedf744a78fc5cb3f32ca094d115f4726d49030
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 1 07:35:03 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 1 07:47:01 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=acedf744
7
8 dev-libs/libclc: Bump to 0.2.0_pre20201001 snapshot
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-libs/libclc/Manifest | 1 +
13 dev-libs/libclc/libclc-0.2.0_pre20201001.ebuild | 53 +++++++++++++++++++++++++
14 2 files changed, 54 insertions(+)
15
16 diff --git a/dev-libs/libclc/Manifest b/dev-libs/libclc/Manifest
17 index 8df1eab8716..e0e25709507 100644
18 --- a/dev-libs/libclc/Manifest
19 +++ b/dev-libs/libclc/Manifest
20 @@ -1 +1,2 @@
21 DIST libclc-0.2.0_pre20191024.tar.xz 128628 BLAKE2B dc750725ee48456e3678cb4f730cc889045ff7401c4b40ac3ae9b656da9fe429aa2094c2042a18eda4f7e87c786ff8ae121fbf726a18de03884f30dad48b3fa1 SHA512 b4c2ca980fb28b5662055bea951de844284fcf122695234d7618439234f0203baf82b5cc5cf8acddfe387f19d32be3a958e53511bb1e33e9469f6be5951dbcdb
22 +DIST libclc-0.2.0_pre20201001.tar.xz 122180 BLAKE2B 8587c5b29d517a6c54a927b529f7e5651f154785e4299ad6b90007bdbae19ffccea75ec873a308b9a025effbb6316f91e70f82af19cdcdaad87c4f1af2595f78 SHA512 1fc10fcd6163991fe3ce474351d07f892a628fbd4e4cfb9ea96f1288db421b7be87c1f818593bea7409e7a17a5fd4c84a07a88f5c3d998ef97ac0425970abf4d
23
24 diff --git a/dev-libs/libclc/libclc-0.2.0_pre20201001.ebuild b/dev-libs/libclc/libclc-0.2.0_pre20201001.ebuild
25 new file mode 100644
26 index 00000000000..16eb2901cc6
27 --- /dev/null
28 +++ b/dev-libs/libclc/libclc-0.2.0_pre20201001.ebuild
29 @@ -0,0 +1,53 @@
30 +# Copyright 1999-2020 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +PYTHON_COMPAT=( python3_{6..9} )
35 +
36 +inherit cmake llvm prefix python-any-r1 toolchain-funcs
37 +
38 +DESCRIPTION="OpenCL C library"
39 +HOMEPAGE="https://libclc.llvm.org/"
40 +# libclc subdir of https://github.com/llvm/llvm-project.git
41 +SRC_URI="https://dev.gentoo.org/~mgorny/dist/${P}.tar.xz"
42 +
43 +LICENSE="Apache-2.0-with-LLVM-exceptions || ( MIT BSD )"
44 +SLOT="0"
45 +KEYWORDS="~amd64 ~x86"
46 +IUSE_VIDEO_CARDS="video_cards_nvidia video_cards_r600 video_cards_radeonsi"
47 +IUSE="${IUSE_VIDEO_CARDS}"
48 +REQUIRED_USE="|| ( ${IUSE_VIDEO_CARDS} )"
49 +
50 +BDEPEND="
51 + || (
52 + sys-devel/clang:12
53 + sys-devel/clang:11
54 + sys-devel/clang:10
55 + sys-devel/clang:9
56 + )
57 + ${PYTHON_DEPS}"
58 +
59 +llvm_check_deps() {
60 + has_version -b "sys-devel/clang:${LLVM_SLOT}"
61 +}
62 +
63 +pkg_setup() {
64 + # we do not need llvm_pkg_setup
65 + python-any-r1_pkg_setup
66 +}
67 +
68 +src_configure() {
69 + local libclc_targets=()
70 +
71 + use video_cards_nvidia && libclc_targets+=("nvptx--" "nvptx64--" "nvptx--nvidiacl" "nvptx64--nvidiacl")
72 + use video_cards_r600 && libclc_targets+=("r600--")
73 + use video_cards_radeonsi && libclc_targets+=("amdgcn--" "amdgcn-mesa-mesa3d" "amdgcn--amdhsa")
74 + # TODO: spirv
75 + [[ ${#libclc_targets[@]} ]] || die "libclc target missing!"
76 +
77 + local mycmakeargs=(
78 + -DLIBCLC_TARGETS_TO_BUILD="${libclc_targets[*]}"
79 + -DLLVM_CONFIG="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
80 + )
81 + cmake_src_configure
82 +}