summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-11-01 08:35:03 +0100
committerMichał Górny <mgorny@gentoo.org>2020-11-01 08:47:01 +0100
commitacedf744a78fc5cb3f32ca094d115f4726d49030 (patch)
tree0fc88aeb12cd3feda57b26edb6c710553b054edc /dev-libs/libclc
parentxfce-base/thunar: Bump to 4.15.3 (diff)
downloadgentoo-acedf744a78fc5cb3f32ca094d115f4726d49030.tar.gz
gentoo-acedf744a78fc5cb3f32ca094d115f4726d49030.tar.bz2
gentoo-acedf744a78fc5cb3f32ca094d115f4726d49030.zip
dev-libs/libclc: Bump to 0.2.0_pre20201001 snapshot
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-libs/libclc')
-rw-r--r--dev-libs/libclc/Manifest1
-rw-r--r--dev-libs/libclc/libclc-0.2.0_pre20201001.ebuild53
2 files changed, 54 insertions, 0 deletions
diff --git a/dev-libs/libclc/Manifest b/dev-libs/libclc/Manifest
index 8df1eab8716a..e0e257095077 100644
--- a/dev-libs/libclc/Manifest
+++ b/dev-libs/libclc/Manifest
@@ -1 +1,2 @@
DIST libclc-0.2.0_pre20191024.tar.xz 128628 BLAKE2B dc750725ee48456e3678cb4f730cc889045ff7401c4b40ac3ae9b656da9fe429aa2094c2042a18eda4f7e87c786ff8ae121fbf726a18de03884f30dad48b3fa1 SHA512 b4c2ca980fb28b5662055bea951de844284fcf122695234d7618439234f0203baf82b5cc5cf8acddfe387f19d32be3a958e53511bb1e33e9469f6be5951dbcdb
+DIST libclc-0.2.0_pre20201001.tar.xz 122180 BLAKE2B 8587c5b29d517a6c54a927b529f7e5651f154785e4299ad6b90007bdbae19ffccea75ec873a308b9a025effbb6316f91e70f82af19cdcdaad87c4f1af2595f78 SHA512 1fc10fcd6163991fe3ce474351d07f892a628fbd4e4cfb9ea96f1288db421b7be87c1f818593bea7409e7a17a5fd4c84a07a88f5c3d998ef97ac0425970abf4d
diff --git a/dev-libs/libclc/libclc-0.2.0_pre20201001.ebuild b/dev-libs/libclc/libclc-0.2.0_pre20201001.ebuild
new file mode 100644
index 000000000000..16eb2901cc6c
--- /dev/null
+++ b/dev-libs/libclc/libclc-0.2.0_pre20201001.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{6..9} )
+
+inherit cmake llvm prefix python-any-r1 toolchain-funcs
+
+DESCRIPTION="OpenCL C library"
+HOMEPAGE="https://libclc.llvm.org/"
+# libclc subdir of https://github.com/llvm/llvm-project.git
+SRC_URI="https://dev.gentoo.org/~mgorny/dist/${P}.tar.xz"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( MIT BSD )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE_VIDEO_CARDS="video_cards_nvidia video_cards_r600 video_cards_radeonsi"
+IUSE="${IUSE_VIDEO_CARDS}"
+REQUIRED_USE="|| ( ${IUSE_VIDEO_CARDS} )"
+
+BDEPEND="
+ || (
+ sys-devel/clang:12
+ sys-devel/clang:11
+ sys-devel/clang:10
+ sys-devel/clang:9
+ )
+ ${PYTHON_DEPS}"
+
+llvm_check_deps() {
+ has_version -b "sys-devel/clang:${LLVM_SLOT}"
+}
+
+pkg_setup() {
+ # we do not need llvm_pkg_setup
+ python-any-r1_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")
+ # TODO: spirv
+ [[ ${#libclc_targets[@]} ]] || die "libclc target missing!"
+
+ local mycmakeargs=(
+ -DLIBCLC_TARGETS_TO_BUILD="${libclc_targets[*]}"
+ -DLLVM_CONFIG="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ )
+ cmake_src_configure
+}