commit:     f7aa346dc0096c8c56c7ec6e8e1f6b7432d6e872
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 26 08:57:28 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Dec 26 09:15:09 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7aa346d

llvm-core/polly: New live package, 20.0.0.9999

Intended for testing, unclear whether this approach will actually work.
Thanks to StormBytePP for the past work.

Bug: https://bugs.gentoo.org/715612
See-also: https://github.com/gentoo/gentoo/pull/36158
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-core/polly/metadata.xml             | 10 ++++++
 llvm-core/polly/polly-20.0.0.9999.ebuild | 59 ++++++++++++++++++++++++++++++++
 metadata/stabilization-groups/llvm.group |  1 +
 3 files changed, 70 insertions(+)

diff --git a/llvm-core/polly/metadata.xml b/llvm-core/polly/metadata.xml
new file mode 100644
index 000000000000..072910296ca3
--- /dev/null
+++ b/llvm-core/polly/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="project">
+               <email>[email protected]</email>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">llvm/llvm-project</remote-id>
+       </upstream>
+</pkgmetadata>

diff --git a/llvm-core/polly/polly-20.0.0.9999.ebuild 
b/llvm-core/polly/polly-20.0.0.9999.ebuild
new file mode 100644
index 000000000000..17940c9de942
--- /dev/null
+++ b/llvm-core/polly/polly-20.0.0.9999.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+
+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}"
+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
+}

diff --git a/metadata/stabilization-groups/llvm.group 
b/metadata/stabilization-groups/llvm.group
index cd8248451a3d..d87be34aff8b 100644
--- a/metadata/stabilization-groups/llvm.group
+++ b/metadata/stabilization-groups/llvm.group
@@ -13,6 +13,7 @@ dev-python/lit
 llvm-core/lld
 llvm-core/lld-toolchain-symlinks
 llvm-core/lldb
+llvm-core/polly
 llvm-runtimes/compiler-rt
 llvm-runtimes/compiler-rt-sanitizers
 llvm-runtimes/libunwind

Reply via email to