summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-03-23 10:11:21 +0100
committerMichał Górny <mgorny@gentoo.org>2022-03-23 13:59:51 +0100
commit6df882ca0117bc4b3335a4cb6a8748a123a22841 (patch)
treec4c283fab8001e2cdc87d51b1852d9a0e7cb45fe /dev-libs/libclc
parentsys-devel/clang-runtime: Bump to 14.0.0 (diff)
downloadgentoo-6df882ca0117bc4b3335a4cb6a8748a123a22841.tar.gz
gentoo-6df882ca0117bc4b3335a4cb6a8748a123a22841.tar.bz2
gentoo-6df882ca0117bc4b3335a4cb6a8748a123a22841.zip
dev-libs/libclc: Bump to 14.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-14.0.0.ebuild68
2 files changed, 69 insertions, 0 deletions
diff --git a/dev-libs/libclc/Manifest b/dev-libs/libclc/Manifest
index 6cc00b125df1..23dc1fdf22b3 100644
--- a/dev-libs/libclc/Manifest
+++ b/dev-libs/libclc/Manifest
@@ -1,3 +1,4 @@
DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2
DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
DIST llvmorg-14.0.0-rc4.tar.gz 158082013 BLAKE2B 0e717898d8f1ed160e525a68aba56a84b7d31856ea72fdb8fa02e863c5a2074245a38d4a4aa7d178beab1ea64aa92d0ba9dcad4373ebb03868070bf718112107 SHA512 a942848aa5042b97bab6d0d5bcee11ea2f85f1244d7eaadb8f7000bf104b2160e6034c04e3755501dd178bc99c26669cf4aca40edb4bba598fdde6bcf3f40ddc
+DIST llvmorg-14.0.0.tar.gz 158057350 BLAKE2B 7052684c620a5eaf52beeee4591adf58cfec9e64a5ee0b24f3d5849fd4df5b006e2906a839cb806ac69c33fab6013c58589b1d74e4fb8558758edcb7d5065064 SHA512 eb5acf96b5e2c59bd07579f7ebe73018b0dd6e2f2d9a5a3c7986320e88febd837d1084b9e5313a2264310342193044629d228337cc76dd2b8527dc0a8bdda999
diff --git a/dev-libs/libclc/libclc-14.0.0.ebuild b/dev-libs/libclc/libclc-14.0.0.ebuild
new file mode 100644
index 000000000000..e9e381d23b12
--- /dev/null
+++ b/dev-libs/libclc/libclc-14.0.0.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2022 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=14
+BDEPEND="
+ || (
+ sys-devel/clang:14
+ 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
+}