skia2/tools/install_dependencies.sh
tikuta d9ee597ce0 Add some required packages to tools/install_dependencies.sh
https://skia.org/user/quick/linux

I added following to build skia library.
* freeglut3-dev
* libglu1-mesa-dev
* libosmesa6-dev

Minor:
* fix indent
* sort package list in alphabetical order

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2303733003

Review-Url: https://codereview.chromium.org/2303733003
2016-09-02 05:21:40 -07:00

52 lines
1.2 KiB
Bash
Executable File

#!/bin/sh
# Copyright 2014 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# install_dependencies.sh will install system-specific Skia
# dependencies using your system's package manager. If your system is
# not supported, add logic here to support it.
set -e
# Return 0 iff all package name arguments are installed.
dpkg_all_installed() {
for arg; do
if !(dpkg-query -W -f'${Status}' "$arg" 2>/dev/null | \
grep -q "ok installed"); then
return 1
fi
done
return 0
}
if command -v lsb_release > /dev/null ; then
case $(lsb_release -i -s) in
Ubuntu)
PACKAGES=$(cat<<-EOF
build-essential
freeglut3-dev
libfontconfig-dev
libfreetype6-dev
libgif-dev
libglu1-mesa-dev
libosmesa6-dev
libpng12-dev
libqt4-dev
EOF
)
if [ $(lsb_release -r -s) = '14.04' ] ; then
PACKAGES="${PACKAGES} ninja-build"
fi
if ! dpkg_all_installed $PACKAGES; then
sudo apt-get install $PACKAGES
fi
exit
;;
esac
fi
echo 'unknown system'
exit 1