commit:     78e301088323f0655e506654adc48ae22470d86b
Author:     Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 16 10:20:03 2016 +0000
Commit:     Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
CommitDate: Sat Jan 16 10:21:29 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78e30108

sci-physics/root: fix compiler check

Previously compiler check was performed only against provided
clang++ version, which is wrong.

Package-Manager: portage-2.2.26
Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org>

 sci-physics/root/root-5.34.26.ebuild    | 9 ++++++---
 sci-physics/root/root-5.34.32.ebuild    | 9 ++++++---
 sci-physics/root/root-6.02.05-r2.ebuild | 9 ++++++---
 sci-physics/root/root-6.04.06.ebuild    | 9 ++++++---
 4 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/sci-physics/root/root-5.34.26.ebuild 
b/sci-physics/root/root-5.34.26.ebuild
index b498a18..80feeae 100644
--- a/sci-physics/root/root-5.34.26.ebuild
+++ b/sci-physics/root/root-5.34.26.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -132,16 +132,19 @@ die_compiler() {
 # $3 - clang++
 # $4 - icc/icpc
 check_compiler() {
-       local ver
+       local cur ver
        case "$(tc-getCXX)" in
                *clang++*)
                        ver="$(best_version sys-devel/clang | sed 
's:sys-devel/clang-::')"
+                       cur="$3"
                ;;
                *g++*)
                        ver="$(gcc-version)"
+                       cur="$2"
                ;;
                *icc*|*icpc*)
                        ver="$(best_version dev-lang/icc | sed 
's:dev-lang/icc-::')"
+                       cur="$4"
                ;;
                *)
                        ewarn "You are using an unsupported compiler."
@@ -149,7 +152,7 @@ check_compiler() {
                        return 0
                ;;
        esac
-       version_is_at_least "$3" "${ver}" || die_compiler "$1" "$2" "$3" "$4" 
"${ver}"
+       version_is_at_least "${cur}" "${ver}" || die_compiler "$1" "$2" "$3" 
"$4" "${ver}"
 }
 
 pkg_setup() {

diff --git a/sci-physics/root/root-5.34.32.ebuild 
b/sci-physics/root/root-5.34.32.ebuild
index 915e712..2fb31dc 100644
--- a/sci-physics/root/root-5.34.32.ebuild
+++ b/sci-physics/root/root-5.34.32.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -126,16 +126,19 @@ die_compiler() {
 # $3 - clang++
 # $4 - icc/icpc
 check_compiler() {
-       local ver
+       local cur ver
        case "$(tc-getCXX)" in
                *clang++*)
                        ver="$(best_version sys-devel/clang | sed 
's:sys-devel/clang-::')"
+                       cur="$3"
                ;;
                *g++*)
                        ver="$(gcc-version)"
+                       cur="$2"
                ;;
                *icc*|*icpc*)
                        ver="$(best_version dev-lang/icc | sed 
's:dev-lang/icc-::')"
+                       cur="$4"
                ;;
                *)
                        ewarn "You are using an unsupported compiler."
@@ -143,7 +146,7 @@ check_compiler() {
                        return 0
                ;;
        esac
-       version_is_at_least "$3" "${ver}" || die_compiler "$1" "$2" "$3" "$4" 
"${ver}"
+       version_is_at_least "${cur}" "${ver}" || die_compiler "$1" "$2" "$3" 
"$4" "${ver}"
 }
 
 pkg_setup() {

diff --git a/sci-physics/root/root-6.02.05-r2.ebuild 
b/sci-physics/root/root-6.02.05-r2.ebuild
index 0ce7393..5bb8741 100644
--- a/sci-physics/root/root-6.02.05-r2.ebuild
+++ b/sci-physics/root/root-6.02.05-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -132,18 +132,21 @@ die_compiler() {
 # $3 - clang++
 # $4 - icc/icpc
 check_compiler() {
-       local ver
+       local cur ver
        case "$(tc-getCXX)" in
                *clang++*)
                        ver="$(best_version sys-devel/clang | sed 
's:sys-devel/clang-::')"
+                       cur="$3"
                ;;
                *g++*)
                        ver="$(gcc-version)"
+                       cur="$2"
                ;;
                *icc*|*icpc*)
                        ver="$(best_version dev-lang/icc | sed 
's:dev-lang/icc-::')"
                        eerror "ROOT-6 is known not to build with ICC."
                        eerror "Please report any isuses upstream."
+                       cur="$4"
                ;;
                *)
                        ewarn "You are using an unsupported compiler."
@@ -151,7 +154,7 @@ check_compiler() {
                        return 0
                ;;
        esac
-       version_is_at_least "$3" "${ver}" || die_compiler "$1" "$2" "$3" "$4" 
"${ver}"
+       version_is_at_least "${cur}" "${ver}" || die_compiler "$1" "$2" "$3" 
"$4" "${ver}"
 }
 
 pkg_setup() {

diff --git a/sci-physics/root/root-6.04.06.ebuild 
b/sci-physics/root/root-6.04.06.ebuild
index f498a73..093ad9f 100644
--- a/sci-physics/root/root-6.04.06.ebuild
+++ b/sci-physics/root/root-6.04.06.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -127,18 +127,21 @@ die_compiler() {
 # $3 - clang++
 # $4 - icc/icpc
 check_compiler() {
-       local ver
+       local cur ver
        case "$(tc-getCXX)" in
                *clang++*)
                        ver="$(best_version sys-devel/clang | sed 
's:sys-devel/clang-::')"
+                       cur="$3"
                ;;
                *g++*)
                        ver="$(gcc-version)"
+                       cur="$2"
                ;;
                *icc*|*icpc*)
                        ver="$(best_version dev-lang/icc | sed 
's:dev-lang/icc-::')"
                        eerror "ROOT-6 is known not to build with ICC."
                        eerror "Please report any isuses upstream."
+                       cur="$4"
                ;;
                *)
                        ewarn "You are using an unsupported compiler."
@@ -146,7 +149,7 @@ check_compiler() {
                        return 0
                ;;
        esac
-       version_is_at_least "$3" "${ver}" || die_compiler "$1" "$2" "$3" "$4" 
"${ver}"
+       version_is_at_least "${cur}" "${ver}" || die_compiler "$1" "$2" "$3" 
"$4" "${ver}"
 }
 
 pkg_setup() {

Reply via email to