commit:     db9200f6c647e2cbf0c6a9d818c53f2c31567acb
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Sep  6 17:56:42 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Sep  6 18:12:59 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db9200f6

dev-libs/libclc: Add 18.0.0_pre20230906 snapshot

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-libs/libclc/Manifest                         |  1 +
 dev-libs/libclc/libclc-18.0.0_pre20230906.ebuild | 88 ++++++++++++++++++++++++
 2 files changed, 89 insertions(+)

diff --git a/dev-libs/libclc/Manifest b/dev-libs/libclc/Manifest
index aa50ad835c53..f93f9da98f29 100644
--- a/dev-libs/libclc/Manifest
+++ b/dev-libs/libclc/Manifest
@@ -8,5 +8,6 @@ DIST llvm-project-17.0.0rc3.src.tar.xz 127805656 BLAKE2B 
ecaead9f227b8357a5dc5ff
 DIST llvm-project-17.0.0rc3.src.tar.xz.sig 438 BLAKE2B 
7b644cf501d17a6aef9b052e359ba06c1840a75e5263de46d938dbbdea07720b53d7ee6b5861ad641d0f7a7f75c6cc17717847b0ea9cf08873dbfacbe1c19074
 SHA512 
7059b1a90b7dd8cfa831f9e199a3a817358fd75d7c7d7e6de446d5443fce5831877a28e9b964ea238c1d803f9054bf4f53a97622d5f756f7f99aaa1c1a279f44
 DIST llvm-project-17.0.0rc4.src.tar.xz 127838724 BLAKE2B 
e3bf524e55db5e4305099ecdff09c0d3eab7957a5f8729eefe636e361460f405fbfd569af38aa39eea3b6c1e024feaa0400f8bc092194f2c3b54c695e7962591
 SHA512 
be7b5ad136d03864dbd11a589ca9e8b0b04a4226ebcffcc123b3ba72992f704bab4f9550d03eb2ac1d21fb8b73ac7824398b4cb4c9cec2118efb112babfe0f65
 DIST llvm-project-17.0.0rc4.src.tar.xz.sig 438 BLAKE2B 
2cda35b4a3ebddfdbe6828459c8bd8fdfaa8e04d2d1c4f2faf16f5c66909186d2dd73e6a163cf733d8955c007249cf3f62f237855d5a76b1b61f3bfa30e4972d
 SHA512 
5f713e05b7c58fab6e9cc43f2f3f69120482c9b60008146da0cddb266d1a5c9b9a77e1e338fce4e15624b332ac53a90c5c4a6f62c58a77f2122a015b4f0ebed2
+DIST llvm-project-7e5809e7e7bc9a828427b6540a51d45884d8bbbb.tar.gz 197275742 
BLAKE2B 
17df09155cf3451deffcdd71a4b0602211a4638ad961eb351802028f4fd1b8db870bef817430adb709ea7c1e85f545d7507c06d7fca26869f8a10e6ac6b03967
 SHA512 
e84aa041aadf3e50376cffd1e92c1447acdca0a2cf8e7df9cca9d0337dfeccb1d022da3a229bb0cfdc9c5fb87215682a1e4f474208b09b8800f30aa0c6e36c4b
 DIST llvm-project-e3373c6c83d3855adb78f1952a3bf0398baf359e.tar.gz 196926975 
BLAKE2B 
9da1052db0a6ff81a8b76cbf9cb2ab7eed5c8798dc5ae6887a4694de8b151c7a1282cfff2da2e8440b1a67d3d12c33db319fbbe6062761b6d5369e6b335821ae
 SHA512 
8bb6d49ddb824e932f7bad3c51e4a6c2227139aaf19c02e9deb15657919bc12ea41844d8fe045061814aefb9031d82b167c7c0c20bedaa09aaffe164a2109f7d
 DIST llvm-project-f6259d9b9a546dbfa5bc2f29313c6edd6c701177.tar.gz 196957045 
BLAKE2B 
c38b17f4e697c090b0b70385e45ca4ce97981746738e556154895d5b57cede90f6b8bdc5f41023bda6e942f07f572aa508cf0107fb81bee80a5ea9f13ac495fd
 SHA512 
8394a42e1963618ed7f7cf7770acb72ae6bf84f3e2351218b5049ea2d76ff6ae768ad5588ffd1b2be1b5228a8fcb03663430814c409ceb9fa5735c891847f816

diff --git a/dev-libs/libclc/libclc-18.0.0_pre20230906.ebuild 
b/dev-libs/libclc/libclc-18.0.0_pre20230906.ebuild
new file mode 100644
index 000000000000..117d489acdec
--- /dev/null
+++ b/dev-libs/libclc/libclc-18.0.0_pre20230906.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+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=""
+IUSE="+spirv video_cards_nvidia video_cards_r600 video_cards_radeonsi"
+
+LLVM_MAX_SLOT=17
+BDEPEND="
+       ${PYTHON_DEPS}
+       || (
+               (
+                       sys-devel/clang:17
+                       spirv? ( dev-util/spirv-llvm-translator:17 )
+               )
+               (
+                       sys-devel/clang:16
+                       spirv? ( dev-util/spirv-llvm-translator:16 )
+               )
+               (
+                       sys-devel/clang:15
+                       spirv? ( dev-util/spirv-llvm-translator:15 )
+               )
+               (
+                       sys-devel/clang:14
+                       spirv? ( dev-util/spirv-llvm-translator:14 )
+               )
+               (
+                       sys-devel/clang:13
+                       spirv? ( dev-util/spirv-llvm-translator:13 )
+               )
+       )
+"
+
+LLVM_COMPONENTS=( libclc )
+llvm.org_set_globals
+
+llvm_check_deps() {
+       if use spirv; then
+               has_version -b "dev-util/spirv-llvm-translator:${LLVM_SLOT}" ||
+                       return 1
+       fi
+       has_version -b "sys-devel/clang:${LLVM_SLOT}"
+}
+
+pkg_setup() {
+       llvm_pkg_setup
+       python-any-r1_pkg_setup
+}
+
+src_configure() {
+       local libclc_targets=()
+
+       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[@]} ]] || die "libclc target missing!"
+
+       libclc_targets=${libclc_targets[*]}
+       local mycmakeargs=(
+               -DLIBCLC_TARGETS_TO_BUILD="${libclc_targets// /;}"
+       )
+       cmake_src_configure
+}

Reply via email to