commit:     f336e8bc9cb902d61882358e57531f9269c206e6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 19 03:11:41 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep 19 03:11:41 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f336e8bc

sys-devel/sparse: improve llvm_check_deps logic

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

 sys-devel/sparse/sparse-0.6.4.ebuild | 5 ++---
 sys-devel/sparse/sparse-9999.ebuild  | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/sys-devel/sparse/sparse-0.6.4.ebuild 
b/sys-devel/sparse/sparse-0.6.4.ebuild
index 8e6b268ec5b..6fbcc28e155 100644
--- a/sys-devel/sparse/sparse-0.6.4.ebuild
+++ b/sys-devel/sparse/sparse-0.6.4.ebuild
@@ -31,9 +31,8 @@ BDEPEND="gtk? ( virtual/pkgconfig )
        xml? ( virtual/pkgconfig )"
 
 llvm_check_deps() {
-       has_version "sys-devel/llvm:${LLVM_MAX_SLOT}" || \
-               has_version "sys-devel/llvm:$((${LLVM_MAX_SLOT} - 1))" \
-               has_version "sys-devel/llvm:$((${LLVM_MAX_SLOT} - 2))"
+       has_version "sys-devel/llvm:${LLVM_SLOT}" && \
+               has_version -r "sys-devel/llvm:${LLVM_SLOT}"
 }
 
 pkg_setup() {

diff --git a/sys-devel/sparse/sparse-9999.ebuild 
b/sys-devel/sparse/sparse-9999.ebuild
index 8e6b268ec5b..6fbcc28e155 100644
--- a/sys-devel/sparse/sparse-9999.ebuild
+++ b/sys-devel/sparse/sparse-9999.ebuild
@@ -31,9 +31,8 @@ BDEPEND="gtk? ( virtual/pkgconfig )
        xml? ( virtual/pkgconfig )"
 
 llvm_check_deps() {
-       has_version "sys-devel/llvm:${LLVM_MAX_SLOT}" || \
-               has_version "sys-devel/llvm:$((${LLVM_MAX_SLOT} - 1))" \
-               has_version "sys-devel/llvm:$((${LLVM_MAX_SLOT} - 2))"
+       has_version "sys-devel/llvm:${LLVM_SLOT}" && \
+               has_version -r "sys-devel/llvm:${LLVM_SLOT}"
 }
 
 pkg_setup() {

Reply via email to