Remove extraneous is_mac call

This commit is contained in:
Ivan Pozdeev 2022-09-17 04:54:04 +03:00
parent e6446555f3
commit aa07a3a37c
3 changed files with 10 additions and 10 deletions

View file

@ -1330,7 +1330,7 @@ use_homebrew() {
can_use_homebrew || return 1
# unless Homebrew is at the default /usr/local, need to add its paths to
# compiler search to be able to use non-keg-only deps from there
if is_mac && command -v brew &>/dev/null; then
if command -v brew &>/dev/null; then
local brew_prefix="$(brew --prefix 2>/dev/null || true)"
# /usr/local/lib:/usr/lib is the default library search path
if [[ -n $brew_prefix && $brew_prefix != "/usr" && $brew_prefix != "/usr/local" ]]; then

View file

@ -151,7 +151,7 @@ OUT
BREW_PREFIX="$TMP/homebrew-prefix"
mkdir -p "$BREW_PREFIX"
for i in {1..9}; do stub uname '-s : echo Darwin'; done
for i in {1..8}; do stub uname '-s : echo Darwin'; done
for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done
stub brew "--prefix : echo '$BREW_PREFIX'" false
stub_make_install
@ -179,7 +179,7 @@ OUT
brew_libdir="$TMP/homebrew-yaml"
mkdir -p "$brew_libdir"
for i in {1..10}; do stub uname '-s : echo Darwin'; done
for i in {1..9}; do stub uname '-s : echo Darwin'; done
for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done
stub brew "--prefix libyaml : echo '$brew_libdir'"
for i in {1..4}; do stub brew false; done
@ -234,7 +234,7 @@ OUT
readline_libdir="$TMP/homebrew-readline"
mkdir -p "$readline_libdir"
for i in {1..8}; do stub uname '-s : echo Darwin'; done
for i in {1..7}; do stub uname '-s : echo Darwin'; done
for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done
for i in {1..2}; do stub brew false; done
stub brew "--prefix readline : echo '$readline_libdir'"
@ -317,7 +317,7 @@ OUT
mkdir -p "$readline_libdir/include/readline"
touch "$readline_libdir/include/readline/rlconf.h"
for i in {1..8}; do stub uname '-s : echo Darwin'; done
for i in {1..7}; do stub uname '-s : echo Darwin'; done
for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done
for i in {1..3}; do stub brew false; done
@ -349,7 +349,7 @@ OUT
mkdir -p "$tcl_tk_libdir/lib"
echo "TCL_VERSION='$tcl_tk_version'" >>"$tcl_tk_libdir/lib/tclConfig.sh"
for i in {1..10}; do stub uname '-s : echo Darwin'; done
for i in {1..9}; do stub uname '-s : echo Darwin'; done
for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done
stub brew false
@ -383,7 +383,7 @@ OUT
tcl_tk_version_long="8.6.10"
tcl_tk_version="${tcl_tk_version_long%.*}"
for i in {1..9}; do stub uname '-s : echo Darwin'; done
for i in {1..8}; do stub uname '-s : echo Darwin'; done
for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done
for i in {1..4}; do stub brew false; done
@ -411,7 +411,7 @@ OUT
@test "number of CPU cores defaults to 2" {
cached_tarball "Python-3.6.2"
for i in {1..10}; do stub uname '-s : echo Darwin'; done
for i in {1..9}; do stub uname '-s : echo Darwin'; done
for i in {1..2}; do stub sw_vers '-productVersion : echo 10.10'; done
stub sysctl false
@ -438,7 +438,7 @@ OUT
@test "number of CPU cores is detected on Mac" {
cached_tarball "Python-3.6.2"
for i in {1..10}; do stub uname '-s : echo Darwin'; done
for i in {1..9}; do stub uname '-s : echo Darwin'; done
for i in {1..2}; do stub sw_vers '-productVersion : echo 10.10'; done
stub sysctl '-n hw.ncpu : echo 4'

View file

@ -63,7 +63,7 @@ DEF
mkdir -p "$INSTALL_ROOT"
cd "$INSTALL_ROOT"
for i in {1..10}; do stub uname '-s : echo Darwin'; done
for i in {1..9}; do stub uname '-s : echo Darwin'; done
for i in {1..3}; do stub sw_vers '-productVersion : echo 10.10'; done
stub cc 'false'