summaryrefslogtreecommitdiff
path: root/llvm-core/libclc/libclc-21.1.6.ebuild
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2025-11-19 04:23:30 +0100
committerMichał Górny <mgorny@gentoo.org>2025-11-20 04:28:43 +0100
commitd7b162e0140bc7ceffbb95977c7e9d56ae70fdd6 (patch)
treee453afb2c98c6096f117f48cd8d6eb1f137bf19b /llvm-core/libclc/libclc-21.1.6.ebuild
parent15f5660c813ec8e13585959b7b709383fff163bb (diff)
downloadgentoo-d7b162e0140bc7ceffbb95977c7e9d56ae70fdd6.tar.gz
gentoo-d7b162e0140bc7ceffbb95977c7e9d56ae70fdd6.tar.bz2
gentoo-d7b162e0140bc7ceffbb95977c7e9d56ae70fdd6.zip
llvm-core/libclc: Add 21.1.6
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'llvm-core/libclc/libclc-21.1.6.ebuild')
-rw-r--r--llvm-core/libclc/libclc-21.1.6.ebuild64
1 files changed, 64 insertions, 0 deletions
diff --git a/llvm-core/libclc/libclc-21.1.6.ebuild b/llvm-core/libclc/libclc-21.1.6.ebuild
new file mode 100644
index 000000000000..befd37171325
--- /dev/null
+++ b/llvm-core/libclc/libclc-21.1.6.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_COMPAT=( 21 )
+PYTHON_COMPAT=( python3_{11..14} )
+inherit cmake llvm.org llvm-r1 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 ~arm64 ~loong ~riscv ~x86"
+IUSE="+spirv video_cards_nvidia video_cards_r600 video_cards_radeonsi"
+
+BDEPEND="
+ ${PYTHON_DEPS}
+ $(llvm_gen_dep '
+ llvm-core/clang:${LLVM_SLOT}
+ ')
+ spirv? ( dev-util/spirv-llvm-translator:* )
+"
+
+LLVM_COMPONENTS=( libclc )
+llvm.org_set_globals
+
+pkg_setup() {
+ llvm-r1_pkg_setup
+ python-any-r1_pkg_setup
+}
+
+src_configure() {
+ local libclc_targets=(
+ "clspv--"
+ "clspv64--"
+ )
+
+ use spirv && libclc_targets+=(
+ "spirv-mesa3d-"
+ "spirv64-mesa3d-"
+ )
+ 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"
+ )
+
+ libclc_targets=${libclc_targets[*]}
+ local mycmakeargs=(
+ -DLIBCLC_TARGETS_TO_BUILD="${libclc_targets// /;}"
+ )
+ cmake_src_configure
+}