commit:     d1a59f75541fc4aa41e9cf8d89a03bd172c4b47e
Author:     Ronny (tastytea) Gutbrod <gentoo <AT> tastytea <DOT> de>
AuthorDate: Thu Sep 22 10:10:40 2022 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Thu Sep 22 10:10:40 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d1a59f75

app-editors/imhex: die early if gcc is too old

Signed-off-by: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea.de>

 app-editors/imhex/imhex-1.22.0-r1.ebuild | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/app-editors/imhex/imhex-1.22.0-r1.ebuild 
b/app-editors/imhex/imhex-1.22.0-r1.ebuild
index 6d16b8837..6e5fb12bb 100644
--- a/app-editors/imhex/imhex-1.22.0-r1.ebuild
+++ b/app-editors/imhex/imhex-1.22.0-r1.ebuild
@@ -7,7 +7,7 @@ CMAKE_BUILD_TYPE="Release"
 CMAKE_MAKEFILE_GENERATOR="emake"
 PYTHON_COMPAT=( python3_{8..11} )
 
-inherit cmake desktop llvm python-r1 xdg
+inherit cmake desktop llvm python-r1 toolchain-funcs xdg
 
 DESCRIPTION="A hex editor for reverse engineers, programmers, and eyesight"
 HOMEPAGE="https://github.com/WerWolv/ImHex";
@@ -51,6 +51,12 @@ BDEPEND="
        sys-devel/llvm
 "
 
+pkg_pretend() {
+       if tc-is-gcc && [[ $(gcc-major-version) -lt 12 ]]; then
+               die "${PN} requires GCC 12 or newer"
+       fi
+}
+
 src_prepare() {
        default
        # Due to network sandboxing, we can't do network test here.

Reply via email to