forked from synfig/synfig
-
Notifications
You must be signed in to change notification settings - Fork 0
/
1-setup-osx-brew.sh
executable file
·63 lines (51 loc) · 2.07 KB
/
1-setup-osx-brew.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
# zlib not required because it is already part of OSX
# Travis-CI workaround
# When we install a package that is already installed inside the travis VM, and we have an outdated brew
# (for faster build), then we get an error and the build fails. Unfortunately brew doesn't have switch to skip
# already installed packages (https://github.com/Homebrew/brew/issues/2491) and recommends to install using
# brew bundle. But! `brew bundle` can't be run without updating brew and fails with error "Your Homebrew is outdated".
# Yep, i know what and this is what i want. So here is workaround: first we check which package is not already installed,
# and if not then install it.
set -e
if ! ( which brew >/dev/null ); then
echo "No brew found. Installing..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
WORKDIR=`dirname "$0"`
pushd "${WORKDIR}" > /dev/null
WORKDIR=`pwd`
popd > /dev/null
PACKAGES="adwaita-icon-theme autoconf automake ccache libtool intltool imagemagick gettext pkg-config glibmm libxml++ cairo fftw pango mlt boost gtkmm3 sdl2 sdl2_mixer"
export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_ANALYTICS=1
export OS=`uname -r | cut -d "." -f1`
if [ $OS -lt 15 ] && [ -z "$TRAVIS_BUILD_DIR" ]; then # For OSX < 10.11
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/
git fetch --unshallow || true
git checkout a91becd6afc177b0cada2cf9cce2e3bde514053b # librsvg 2.40.20 (wothout rust) 2017.12.16
cd /usr/local/Homebrew/
git checkout 1.4.1
brew info gobject-introspection | grep --quiet 'Not installed' && brew install ${WORKDIR}/autobuild/osx/gobject-introspection.rb
fi
for pkg in $PACKAGES;
do
echo "Checking $pkg..."
brew info "$pkg" | grep --quiet 'Not installed' && brew install "$pkg"
done
#HOMEBREW_NO_AUTO_UPDATE=1 brew bundle -no-upgrade --file=-<<-EOF
#brew "autoconf"
#brew "automake"
#brew "boost"
#brew "cairo"
#brew "fftw"
#brew "gettext"
#brew "glibmm"
#brew "gtkmm3"
#brew "intltool"
#brew "libtool"
#brew "libxml++"
#brew "mlt"
#brew "pango"
#brew "pkg-config"
#EOF