gnome-extra/gnome-commander: check for gcc version correctly
authorUwe Scholz <uwescholz@src.gnome.org>
Wed, 1 May 2019 19:58:16 +0000 (21:58 +0200)
committerMichał Górny <mgorny@gentoo.org>
Sun, 7 Jul 2019 16:24:20 +0000 (18:24 +0200)
Signed-off-by: Uwe Scholz <uwescholz@src.gnome.org>
Closes: https://github.com/gentoo/gentoo/pull/11873
Signed-off-by: Michał Górny <mgorny@gentoo.org>
gnome-extra/gnome-commander/gnome-commander-1.10.0.ebuild

index a5e742b15f161e6b0aee5dd1898547b092daf6bd..87303c532e846f1e4532664d1e396669af7a2587 100644 (file)
@@ -1,11 +1,11 @@
-# Copyright 1999-2019 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 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-1.7.0 )
 "
@@ -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 to 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."