[GTK] Move basic dependency installation to a script
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Mar 2013 18:30:58 +0000 (18:30 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Mar 2013 18:30:58 +0000 (18:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=110692

Patch by Martin Robinson  <mrobinson@igalia.com> and Tomas Popela <tpopela@redhat.com> on 2013-03-05
Reviewed by Gustavo Noronha Silva.

* gtk/install-dependencies: Added. A Script which installs all dependencies
necessary for building for Debian-based distributions and Fedora.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144780 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/gtk/install-dependencies [new file with mode: 0755]

index 3852c1e..1e83698 100644 (file)
@@ -1,3 +1,13 @@
+2013-03-05  Martin Robinson  <mrobinson@igalia.com> and Tomas Popela  <tpopela@redhat.com>
+
+        [GTK] Move basic dependency installation to a script
+        https://bugs.webkit.org/show_bug.cgi?id=110692
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * gtk/install-dependencies: Added. A Script which installs all dependencies
+        necessary for building for Debian-based distributions and Fedora.
+
 2013-03-05  James Robinson  <jamesr@chromium.org>
 
         Chromium DumpRenderTree dumps a core every time it's run (Linux/Debug)
diff --git a/Tools/gtk/install-dependencies b/Tools/gtk/install-dependencies
new file mode 100755 (executable)
index 0000000..6d64319
--- /dev/null
@@ -0,0 +1,163 @@
+#!/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 \
+        gail-3.0 \
+        gawk \
+        gnome-common \
+        gperf \
+        gtk-doc-tools \
+        intltool \
+        libenchant-dev \
+        libfaad-dev \
+        libgail-3-dev \
+        libgail-dev \
+        libgeoclue-dev \
+        libgirepository1.0-dev \
+        libgl1-mesa-dev \
+        libgl1-mesa-glx \
+        libgnutls-dev \
+        libgudev-1.0-dev \
+        libicu-dev \
+        libjpeg62-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 \
+        libxslt1-dev \
+        libxt-dev \
+        libxtst-dev \
+        ruby
+
+    # 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 \
+        xvfb
+
+    # These are dependencies necessary for building the jhbuild.
+    apt-get install \
+        gobject-introspection \
+        icon-naming-utils \
+        libgcrypt11-dev \
+        libgpg-error-dev \
+        libp11-kit-dev \
+        libtiff4-dev \
+        libcroco3-dev
+}
+
+function installDependenciesWithYum {
+    # These are dependencies necessary for building WebKitGTK+.
+    yum install \
+        autoconf \
+        automake \
+        bison \
+        cairo-devel \
+        enchant-devel \
+        flex \
+        fontconfig-devel \
+        freetype-devel \
+        gcc-c++ \
+        geoclue-devel \
+        gettext \
+        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 \
+        libgudev1-devel \
+        mesa-libGL-devel \
+        pcre-devel \
+        ruby \
+        sqlite-devel \
+        perl-Switch \
+        perl-version
+
+    # These are dependencies necessary for running tests.
+    yum install \
+        httpd \
+        curl \
+        mod_bw \
+        libgpg-error-devel \
+        pulseaudio-utils \
+        pygobject3-base \
+        ruby \
+        xorg-x11-server-Xvfb
+
+    # 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
+}
+
+checkInstaller
+