dev-libs/icu: Add gcc version check
authorAndreas K. Hüttel <dilfridge@gentoo.org>
Sun, 5 Feb 2017 12:18:29 +0000 (13:18 +0100)
committerAndreas K. Hüttel <dilfridge@gentoo.org>
Sun, 5 Feb 2017 12:19:43 +0000 (13:19 +0100)
Package-Manager: Portage-2.3.3, Repoman-2.3.1

dev-libs/icu/icu-58.1-r1.ebuild
dev-libs/icu/icu-58.2.ebuild

index 98327a1856e3e6918980d2051b08ee007e1bac10..fc0a00e439983100ebfd95b768f770df601df30c 100644 (file)
@@ -35,6 +35,15 @@ PATCHES=(
        "${FILESDIR}/${PN}-58.1-iterator.patch"
 )
 
+pkg_pretend() {
+       if tc-is-gcc ; then
+               if [[ $(gcc-major-version) == 4 && $(gcc-minor-version) -lt 9 \
+                       || $(gcc-major-version) -lt 4 ]] ; then
+                               die "You need at least sys-devel/gcc-4.8.3"
+               fi
+       fi
+}
+
 src_prepare() {
        # apply patches
        default
@@ -63,6 +72,13 @@ src_configure() {
        # Use C++14
        append-cxxflags -std=c++14
 
+       if tc-is-gcc ; then
+               if [[ $(gcc-major-version) == 4 && $(gcc-minor-version) -lt 9 \
+                       || $(gcc-major-version) -lt 4 ]] ; then
+                               die "You need at least sys-devel/gcc-4.8.3"
+               fi
+       fi
+
        if tc-is-cross-compiler; then
                mkdir "${WORKDIR}"/host || die
                pushd "${WORKDIR}"/host >/dev/null || die
index 449b5d5ef3747e157e544f7a43f4e8b34ff5455b..ed2bf037731ec4da4e08d53f29d442469f1184e1 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -35,6 +35,15 @@ PATCHES=(
        "${FILESDIR}/${PN}-58.1-iterator.patch"
 )
 
+pkg_pretend() {
+       if tc-is-gcc ; then
+               if [[ $(gcc-major-version) == 4 && $(gcc-minor-version) -lt 9 \
+                       || $(gcc-major-version) -lt 4 ]] ; then
+                               die "You need at least sys-devel/gcc-4.8.3"
+               fi
+       fi
+}
+
 src_prepare() {
        # apply patches
        default
@@ -63,6 +72,13 @@ src_configure() {
        # Use C++14
        append-cxxflags -std=c++14
 
+       if tc-is-gcc ; then
+               if [[ $(gcc-major-version) == 4 && $(gcc-minor-version) -lt 9 \
+                       || $(gcc-major-version) -lt 4 ]] ; then
+                               die "You need at least sys-devel/gcc-4.8.3"
+               fi
+       fi
+
        if tc-is-cross-compiler; then
                mkdir "${WORKDIR}"/host || die
                pushd "${WORKDIR}"/host >/dev/null || die