Signed-off-by: Michał Górny <
mgorny@gentoo.org>
---
eclass/llvm-r2.eclass | 257 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 257 insertions(+)
create mode 100644 eclass/llvm-r2.eclass
diff --git a/eclass/llvm-r2.eclass b/eclass/llvm-r2.eclass
new file mode 100644
index 000000000000..6d0223f73f10
--- /dev/null
+++ b/eclass/llvm-r2.eclass
@@ -0,0 +1,257 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: llvm-r2.eclass
+# @MAINTAINER:
+# Michał Górny <
mgorny@gentoo.org>
+# @AUTHOR:
+# Michał Górny <
mgorny@gentoo.org>
+# @SUPPORTED_EAPIS: 8
+# @PROVIDES: llvm-utils
+# @BLURB: Provide LLVM_SLOT to build against slotted LLVM
+# @DESCRIPTION:
+# An eclass to reliably depend on a set of LLVM-related packages
+# in a matching slot. To use the eclass:
+#
+# 1. Set LLVM_COMPAT to the list of supported LLVM slots.
+#
+# 2. Use llvm_gen_dep and/or LLVM_USEDEP to add appropriate
+# dependencies.
+#
+# 3. Use llvm-r2_pkg_setup, get_llvm_prefix or LL