summaryrefslogtreecommitdiff
path: root/dev-libs/libclc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /dev-libs/libclc
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'dev-libs/libclc')
-rw-r--r--dev-libs/libclc/Manifest2
-rw-r--r--dev-libs/libclc/libclc-0.2.0_pre20201001.ebuild54
2 files changed, 56 insertions, 0 deletions
diff --git a/dev-libs/libclc/Manifest b/dev-libs/libclc/Manifest
index 4a6f39b14232..e3ca6792ede4 100644
--- a/dev-libs/libclc/Manifest
+++ b/dev-libs/libclc/Manifest
@@ -1,3 +1,5 @@
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
EBUILD libclc-0.2.0_pre20191024.ebuild 1576 BLAKE2B eb9ab28009e52164890c3e99bba1c644b06c536df84f96d950ddc3171a2a6157c0a081b6a0038254176ed7964320dcc4dae0a66552e98b59e24ea5d5ff32cead SHA512 1ce5f96ecfb430f93f90e06b3ffae33e3db9e98923237649501e35376acdf7556560c7879e748da30b8b7b04ca072a274e729b7a3d0ce5be5677b6b961c78c0a
+EBUILD libclc-0.2.0_pre20201001.ebuild 1472 BLAKE2B f0340b5ffae1233a40e9fb857d1682aa85638de38300c5efb791c06e4bb7c345cf5b7c8e9ae93058cbc9b3a23c90d77694172464ecceef7846f672084453c742 SHA512 9cdb9b48c9d7d0591b10bede8f8044a6428371cfa4be31d578a6a486c666e06ebb4749bbf753e597927bbcdcfe61f39eae62257d640dd16336f365538e7e1e94
MISC metadata.xml 394 BLAKE2B 13254b650b3c915b7eccc5e646d7ed6065c514d8f5619f276be3526be68bde4ad2310491f18a6a92ae621022a009ab7248eb788e500c96012f3d27236da16cba SHA512 ed84a49ef1e6da5f133895d82632d81c5333ae0fa21eb222e993c2e3136c802350193555fd8f98ee23d7b4d55695ca186a8e4d5dc04c3d7aa072dc229905011d
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..7d1b7558a901
--- /dev/null
+++ b/dev-libs/libclc/libclc-0.2.0_pre20201001.ebuild
@@ -0,0 +1,54 @@
+# 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!"
+
+ libclc_targets=${libclc_targets[*]}
+ local mycmakeargs=(
+ -DLIBCLC_TARGETS_TO_BUILD="${libclc_targets// /;}"
+ -DLLVM_CONFIG="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ )
+ cmake_src_configure
+}