summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Savchenko <bircoph@gentoo.org>2016-01-16 13:20:03 +0300
committerAndrew Savchenko <bircoph@gentoo.org>2016-01-16 13:21:29 +0300
commit78e301088323f0655e506654adc48ae22470d86b (patch)
tree7f2b090d6e158409c314dbaf6911794d2daa24a3 /sci-physics/root/root-5.34.26.ebuild
parentsys-apps/pkgcore: update zsh completion file location (diff)
downloadgentoo-78e301088323f0655e506654adc48ae22470d86b.tar.gz
gentoo-78e301088323f0655e506654adc48ae22470d86b.tar.bz2
gentoo-78e301088323f0655e506654adc48ae22470d86b.zip
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@gentoo.org>
Diffstat (limited to 'sci-physics/root/root-5.34.26.ebuild')
-rw-r--r--sci-physics/root/root-5.34.26.ebuild9
1 files changed, 6 insertions, 3 deletions
diff --git a/sci-physics/root/root-5.34.26.ebuild b/sci-physics/root/root-5.34.26.ebuild
index b498a18babee..80feeaef14f5 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() {