blob: 8ec6ea000f30e73dd61e735e53a74fc5d6188850 (
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..14} )
inherit cmake llvm.org python-any-r1
DESCRIPTION="Polyhedral optimizations for LLVM"
HOMEPAGE="https://polly.llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
# vendored isl (fork?)
LICENSE+=" MIT"
SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86"
IUSE="debug test"
RESTRICT="!test? ( test )"
DEPEND="
~llvm-core/llvm-${PV}:${LLVM_MAJOR}=[debug=]
"
RDEPEND="
${DEPEND}
"
BDEPEND="
test? (
$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
)
"
LLVM_COMPONENTS=( polly cmake )
llvm.org_set_globals
python_check_deps() {
python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
}
pkg_setup() {
use test && python-any-r1_pkg_setup
}
src_configure() {
local mycmakeargs=(
-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
-DLLVM_ROOT="${ESYSROOT}/usr/lib/llvm/${LLVM_MAJOR}"
)
use test && mycmakeargs+=(
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-DLLVM_LIT_ARGS="$(get_lit_flags)"
-DPython3_EXECUTABLE="${PYTHON}"
)
cmake_src_configure
}
src_test() {
local -x LIT_PRESERVES_TMP=1
cmake_build check-polly
}
|