commit:     e1243f42b9537addd6859d5522c92e5a62da0d52
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 28 15:01:00 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jun 28 15:01:00 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1243f42

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

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

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

diff --git a/llvm-runtimes/flang-rt/Manifest b/llvm-runtimes/flang-rt/Manifest
index 714b2253d6fa..e712fc2c878c 100644
--- a/llvm-runtimes/flang-rt/Manifest
+++ b/llvm-runtimes/flang-rt/Manifest
@@ -1 +1,2 @@
 DIST llvm-project-814ac2e3735e52c1162ac495c24158e0ac256520.tar.gz 237400805 
BLAKE2B 
59cbf2f7f5c3c1c2c187c72a40b94b05b2d3286678f78764bc7555d75ead40d2fd60b1807bbe6470f012a5958d0466b1f6b2bc842bba36731e7697a79307532b
 SHA512 
63f31f28b7f01b840d88bfa3ffc4107ccffc623b26c7d0dc3e720a864ce7ca907dcbdcfaec7e31a1711220528a89175334518711a83824c82389343c2e4008d7
+DIST llvm-project-e34e02128ec5eb89e36a8f0f7307dcbcfecabbee.tar.gz 238210997 
BLAKE2B 
80ce4689e3c71a413e36645cdc83590f3492ac3ee39b8bf8844ec50d0b68f40da4c19a7f284625e3550eb78a90d433e74092b5639bcebadf0e0220c36b111cb3
 SHA512 
5c1ab21b242d1ba62172ae6268a126fd1b049f85b039434b4ff28b0411ec60d46e96e05560b9b85d0420494afdd573b4043999cb34ace508a48f763d4eb5b7aa

diff --git a/llvm-runtimes/flang-rt/flang-rt-21.0.0_pre20250628.ebuild 
b/llvm-runtimes/flang-rt/flang-rt-21.0.0_pre20250628.ebuild
new file mode 100644
index 000000000000..afd5496ffa4b
--- /dev/null
+++ b/llvm-runtimes/flang-rt/flang-rt-21.0.0_pre20250628.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..14} )
+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