From d1a59f75541fc4aa41e9cf8d89a03bd172c4b47e Mon Sep 17 00:00:00 2001 From: "Ronny (tastytea) Gutbrod" Date: Thu, 22 Sep 2022 12:10:40 +0200 Subject: [PATCH] app-editors/imhex: die early if gcc is too old Signed-off-by: Ronny (tastytea) Gutbrod --- 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 6d16b8837d..6e5fb12bb7 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.