commit: 44d3efff43db84a327ff24e9aa9e95b9077d71a3 Author: Julien Roy <julien <AT> jroy <DOT> ca> AuthorDate: Sun Nov 17 03:47:56 2024 +0000 Commit: Julien Roy <julien <AT> jroy <DOT> ca> CommitDate: Sun Nov 17 03:49:17 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=44d3efff
sys-auth/hyprpolkitagent: add GCC version check Signed-off-by: Julien Roy <julien <AT> jroy.ca> sys-auth/hyprpolkitagent/hyprpolkitagent-0.1.1.ebuild | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sys-auth/hyprpolkitagent/hyprpolkitagent-0.1.1.ebuild b/sys-auth/hyprpolkitagent/hyprpolkitagent-0.1.1.ebuild index a9610f574..9a860d545 100644 --- a/sys-auth/hyprpolkitagent/hyprpolkitagent-0.1.1.ebuild +++ b/sys-auth/hyprpolkitagent/hyprpolkitagent-0.1.1.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit cmake +inherit cmake toolchain-funcs DESCRIPTION="Polkit authentication agent for Hyprland, written in Qt/QML" HOMEPAGE="https://wiki.hyprland.org/Hypr-Ecosystem/hyprpolkitagent" @@ -28,3 +28,17 @@ RDEPEND=" BDEPEND=" virtual/pkgconfig " + +kg_setup() { + [[ ${MERGE_TYPE} == binary ]] && return + + if tc-is-gcc && ver_test $(gcc-version) -lt 14 ; then + eerror "Hyprpolkitagent requires >=sys-devel/gcc-14 to build" + eerror "Please upgrade GCC: emerge -v1 sys-devel/gcc" + die "GCC version is too old to compile Hyprland!" + elif tc-is-clang && ver_test $(clang-version) -lt 18 ; then + eerror "Hyprpolkitagent requires >=sys-devel/clang-18 to build" + eerror "Please upgrade Clang: emerge -v1 sys-devel/clang" + die "Clang version is too old to compile Hyprland!" + fi +}
