commit:     61c03dd0e0d108c62376e97cf587ddbb8d43cda2
Author:     Mia Ksenia <koishi <AT> koishi <DOT> de>
AuthorDate: Thu May 18 17:35:04 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jun  5 05:12:50 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61c03dd0

gui-wm/hyprland: Added check for LLVM16

Signed-off-by: Mia Ksenia <koishi <AT> koishi.de>
Closes: https://github.com/gentoo/gentoo/pull/31084
Signed-off-by: Sam James <sam <AT> gentoo.org>

 gui-wm/hyprland/hyprland-0.25.0.ebuild | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/gui-wm/hyprland/hyprland-0.25.0.ebuild 
b/gui-wm/hyprland/hyprland-0.25.0.ebuild
index bf62573979c1..aff592df7d8c 100644
--- a/gui-wm/hyprland/hyprland-0.25.0.ebuild
+++ b/gui-wm/hyprland/hyprland-0.25.0.ebuild
@@ -54,10 +54,14 @@ BDEPEND="
 "
 
 src_prepare() {
-       STDLIBVER=$(echo '#include <string>' | $(tc-getCXX) -x c++ -dM -E - | \
+       if [[ $(tc-is-gcc) ]]; then
+          STDLIBVER=$(echo '#include <string>' | $(tc-getCXX) -x c++ -dM -E - 
| \
                                        grep GLIBCXX_RELEASE | sed 
's/.*\([1-9][0-9]\)/\1/')
-       if ! [[ ${STDLIBVER} -ge 12 ]]; then
-               die "Hyprland requires >=sys-devel/gcc-12.1.0 to build"
+          if ! [[ ${STDLIBVER} -ge 12 ]]; then
+                  die "Hyprland requires >=sys-devel/gcc-12.1.0 to build"
+          fi
+       elif [[ $(clang-major-version) -lt 16 ]]; then
+               die "Hyprland requires >=sys-devel/clang-16.0.3 to build";
        fi
 
        if use video_cards_nvidia; then

Reply via email to