Use homebrew bundle to avoid errors on upgrade available.

`homebrew install` could exit with errors like:

```
Error: cmake 3.12.4 is already installed
To upgrade to 3.13.0, run `brew upgrade cmake`
```

This solution is the one recommended in https://github.com/Homebrew/brew/issues/2491
This commit is contained in:
Simon Sapin 2018-11-22 17:41:52 +01:00
parent 2b410acbf9
commit d406f90f32
2 changed files with 17 additions and 5 deletions

View file

@ -373,13 +373,10 @@ def macos_build_task(name):
.with_script(""" .with_script("""
mkdir -p "$HOME/homebrew" mkdir -p "$HOME/homebrew"
export PATH="$HOME/homebrew/bin:$PATH" export PATH="$HOME/homebrew/bin:$PATH"
which homebrew || curl -L https://github.com/Homebrew/brew/tarball/master \ which brew || curl -L https://github.com/Homebrew/brew/tarball/master \
| tar xz --strip 1 -C "$HOME/homebrew" | tar xz --strip 1 -C "$HOME/homebrew"
time brew install automake autoconf@2.13 pkg-config cmake yasm llvm time brew bundle install --no-upgrade --file=etc/taskcluster/macos/Brewfile
time brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad \
gst-libav gst-rtsp-server \
--with-orc --with-libogg --with-opus --with-pango --with-theora --with-libvorbis
export OPENSSL_INCLUDE_DIR="$(brew --prefix openssl)/include" export OPENSSL_INCLUDE_DIR="$(brew --prefix openssl)/include"
export OPENSSL_LIB_DIR="$(brew --prefix openssl)/lib" export OPENSSL_LIB_DIR="$(brew --prefix openssl)/lib"
""") """)

View file

@ -0,0 +1,15 @@
brew "autoconf@2.13"
brew "automake"
brew "cmake"
brew "openssl"
brew "pkg-config"
brew "gstreamer"
brew "gst-plugins-base", args: ["with-orc", "with-libogg", "with-opus", "with-theora", "with-libvorbis", "with-pango"]
brew "gst-libav"
brew "gst-plugins-bad"
brew "gst-plugins-good"
brew "gst-rtsp-server"
brew "htop"
brew "llvm"
brew "openssl@1.1"
brew "yasm"