toolchain.eclass: use https:// for git protocol, bug #717056
[gentoo.git] / eclass / portability.eclass
index 2e4e01d51432f79bedafdead82e0b3e4436ca48a..1402c0420cb0c6b16a58f94ea7c9901f04c557b8 100644 (file)
@@ -1,6 +1,5 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 # @ECLASS: portability.eclass
 # @MAINTAINER:
@@ -68,8 +67,8 @@ seq() {
 
        # Screw it, do the output ourselves
        while :; do
-               [[ $max < $min && $step > 0 ]] && break
-               [[ $min < $max && $step < 0 ]] && break
+               [[ $max -lt $min && $step -gt 0 ]] && break
+               [[ $min -lt $max && $step -gt 0 ]] && break
                echo $min
                : $(( min += step ))
        done
@@ -98,7 +97,7 @@ dlopen_lib() {
 # @USAGE:
 # @RETURN: system version of make
 # @DESCRIPTION:
-# Gets the name of the BSD-ish make command (pmake from NetBSD)
+# Gets the name of the BSD-ish make command (bmake from NetBSD)
 #
 # This will return make (provided by system packages) for BSD userlands,
 # or bsdmake for Darwin userlands and pmake for the rest of userlands,
@@ -107,12 +106,12 @@ dlopen_lib() {
 # Note: the bsdmake for Darwin userland is with compatibility with MacOSX
 # default name.
 get_bmake() {
-       if [[ ${USERLAND} == *BSD ]]; then
+       if [[ ${CBUILD:-${CHOST}} == *bsd* ]]; then
                echo make
-       elif [[ ${USERLAND} == "Darwin" ]]; then
+       elif [[ ${CBUILD:-${CHOST}} == *darwin* ]]; then
                echo bsdmake
        else
-               echo pmake
+               echo bmake
        fi
 }