summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-08-12 21:41:39 +0200
committerMichał Górny <mgorny@gentoo.org>2021-08-12 21:52:57 +0200
commit4c42dee5064ddf4f3f1bb0926312a873f4f2f26f (patch)
tree85ef53effb4eff4ccdcd6aff74e47a872afeb69d /dev-libs/libclc
parentdev-python/tldextract: add 3.1.0, py3.10, tests, fix deps (diff)
downloadgentoo-4c42dee5064ddf4f3f1bb0926312a873f4f2f26f.tar.gz
gentoo-4c42dee5064ddf4f3f1bb0926312a873f4f2f26f.tar.bz2
gentoo-4c42dee5064ddf4f3f1bb0926312a873f4f2f26f.zip
dev-libs/libclc: Bump to 13.0.0-rc1
Bump to the release corresponding to LLVM 13.0.0-rc1. Switch to version scheme following LLVM releases -- this is what e.g. Fedora does. 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_rc1.ebuild67
2 files changed, 68 insertions, 0 deletions
diff --git a/dev-libs/libclc/Manifest b/dev-libs/libclc/Manifest
index cb72e90b8a08..89c95516e73d 100644
--- a/dev-libs/libclc/Manifest
+++ b/dev-libs/libclc/Manifest
@@ -1 +1,2 @@
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
diff --git a/dev-libs/libclc/libclc-13.0.0_rc1.ebuild b/dev-libs/libclc/libclc-13.0.0_rc1.ebuild
new file mode 100644
index 000000000000..eb1ed27099a0
--- /dev/null
+++ b/dev-libs/libclc/libclc-13.0.0_rc1.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 prefix python-any-r1 toolchain-funcs
+
+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
+}