Skip to content

Commit

Permalink
sci-physics/root: fix compiler check
Browse files Browse the repository at this point in the history
Previously compiler check was performed only against provided
clang++ version, which is wrong.

Package-Manager: portage-2.2.26
Signed-off-by: Andrew Savchenko <[email protected]>
  • Loading branch information
bircoph committed Jan 16, 2016
1 parent 10f58c0 commit 78e3010
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
9 changes: 6 additions & 3 deletions sci-physics/root/root-5.34.26.ebuild
Original file line number Diff line number Diff line change
@@ -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$

Expand Down Expand Up @@ -132,24 +132,27 @@ 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."
ewarn "Please report any issues upstream."
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() {
Expand Down
9 changes: 6 additions & 3 deletions sci-physics/root/root-5.34.32.ebuild
Original file line number Diff line number Diff line change
@@ -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$

Expand Down Expand Up @@ -126,24 +126,27 @@ 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."
ewarn "Please report any issues upstream."
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() {
Expand Down
9 changes: 6 additions & 3 deletions sci-physics/root/root-6.02.05-r2.ebuild
Original file line number Diff line number Diff line change
@@ -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$

Expand Down Expand Up @@ -132,26 +132,29 @@ 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."
ewarn "Please report any issues upstream."
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() {
Expand Down
9 changes: 6 additions & 3 deletions sci-physics/root/root-6.04.06.ebuild
Original file line number Diff line number Diff line change
@@ -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$

Expand Down Expand Up @@ -127,26 +127,29 @@ 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."
ewarn "Please report any issues upstream."
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() {
Expand Down

0 comments on commit 78e3010

Please sign in to comment.