summaryrefslogtreecommitdiff
path: root/dev-libs/opencl-clang/opencl-clang-18.1.1.ebuild
blob: fe18136b0334aa77828e51e0747e9a1a58ea2fa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

LLVM_COMPAT=( 18 )

inherit cmake llvm-r1

DESCRIPTION="OpenCL-oriented thin wrapper library around clang"
HOMEPAGE="https://github.com/intel/opencl-clang"
SRC_URI="https://github.com/intel/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${PV}"

LICENSE="UoI-NCSA"
SLOT="$(ver_cut 1)"
KEYWORDS="amd64 ~riscv"

RDEPEND="
	dev-util/spirv-llvm-translator:${SLOT}=
	$(llvm_gen_dep '
		llvm-core/clang:${LLVM_SLOT}=[static-analyzer]
		llvm-core/llvm:${LLVM_SLOT}=
	')
"

DEPEND="${RDEPEND}"

PATCHES=( "${FILESDIR}"/${PN}-17.0.0-clang_library_dir.patch )

src_configure() {
	local mycmakeargs=(
		-DCMAKE_INSTALL_PREFIX="$(get_llvm_prefix)"
		-DCLANG_LIBRARY_DIRS="${EPREFIX}"/usr/lib
		-DLLVM_VERSION_MAJOR="${LLVM_SLOT}"
		-DUSE_PREBUILT_LLVM="ON"
		-Wno-dev
	)

	cmake_src_configure
}