commit: b7c183e7838679143dbbd775be6d771e2fff21e6 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Mon Jun 5 08:04:31 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Mon Jun 5 08:05:00 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7c183e7
gui-wm/hyprland: fix Clang check Closes: https://bugs.gentoo.org/907871 Fixes: 61c03dd0e0d108c62376e97cf587ddbb8d43cda2 Signed-off-by: Sam James <sam <AT> gentoo.org> gui-wm/hyprland/hyprland-0.26.0.ebuild | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/gui-wm/hyprland/hyprland-0.26.0.ebuild b/gui-wm/hyprland/hyprland-0.26.0.ebuild index 71f645881c68..a8cb65a2382c 100644 --- a/gui-wm/hyprland/hyprland-0.26.0.ebuild +++ b/gui-wm/hyprland/hyprland-0.26.0.ebuild @@ -56,24 +56,29 @@ BDEPEND=" >=gui-libs/wlroots-0.16.0[X?] " -src_prepare() { - if [[ $(tc-is-gcc) ]]; then +pkg_setup() { + [[ ${MERGE_TYPE} == binary ]] && return + + 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" fi - elif [[ $(clang-major-version) -lt 16 ]]; then - die "Hyprland requires >=sys-devel/clang-16.0.3 to build"; - fi + elif [[ $(clang-major-version) -lt 16 ]]; then + die "Hyprland requires >=sys-devel/clang-16.0.3 to build"; + fi +} +src_prepare() { if use video_cards_nvidia; then cd "${S}/subprojects/wlroots" || die eapply "${FILESDIR}/nvidia-0.25.0.patch" cd "${S}" || die fi - eapply_user + default } src_configure() {