[gnome-commander] Check for gcc-8 improved in gentoo ebuild file, inherit from toolchain-funcs



commit 67f55146db8264e84d7221f7ad7fe7c77a55bece
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Mon Jun 10 14:43:10 2019 +0200

    Check for gcc-8 improved in gentoo ebuild file, inherit from toolchain-funcs

 data/gnome-commander.ebuild.in | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/data/gnome-commander.ebuild.in b/data/gnome-commander.ebuild.in
index 39362497..94f9a57c 100644
--- a/data/gnome-commander.ebuild.in
+++ b/data/gnome-commander.ebuild.in
@@ -5,7 +5,7 @@ EAPI=6
 
 GNOME2_LA_PUNT="yes"
 
-inherit gnome2
+inherit gnome2 toolchain-funcs
 
 DESCRIPTION="A graphical, full featured, twin-panel file manager"
 HOMEPAGE="https://gcmd.github.io/";
@@ -35,7 +35,6 @@ DEPEND="
        ${RDEPEND}
        dev-util/gtk-doc-am
        sys-devel/gettext
-       >=sys-devel/gcc-8.2.0
        virtual/pkgconfig
        test? ( >=dev-cpp/gtest-@GTEST_REQ@ )
 "
@@ -52,6 +51,13 @@ src_configure() {
                $(use_with unique)
 }
 
+pkg_pretend() {
+       if tc-is-gcc && [[ $(gcc-major-version) -lt 8 ]]; then
+               eerror "Compilation with gcc older than version 8 is not supported"
+               die "GCC too old, please use gcc-8 or above"
+       fi
+}
+
 pkg_postinst() {
        gnome2_pkg_postinst
        has_version dev-util/meld || elog "You need dev-util/meld to synchronize files and directories."


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]