commit:     99ea79c7d485ab672499531bcd35d76325ea4120
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed May 28 10:52:58 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed May 28 11:53:53 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99ea79c7

llvm-runtimes/flang-rt: Add 21.0.0_pre20250528 snapshot

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/flang-rt/Manifest                    |  1 +
 .../flang-rt/flang-rt-21.0.0_pre20250528.ebuild    | 73 ++++++++++++++++++++++
 2 files changed, 74 insertions(+)

diff --git a/llvm-runtimes/flang-rt/Manifest b/llvm-runtimes/flang-rt/Manifest
index 525183c1298c..ec22b16ccdb7 100644
--- a/llvm-runtimes/flang-rt/Manifest
+++ b/llvm-runtimes/flang-rt/Manifest
@@ -1 +1,2 @@
 DIST llvm-project-7dc7c155251c0008d5d59b84f0c9056365740f11.tar.gz 235921149 
BLAKE2B 
2867e313cd25fee6975da9bf65365fa51ed8780f3f8fc95983fb6e8f5b2c38c6d7f75a386b0ec2d74bafad74472973f4e4e603a5a0754465ac2b75942b8e90c6
 SHA512 
f8bc383ff2a1af836357150efa5728c7df3cd862f56ffaf12b5fc56ef631f1048276ff00b89fcf4d224576fa1eda9811d971886aae0855a4d29178060eb89a49
+DIST llvm-project-f8ca9e59cb438bd35b29a6d7cf6d72f50673aec9.tar.gz 236069626 
BLAKE2B 
5547770a22e5fd0240c0e435d0b0af0ebd789aa72d6829250917f2df605f9a95c6756bc1afc9b611b176c1ba8394c757b94789511b98b38c6ade6cca4c9ce7f6
 SHA512 
b1fffd7d4f5ede9bcda759bc59cdd47373a44a3bbd31a50d1d213e438a59f1da3cc96780a1d17ecaeb14454822921476406a6c37493354169f72e1fab7b3a3be

diff --git a/llvm-runtimes/flang-rt/flang-rt-21.0.0_pre20250528.ebuild 
b/llvm-runtimes/flang-rt/flang-rt-21.0.0_pre20250528.ebuild
new file mode 100644
index 000000000000..d038ee99a947
--- /dev/null
+++ b/llvm-runtimes/flang-rt/flang-rt-21.0.0_pre20250528.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..13} )
+inherit cmake flag-o-matic llvm.org python-any-r1
+
+DESCRIPTION="LLVM's Fortran runtime"
+HOMEPAGE="https://flang.llvm.org/";
+
+LICENSE="Apache-2.0-with-LLVM-exceptions"
+SLOT="${LLVM_MAJOR}"
+IUSE="+debug test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       !<llvm-core/flang-21.0.0_pre20250221-r1
+"
+BDEPEND="
+       llvm-core/llvm:${LLVM_MAJOR}
+       llvm-core/flang
+       test? (
+               $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+       )
+"
+
+LLVM_COMPONENTS=(
+       runtimes flang-rt cmake flang llvm/{cmake,utils/llvm-lit}
+)
+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() {
+       # the code is not portable
+       local -x FC=flang F77=flang
+       strip-unsupported-flags
+
+       local mycmakeargs=(
+               # we may not have a runtime yet
+               -DCMAKE_Fortran_COMPILER_WORKS=TRUE
+
+               -DLLVM_ENABLE_RUNTIMES="flang-rt"
+               # this package forces NO_DEFAULT_PATHS
+               -DLLVM_BINARY_DIR="${ESYSROOT}/usr/lib/llvm/${LLVM_MAJOR}"
+               # set correct install paths
+               
-DFLANG_RT_INSTALL_RESOURCE_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+               -DLLVM_DEFAULT_TARGET_TRIPLE="${CHOST}"
+
+               -DFLANG_RT_INCLUDE_TESTS=$(usex test)
+       )
+       use test && mycmakeargs+=(
+               -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+               -DLLVM_LIT_ARGS="$(get_lit_flags)"
+       )
+
+       # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+       use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+       cmake_src_configure
+}
+
+src_test() {
+       # respect TMPDIR!
+       local -x LIT_PRESERVES_TMP=1
+       cmake_build check-flang-rt
+}

Reply via email to