| #!/bin/bash |
| |
| # This script needs to be run with root rights. |
| if [ $UID -ne 0 ]; then |
| sudo $0 |
| exit 0 |
| fi |
| |
| function printNotSupportedMessageAndExit() { |
| echo |
| echo "Currently this script only works for distributions supporting apt-get and yum." |
| echo "Please add support for your distribution: http://webkit.org/b/110693" |
| echo |
| exit 1 |
| } |
| |
| function checkInstaller { |
| # apt-get - Debian based distributions |
| apt-get --version &> /dev/null |
| if [ $? -eq 0 ]; then |
| installDependenciesWithApt |
| exit 0 |
| fi |
| |
| # yum - Fedora |
| yum --version &> /dev/null |
| if [ $? -eq 0 ]; then |
| installDependenciesWithYum |
| exit 0 |
| fi |
| |
| printNotSupportedMessageAndExit |
| } |
| |
| function installDependenciesWithApt { |
| # These are dependencies necessary for building WebKitGTK+. |
| apt-get install \ |
| autoconf \ |
| automake \ |
| autopoint \ |
| autotools-dev \ |
| bison \ |
| flex \ |
| gawk \ |
| gnome-common \ |
| gperf \ |
| gtk-doc-tools \ |
| intltool \ |
| libatk1.0-dev \ |
| libenchant-dev \ |
| libfaad-dev \ |
| libgeoclue-dev \ |
| libgirepository1.0-dev \ |
| libgl1-mesa-dev \ |
| libgl1-mesa-glx \ |
| libgnutls-dev \ |
| libgtk2.0-dev \ |
| libgudev-1.0-dev \ |
| libicu-dev \ |
| libjpeg8-dev \ |
| libmpg123-dev \ |
| libopus-dev \ |
| libpango1.0-dev \ |
| libpng12-dev \ |
| libpulse-dev \ |
| librsvg2-dev \ |
| libsecret-1-dev \ |
| libsqlite3-dev \ |
| libtheora-dev \ |
| libtool \ |
| libvorbis-dev \ |
| libwebp-dev \ |
| libxcomposite-dev \ |
| libxslt1-dev \ |
| libxt-dev \ |
| libxtst-dev \ |
| ruby \ |
| xfonts-utils |
| |
| # These are dependencies necessary for running tests. |
| apt-get install \ |
| apache2 \ |
| curl \ |
| libapache2-mod-bw \ |
| libapache2-mod-php5 \ |
| libgpg-error-dev \ |
| pulseaudio-utils \ |
| python-gi \ |
| ruby |
| |
| # These are dependencies necessary for building the jhbuild. |
| apt-get install \ |
| gobject-introspection \ |
| icon-naming-utils \ |
| libegl1-mesa-dev \ |
| libgcrypt11-dev \ |
| libgpg-error-dev \ |
| libp11-kit-dev \ |
| libtiff5-dev \ |
| libcroco3-dev \ |
| ragel \ |
| xutils-dev \ |
| xtrans-dev \ |
| libxfont-dev \ |
| libpciaccess-dev \ |
| x11proto-bigreqs-dev \ |
| x11proto-composite-dev \ |
| x11proto-gl-dev \ |
| x11proto-input-dev \ |
| x11proto-video-dev \ |
| x11proto-scrnsaver-dev \ |
| x11proto-resource-dev \ |
| x11proto-xcmisc-dev \ |
| x11proto-xf86dri-dev \ |
| x11proto-randr-dev \ |
| libxkbfile-dev |
| } |
| |
| function installDependenciesWithYum { |
| # These are dependencies necessary for building WebKitGTK+. |
| yum install \ |
| autoconf \ |
| automake \ |
| bison \ |
| atk-devel \ |
| cairo-devel \ |
| enchant-devel \ |
| flex \ |
| fontconfig-devel \ |
| freetype-devel \ |
| gcc-c++ \ |
| geoclue-devel \ |
| gettext-devel \ |
| gobject-introspection-devel \ |
| gperf \ |
| gstreamer1-devel \ |
| gstreamer1-plugins-base-devel \ |
| gtk2-devel \ |
| gtk3-devel \ |
| gtk-doc \ |
| harfbuzz-devel \ |
| libsoup-devel \ |
| libicu-devel \ |
| libjpeg-turbo-devel \ |
| libpng-devel \ |
| libsecret-devel \ |
| libwebp-devel \ |
| libxslt-devel \ |
| libXt-devel \ |
| libXtst-devel \ |
| libgudev1-devel \ |
| mesa-libGL-devel \ |
| pcre-devel \ |
| ruby \ |
| sqlite-devel \ |
| perl-Switch \ |
| perl-version \ |
| python-devel |
| |
| # These are dependencies necessary for running tests. |
| yum install \ |
| httpd \ |
| mod_bw \ |
| mod_ssl \ |
| php \ |
| curl \ |
| libgpg-error-devel \ |
| pulseaudio-utils \ |
| pygobject3-base \ |
| ruby |
| |
| # These are dependencies necessary for building the jhbuild. |
| yum install \ |
| gobject-introspection \ |
| icon-naming-utils \ |
| libgcrypt-devel \ |
| libgpg-error-devel \ |
| libp11-devel \ |
| libtiff-devel \ |
| libcroco-devel \ |
| mesa-libEGL-devel \ |
| ragel \ |
| xorg-x11-util-macros \ |
| xorg-x11-xtrans-devel \ |
| xorg-x11-proto-devel \ |
| libXfont-devel \ |
| libxkbfile-devel \ |
| libpciaccess-devel |
| } |
| |
| checkInstaller |
| |