commit:     feacda92bb1444be37d8855e26c3cc4ec23e2bfe
Author:     Julien Roy <julien <AT> jroy <DOT> ca>
AuthorDate: Sat Jan 21 22:54:24 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Sat Jan 21 22:54:24 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=feacda92

gui-wm/hyprland: update failure for GCC12

no revbump since -r1 was merged yet
Signed-off-by: Julien Roy <julien <AT> jroy.ca>

 gui-wm/hyprland/hyprland-0.20.1-r1.ebuild | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/gui-wm/hyprland/hyprland-0.20.1-r1.ebuild 
b/gui-wm/hyprland/hyprland-0.20.1-r1.ebuild
index 2f306f143..3901b7500 100644
--- a/gui-wm/hyprland/hyprland-0.20.1-r1.ebuild
+++ b/gui-wm/hyprland/hyprland-0.20.1-r1.ebuild
@@ -69,12 +69,17 @@ src_unpack() {
        mv "${WORKDIR}/hyprland-protocols-${PROTOCOMMIT}" 
"${S}/subprojects/hyprland-protocols" || die
 }
 
-src_configure() {
-       if ! (tc-is-gcc && [[ $(gcc-major-version) -ge 12 ]] && [[ 
$(gcc-minor-version) -ge 1 ]]) \
-       && ! (tc-is-clang && [[ $(clang-major-version) -ge 15 ]]); then
-               die "Hyprland requires >=sys-devel/gcc-12.1.0 or 
>=sys-devel/clang-15.0.0 to build"
+src_prepare() {
+       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
 
+       default
+}
+
+src_configure() {
        local emesonargs=(
                $(meson_feature X xwayland)
                $(meson_feature systemd)

Reply via email to