qt5-build.eclass: update gcc version check for 5.7 and qtwebengine
authorDavide Pesavento <pesa@gentoo.org>
Sat, 23 Jan 2016 01:31:31 +0000 (02:31 +0100)
committerDavide Pesavento <pesa@gentoo.org>
Tue, 2 Feb 2016 18:35:11 +0000 (19:35 +0100)
(cherry picked from proj/qt commit 8ed3b65dd6316568c74cad5485936abd7f4f36a4)

eclass/qt5-build.eclass

index f71a35e4a270df2256e39b63059d62e43de69797..1830d21a09c1298bcff00960e872311711eb7473 100644 (file)
@@ -127,9 +127,14 @@ EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install sr
 # @DESCRIPTION:
 # Unpacks the sources.
 qt5-build_src_unpack() {
-       if [[ $(gcc-major-version) -lt 4 ]] || [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 5 ]]; then
+       local min_gcc4_minor_version=5
+       if [[ ${QT5_MINOR_VERSION} -ge 7 || ${PN} == qtwebengine ]]; then
+               min_gcc4_minor_version=7
+       fi
+       if [[ $(gcc-major-version) -lt 4 ]] || \
+          [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt ${min_gcc4_minor_version} ]]; then
                ewarn
-               ewarn "Using a GCC version lower than 4.5 is not supported."
+               ewarn "Using a GCC version lower than 4.${min_gcc4_minor_version} is not supported."
                ewarn
        fi