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, 03 Nov 2019 14:01:49
Message-Id: 1572789701.58c9b69234c91f19c41aa6b5c1a023d151019b2d.mgorny@gentoo
1 commit: 58c9b69234c91f19c41aa6b5c1a023d151019b2d
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 3 13:54:10 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 3 14:01:41 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58c9b692
7
8 dev-libs/libclc: Bump to 0.2.0_pre20191024
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_pre20191024.ebuild | 65 +++++++++++++++++++++++++
14 2 files changed, 66 insertions(+)
15
16 diff --git a/dev-libs/libclc/Manifest b/dev-libs/libclc/Manifest
17 index c7f1e56b71a..cb6d63f2403 100644
18 --- a/dev-libs/libclc/Manifest
19 +++ b/dev-libs/libclc/Manifest
20 @@ -1 +1,2 @@
21 DIST libclc-0.2.0_pre20190313.tar.gz 176803 BLAKE2B c9ecd5053685c2de89d92ae4e9cc9e9f8bee24ca05e5ddca6fffd0b45356b7d4a96b54d9bebf316624e0a49594a33ebb156ae6c4b963093bdc6c1067548b2bd0 SHA512 22813bcd76e77c018acbdf2a3d3d300c2996e169c17729726ae8a93c39f85033cfa1f6d43907a7c026451bcdfcce6fbdc64a202961492aa951ef1b818c3f9335
22 +DIST libclc-0.2.0_pre20191024.tar.xz 128628 BLAKE2B dc750725ee48456e3678cb4f730cc889045ff7401c4b40ac3ae9b656da9fe429aa2094c2042a18eda4f7e87c786ff8ae121fbf726a18de03884f30dad48b3fa1 SHA512 b4c2ca980fb28b5662055bea951de844284fcf122695234d7618439234f0203baf82b5cc5cf8acddfe387f19d32be3a958e53511bb1e33e9469f6be5951dbcdb
23
24 diff --git a/dev-libs/libclc/libclc-0.2.0_pre20191024.ebuild b/dev-libs/libclc/libclc-0.2.0_pre20191024.ebuild
25 new file mode 100644
26 index 00000000000..09e0ed6af9b
27 --- /dev/null
28 +++ b/dev-libs/libclc/libclc-0.2.0_pre20191024.ebuild
29 @@ -0,0 +1,65 @@
30 +# Copyright 1999-2019 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
35 +
36 +inherit 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:10
53 + sys-devel/clang:9
54 + sys-devel/clang:8
55 + sys-devel/clang:7
56 + sys-devel/clang:6
57 + )
58 + ${PYTHON_DEPS}"
59 +
60 +llvm_check_deps() {
61 + has_version -b "sys-devel/clang:${LLVM_SLOT}"
62 +}
63 +
64 +src_prepare() {
65 + default
66 + if use prefix; then
67 + hprefixify configure.py
68 + fi
69 +}
70 +
71 +pkg_setup() {
72 + # we do not need llvm_pkg_setup
73 + python-any-r1_pkg_setup
74 +}
75 +
76 +src_configure() {
77 + local libclc_targets=()
78 +
79 + use video_cards_nvidia && libclc_targets+=("nvptx--" "nvptx64--" "nvptx--nvidiacl" "nvptx64--nvidiacl")
80 + use video_cards_r600 && libclc_targets+=("r600--")
81 + use video_cards_radeonsi && libclc_targets+=("amdgcn--" "amdgcn-mesa-mesa3d" "amdgcn--amdhsa")
82 +
83 + [[ ${#libclc_targets[@]} ]] || die "libclc target missing!"
84 +
85 + ./configure.py \
86 + --with-cxx-compiler="$(tc-getCXX)" \
87 + --with-llvm-config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config" \
88 + --prefix="${EPREFIX}/usr" \
89 + "${libclc_targets[@]}" || die
90 +}
91 +
92 +src_compile() {
93 + emake VERBOSE=1
94 +}