|
|
b735c0 |
#!/bin/bash
|
|
|
b735c0 |
|
|
|
f30319 |
# zlib not required because it is already part of OSX
|
|
|
f30319 |
|
|
|
f30319 |
# Travis-CI workaround
|
|
|
f30319 |
# When we install a package that is already installed inside the travis VM, and we have an outdated brew
|
|
|
f30319 |
# (for faster build), then we get an error and the build fails. Unfortunately brew doesn't have switch to skip
|
|
|
f30319 |
# already installed packages (https://github.com/Homebrew/brew/issues/2491) and recommends to install using
|
|
|
f30319 |
# brew bundle. But! `brew bundle` can't be run without updating brew and fails with error "Your Homebrew is outdated".
|
|
|
f30319 |
# Yep, i know what and this is what i want. So here is workaround: first we check which package is not already installed,
|
|
|
f30319 |
# and if not then install it.
|
|
|
f30319 |
|
|
|
f30319 |
|
|
|
f30319 |
set -e
|
|
|
f30319 |
|
|
|
6d59cf |
if ! ( which brew >/dev/null ); then
|
|
|
6d59cf |
echo "No brew found. Installing..."
|
|
|
6d59cf |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
|
|
6d59cf |
fi
|
|
|
6d59cf |
|
|
|
c10c19 |
WORKDIR=`dirname "$0"`
|
|
|
c10c19 |
pushd "${WORKDIR}" > /dev/null
|
|
|
c10c19 |
WORKDIR=`pwd`
|
|
|
c10c19 |
popd > /dev/null
|
|
|
c10c19 |
|
|
AnishGulati |
5af128 |
PACKAGES="adwaita-icon-theme autoconf automake ccache libtool intltool imagemagick gettext pkg-config glibmm libxml++ cairo fftw pango mlt boost gtkmm3 sdl2 sdl2_mixer libxml2 libxslt"
|
|
|
f30319 |
|
|
|
f30319 |
export HOMEBREW_NO_AUTO_UPDATE=1
|
|
|
f30319 |
export HOMEBREW_NO_ANALYTICS=1
|
|
|
f30319 |
|
|
|
faf931 |
export OS=`uname -r | cut -d "." -f1`
|
|
|
faf931 |
|
|
|
27bb89 |
if [ $OS -lt 15 ] && [ -z "$TRAVIS_BUILD_DIR" ]; then # For OSX < 10.11
|
|
|
678cc3 |
# We need librsvg package, but the latest version shipped by Homebrew
|
|
|
678cc3 |
# depends on Rust, which is fails to compile on OSX < 10.11.
|
|
|
678cc3 |
# So, we are rolling back Homebrew's history of packages to use older
|
|
|
678cc3 |
# version of librsvg.
|
|
|
27bb89 |
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/
|
|
|
27bb89 |
git fetch --unshallow || true
|
|
luz.paz |
99f3ef |
git checkout a91becd6afc177b0cada2cf9cce2e3bde514053b # librsvg 2.40.20 (without rust) 2017.12.16
|
|
|
27bb89 |
cd /usr/local/Homebrew/
|
|
|
27bb89 |
git checkout 1.4.1
|
|
|
27bb89 |
brew info gobject-introspection | grep --quiet 'Not installed' && brew install ${WORKDIR}/autobuild/osx/gobject-introspection.rb
|
|
|
faf931 |
fi
|
|
|
faf931 |
|
|
|
f30319 |
for pkg in $PACKAGES;
|
|
|
f30319 |
do
|
|
|
f30319 |
echo "Checking $pkg..."
|
|
|
f30319 |
brew info "$pkg" | grep --quiet 'Not installed' && brew install "$pkg"
|
|
|
f30319 |
done
|
|
|
f30319 |
|
|
AnishGulati |
2a886a |
if ! ( which pip >/dev/null ); then
|
|
AnishGulati |
2a886a |
echo "No pip found. Installing..."
|
|
AnishGulati |
2a886a |
echo "Running python in sudo (you need root privelegies to do that)..."
|
|
AnishGulati |
2a886a |
# Dependency for lxml
|
|
AnishGulati |
2a886a |
curl https://bootstrap.pypa.io/get-pip.py | sudo python
|
|
AnishGulati |
2a886a |
fi
|
|
AnishGulati |
2a886a |
|
|
AnishGulati |
5af128 |
# Installing lxml using pip
|
|
AnishGulati |
5af128 |
STATIC_DEPS=true sudo pip install lxml
|
|
AnishGulati |
5af128 |
|
|
AnishGulati |
5af128 |
|
|
|
f30319 |
#HOMEBREW_NO_AUTO_UPDATE=1 brew bundle -no-upgrade --file=-<<-EOF
|
|
|
f30319 |
#brew "autoconf"
|
|
|
f30319 |
#brew "automake"
|
|
|
f30319 |
#brew "boost"
|
|
|
f30319 |
#brew "cairo"
|
|
|
f30319 |
#brew "fftw"
|
|
|
f30319 |
#brew "gettext"
|
|
|
f30319 |
#brew "glibmm"
|
|
|
f30319 |
#brew "gtkmm3"
|
|
|
f30319 |
#brew "intltool"
|
|
|
f30319 |
#brew "libtool"
|
|
|
f30319 |
#brew "libxml++"
|
|
|
f30319 |
#brew "mlt"
|
|
|
f30319 |
#brew "pango"
|
|
|
f30319 |
#brew "pkg-config"
|
|
|
f30319 |
#EOF
|