summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-11-06 20:20:07 +0100
committerMichał Górny <mgorny@gentoo.org>2021-11-06 20:29:04 +0100
commit40e9fc5b5635f31fdccc8d275a4e2a13850618e2 (patch)
tree026e884ad330043387596237589c62339ca9a91a /dev-libs/libclc
parentvirtual/dist-kernel: Bump to 5.15.1 (diff)
downloadgentoo-40e9fc5b5635f31fdccc8d275a4e2a13850618e2.tar.gz
gentoo-40e9fc5b5635f31fdccc8d275a4e2a13850618e2.tar.bz2
gentoo-40e9fc5b5635f31fdccc8d275a4e2a13850618e2.zip
dev-libs/libclc: Bump to 13.0.0
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-13.0.0.ebuild67
2 files changed, 68 insertions, 0 deletions
diff --git a/dev-libs/libclc/Manifest b/dev-libs/libclc/Manifest
index 89c95516e73d..4090d2a49d3e 100644
--- a/dev-libs/libclc/Manifest
+++ b/dev-libs/libclc/Manifest
@@ -1,2 +1,3 @@
DIST libclc-0.2.0_pre20201001.tar.xz 122180 BLAKE2B 8587c5b29d517a6c54a927b529f7e5651f154785e4299ad6b90007bdbae19ffccea75ec873a308b9a025effbb6316f91e70f82af19cdcdaad87c4f1af2595f78 SHA512 1fc10fcd6163991fe3ce474351d07f892a628fbd4e4cfb9ea96f1288db421b7be87c1f818593bea7409e7a17a5fd4c84a07a88f5c3d998ef97ac0425970abf4d
DIST llvmorg-13.0.0-rc1.tar.gz 147235597 BLAKE2B 089fed119dee8a16f278cebb13808bd5a95629cc87ebee3050225cc041b78fee51acacc5bcc913d4a99e830bfe5774b19a04a845293c5087dd2a8c9d94d2fde9 SHA512 6e307e2c2dcb7ff41d11ee29d69f41c0ef55f200999847a3a924a2e773fc9c2160015746789af8b723c628bd232f97fce63370209bd0065491d80b0cc0017e85
+DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2
diff --git a/dev-libs/libclc/libclc-13.0.0.ebuild b/dev-libs/libclc/libclc-13.0.0.ebuild
new file mode 100644
index 000000000000..fcd1b8909c48
--- /dev/null
+++ b/dev-libs/libclc/libclc-13.0.0.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit cmake llvm llvm.org python-any-r1
+
+DESCRIPTION="OpenCL C library"
+HOMEPAGE="https://libclc.llvm.org/"
+
+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} )"
+
+LLVM_MAX_SLOT=13
+BDEPEND="
+ || (
+ sys-devel/clang:13
+ sys-devel/clang:12
+ sys-devel/clang:11
+ sys-devel/clang:10
+ )
+ ${PYTHON_DEPS}"
+
+LLVM_COMPONENTS=( libclc )
+llvm.org_set_globals
+
+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
+}