Skip to content

Commit

Permalink
dev-libs/libclc: Bump to 0.2.0_pre20201001 snapshot
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
mgorny committed Nov 1, 2020
1 parent 153a859 commit acedf74
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-libs/libclc/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST libclc-0.2.0_pre20191024.tar.xz 128628 BLAKE2B dc750725ee48456e3678cb4f730cc889045ff7401c4b40ac3ae9b656da9fe429aa2094c2042a18eda4f7e87c786ff8ae121fbf726a18de03884f30dad48b3fa1 SHA512 b4c2ca980fb28b5662055bea951de844284fcf122695234d7618439234f0203baf82b5cc5cf8acddfe387f19d32be3a958e53511bb1e33e9469f6be5951dbcdb
DIST libclc-0.2.0_pre20201001.tar.xz 122180 BLAKE2B 8587c5b29d517a6c54a927b529f7e5651f154785e4299ad6b90007bdbae19ffccea75ec873a308b9a025effbb6316f91e70f82af19cdcdaad87c4f1af2595f78 SHA512 1fc10fcd6163991fe3ce474351d07f892a628fbd4e4cfb9ea96f1288db421b7be87c1f818593bea7409e7a17a5fd4c84a07a88f5c3d998ef97ac0425970abf4d
53 changes: 53 additions & 0 deletions dev-libs/libclc/libclc-0.2.0_pre20201001.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
PYTHON_COMPAT=( python3_{6..9} )

inherit cmake llvm prefix python-any-r1 toolchain-funcs

DESCRIPTION="OpenCL C library"
HOMEPAGE="https://libclc.llvm.org/"
# libclc subdir of https://github.com/llvm/llvm-project.git
SRC_URI="https://dev.gentoo.org/~mgorny/dist/${P}.tar.xz"

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} )"

BDEPEND="
|| (
sys-devel/clang:12
sys-devel/clang:11
sys-devel/clang:10
sys-devel/clang:9
)
${PYTHON_DEPS}"

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!"

local mycmakeargs=(
-DLIBCLC_TARGETS_TO_BUILD="${libclc_targets[*]}"
-DLLVM_CONFIG="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
)
cmake_src_configure
}

0 comments on commit acedf74

Please sign in to comment.