summaryrefslogtreecommitdiff
path: root/Tools/gtk/install-dependencies
blob: 2d0fe86e9ef53f6ec232d228022e86151f612114 (plain)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
#!/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

    # dnf - Fedora 22 and above
    dnf --version &> /dev/null
    if [ $? -eq 0 ]; then
        installFedoraDependencies dnf
        exit 0
    fi

    # yum - Fedora 21 and below
    yum --version &> /dev/null
    if [ $? -eq 0 ]; then
        installFedoraDependencies yum
        exit 0
    fi

    # pacman - Arch Linux
    # pacman --version and pacman --help both return non-0
    pacman -Ss &> /dev/null
    if [ $? -eq 0 ]; then
        installDependenciesWithPacman
        exit 0
    fi

    printNotSupportedMessageAndExit
}

function installDependenciesWithApt {
    # These are dependencies necessary for building WebKitGTK+.
    apt-get install \
        autoconf \
        automake \
        autopoint \
        autotools-dev \
        bison \
        cmake \
        flex \
        gawk \
        gnome-common \
        gperf \
        gtk-doc-tools \
        intltool \
        itstool \
        libatk1.0-dev \
        libenchant-dev \
        libfaad-dev \
        libgeoclue-dev \
        libgirepository1.0-dev \
        libgl1-mesa-dev \
        libgl1-mesa-glx \
        libgnutls28-dev \
        libgtk2.0-dev \
        libgtk-3-dev \
        libgudev-1.0-dev \
        libharfbuzz-dev \
        libhyphen-dev \
        libicu-dev \
        libjpeg-dev \
        libmpg123-dev \
        libnotify-dev \
        libopus-dev \
        liborc-0.4-dev \
        libpango1.0-dev \
        libpng12-dev \
        libpulse-dev \
        librsvg2-dev \
        libsecret-1-dev \
        libsoup2.4-dev \
        libsqlite3-dev \
        libtheora-dev \
        libtool \
        libvorbis-dev \
        libwebp-dev \
        libxcomposite-dev \
        libxslt1-dev \
        libxt-dev \
        libxtst-dev \
        libwayland-dev \
        ruby \
        xfonts-utils

    # These are dependencies necessary for running tests.
    apt-get install \
        apache2 \
        curl \
        dbus-x11 \
        libapache2-mod-bw \
        libapache2-mod-php5 \
        libgpg-error-dev \
        pulseaudio-utils \
        python-gi \
        ruby \
        ruby-json \
        ruby-highline \
        xvfb

    # These are dependencies necessary for building the jhbuild.
    apt-get install \
        git \
        gobject-introspection \
        icon-naming-utils \
        libcroco3-dev \
        libegl1-mesa-dev \
        libepoxy-dev \
        libgcrypt11-dev \
        libgpg-error-dev \
        libjson-glib-dev \
        liborc-0.4-dev \
        libp11-kit-dev \
        libpciaccess-dev \
        libssl-dev \
        libtiff5-dev \
        libv4l-dev \
        libxcb-xfixes0-dev \
        libxfont-dev \
        libxkbfile-dev \
        llvm \
        llvm-dev \
        python-dev \
        ragel \
        x11proto-bigreqs-dev \
        x11proto-composite-dev \
        x11proto-gl-dev \
        x11proto-input-dev \
        x11proto-randr-dev \
        x11proto-resource-dev \
        x11proto-scrnsaver-dev \
        x11proto-video-dev \
        x11proto-xcmisc-dev \
        x11proto-xf86dri-dev \
        xfonts-utils \
        xtrans-dev \
        xutils-dev

    # These are dependencies necessary for using webkit-patch
    apt-get install \
        git-svn \
        subversion

    # ninja is a faster build system than GNU make, but it doesn't
    # exist on Ubuntu 12.04
    apt-get install ninja-build || true
}

function installDependenciesWithPacman {
    # These are dependencies necessary for building WebKitGTK+.
    packages=" \
        autoconf \
        automake \
        bison \
        cmake \
        file \
        findutils \
        flex \
        gawk \
        gcc \
        gettext \
        gnome-common \
        gperf \
        grep \
        groff \
        gzip \
        hyphen \
        libtool \
        m4 \
        make \
        patch \
        pkg-config \
        sed \
        texinfo \
        util-linux \
        which \
        gtk-doc \
        intltool \
        itstool \
        atk \
        enchant \
        faad2 \
        geoclue \
        gobject-introspection \
        mesa \
        mesa-libgl \
        gnutls \
        gtk2 \
        gtk3 \
        libsystemd \
        harfbuzz \
        harfbuzz-icu \
        icu \
        libjpeg-turbo \
        mpg123 \
        opus \
        pango \
        libnotify \
        libpng \
        libpulse \
        librsvg \
        libsecret \
        libsoup \
        sqlite \
        libtheora \
        libtool \
        libvorbis \
        libwebp \
        libxcomposite \
        libxslt \
        libxt \
        libxtst \
        ninja \
        ruby \
        xorg-font-utils \
        orc \
        wayland"

    # These are dependencies necessary for running tests.
    # Note: apache-mod_bw is available in the AUR, but the main repos
    #       could not find ruby-json
    packages="$packages \
        apache \
        curl \
        hunspell \
        hunspell-en \
        php-apache \
        libgpg-error \
        pulseaudio \
        python-gobject \
        ruby \
        ruby-highline \
        xorg-server-xvfb"

    # These are dependencies necessary for building the jhbuild.
    # Note: Could not find libegl-mesa
    packages="$packages \
        git \
        gobject-introspection \
        icon-naming-utils \
        libcroco \
        libepoxy \
        libgcrypt \
        libgpg-error \
        p11-kit \
        libpciaccess \
        libtiff \
        libxfixes \
        libxfont \
        libxkbfile \
        llvm \
        python2 \
        python2-lxml \
        ragel \
        bigreqsproto \
        compositeproto \
        glproto \
        inputproto \
        randrproto \
        resourceproto \
        scrnsaverproto \
        videoproto \
        xcmiscproto \
        xf86driproto \
        xorg-font-utils \
        xorg-util-macros \
        xtrans \
        xorg-utils"

    # These are dependencies necessary for using webkit-patch
    packages="$packages \
        svn"
    pacman -S --needed $packages

    echo "You will also need to follow the instructions on the Arch Wiki to make"
    echo "'python' call python2 in the webkit folder"
    echo "https://wiki.archlinux.org/index.php/Python#Dealing_with_version_problem_in_build_scripts"
}

function installFedoraDependencies {
    # These are dependencies necessary for building WebKitGTK+.
    $1 install \
        atk-devel \
        autoconf \
        automake \
        bison \
        cairo-devel \
        cmake \
        enchant-devel \
        flex \
        fontconfig-devel \
        freetype-devel \
        gcc-c++ \
        geoclue-devel \
        gettext-devel \
        gobject-introspection-devel \
        gperf \
        gstreamer1-devel \
        gstreamer1-plugins-base-devel \
        gtk-doc \
        gtk2-devel \
        gtk3-devel \
        harfbuzz-devel \
        hyphen-devel \
	json-glib-devel \
        libXt-devel \
        libXtst-devel \
        libgudev1-devel \
        libicu-devel \
        libjpeg-turbo-devel \
        libnotify-devel \
        libpng-devel \
        libsecret-devel \
        libsoup-devel \
	libv4l-devel \
        libwebp-devel \
        libwayland-client-devel \
        libwayland-server-devel \
        libxslt-devel \
        mesa-libGL-devel \
        ninja-build \
	openssl-devel \
        pcre-devel \
        perl-Switch \
        perl-version \
	pulseaudio-libs-devel \
        python-devel \
        orc-devel \
        ruby \
        sqlite-devel

    # These are dependencies necessary for running tests.
    $1 install \
        curl \
        dbus-x11 \
        hunspell-en \
        httpd \
        libgpg-error-devel \
        mod_bw \
        mod_ssl \
        perl-CGI \
        php \
        pulseaudio-utils \
        pygobject3-base \
        ruby \
        rubygem-json \
        rubygem-highline \
        xorg-x11-server-Xvfb

    # These are dependencies necessary for building the jhbuild.
    $1 install \
        docbook-utils \
        docbook-utils-pdf \
        git \
        gobject-introspection \
        icon-naming-utils \
        itstool \
        libXfont-devel \
        libcroco-devel \
        libepoxy-devel \
        libgcrypt-devel \
        libgpg-error-devel \
        libp11-devel \
        libpciaccess-devel \
        libtiff-devel \
        libxkbfile-devel \
        llvm \
        llvm-devel \
        mesa-libEGL-devel \
        ragel \
        xorg-x11-font-utils \
        xorg-x11-proto-devel \
        xorg-x11-util-macros \
        xorg-x11-xtrans-devel

    # These are dependencies necessary for using webkit-patch
    $1 install \
        git-svn \
        subversion
}

checkInstaller