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: Sat, 06 Nov 2021 19:29:17
Message-Id: 1636226945.3283cd5cc3fa2d425261243f21d196a55b20f4c1.mgorny@gentoo
1 commit: 3283cd5cc3fa2d425261243f21d196a55b20f4c1
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Nov 6 19:22:56 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 6 19:29:05 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3283cd5c
7
8 dev-libs/libclc: Add 13.0.0.9999 live ebuild
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-libs/libclc/libclc-13.0.0.9999.ebuild | 67 +++++++++++++++++++++++++++++++
13 1 file changed, 67 insertions(+)
14
15 diff --git a/dev-libs/libclc/libclc-13.0.0.9999.ebuild b/dev-libs/libclc/libclc-13.0.0.9999.ebuild
16 new file mode 100644
17 index 00000000000..de9b38e9f82
18 --- /dev/null
19 +++ b/dev-libs/libclc/libclc-13.0.0.9999.ebuild
20 @@ -0,0 +1,67 @@
21 +# Copyright 1999-2021 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=7
25 +
26 +PYTHON_COMPAT=( python3_{8..10} )
27 +inherit cmake llvm llvm.org python-any-r1
28 +
29 +DESCRIPTION="OpenCL C library"
30 +HOMEPAGE="https://libclc.llvm.org/"
31 +
32 +LICENSE="Apache-2.0-with-LLVM-exceptions || ( MIT BSD )"
33 +SLOT="0"
34 +KEYWORDS=""
35 +IUSE_VIDEO_CARDS="video_cards_nvidia video_cards_r600 video_cards_radeonsi"
36 +IUSE="${IUSE_VIDEO_CARDS}"
37 +REQUIRED_USE="|| ( ${IUSE_VIDEO_CARDS} )"
38 +
39 +LLVM_MAX_SLOT=13
40 +BDEPEND="
41 + || (
42 + sys-devel/clang:13
43 + sys-devel/clang:12
44 + sys-devel/clang:11
45 + sys-devel/clang:10
46 + )
47 + ${PYTHON_DEPS}"
48 +
49 +LLVM_COMPONENTS=( libclc )
50 +llvm.org_set_globals
51 +
52 +llvm_check_deps() {
53 + has_version -b "sys-devel/clang:${LLVM_SLOT}"
54 +}
55 +
56 +pkg_setup() {
57 + # we do not need llvm_pkg_setup
58 + python-any-r1_pkg_setup
59 +}
60 +
61 +src_configure() {
62 + local libclc_targets=()
63 +
64 + use video_cards_nvidia && libclc_targets+=(
65 + "nvptx--"
66 + "nvptx64--"
67 + "nvptx--nvidiacl"
68 + "nvptx64--nvidiacl"
69 + )
70 + use video_cards_r600 && libclc_targets+=(
71 + "r600--"
72 + )
73 + use video_cards_radeonsi && libclc_targets+=(
74 + "amdgcn--"
75 + "amdgcn-mesa-mesa3d"
76 + "amdgcn--amdhsa"
77 + )
78 + # TODO: spirv
79 + [[ ${#libclc_targets[@]} ]] || die "libclc target missing!"
80 +
81 + libclc_targets=${libclc_targets[*]}
82 + local mycmakeargs=(
83 + -DLIBCLC_TARGETS_TO_BUILD="${libclc_targets// /;}"
84 + -DLLVM_CONFIG="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
85 + )
86 + cmake_src_configure
87 +}