commit:     15d1e9c51bee91279e79fad16777338e6aff1b8b
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 10 23:24:37 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec 11 01:16:16 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15d1e9c5

dev-util/clazy: use llvm.eclass to declare compatibility

We need to use llvm.eclass to ensure we don't use too new of
a version of LLVM and Clang.

Closes: https://bugs.gentoo.org/823726
Bug: https://bugs.gentoo.org/823726
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/clazy/{clazy-1.10.ebuild => clazy-1.10-r1.ebuild} | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/dev-util/clazy/clazy-1.10.ebuild 
b/dev-util/clazy/clazy-1.10-r1.ebuild
similarity index 83%
rename from dev-util/clazy/clazy-1.10.ebuild
rename to dev-util/clazy/clazy-1.10-r1.ebuild
index 160c50c5c641..d8be54c089d8 100644
--- a/dev-util/clazy/clazy-1.10.ebuild
+++ b/dev-util/clazy/clazy-1.10-r1.ebuild
@@ -3,7 +3,8 @@
 
 EAPI=7
 
-inherit cmake
+LLVM_MAX_SLOT=12
+inherit cmake llvm
 
 DESCRIPTION="Compiler plugin which allows clang to understand Qt semantics"
 HOMEPAGE="https://apps.kde.org/clazy";
@@ -14,12 +15,13 @@ SLOT="0"
 KEYWORDS="~amd64 arm64 ~x86"
 IUSE=""
 
-RDEPEND="
-       >=sys-devel/clang-8.0:=
-       >=sys-devel/llvm-8.0:=
-"
+RDEPEND=">=sys-devel/clang-$((${LLVM_MAX_SLOT} + 1)):="
 DEPEND="${RDEPEND}"
 
+llvm_check_deps() {
+       has_version "sys-devel/clang:${LLVM_SLOT}" && has_version 
"sys-devel/llvm:${LLVM_SLOT}"
+}
+
 src_prepare() {
        cmake_src_prepare
 

Reply via email to