install-dependencies 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. #!/bin/bash
  2. # This script needs to be run with root rights.
  3. if [ $UID -ne 0 ]; then
  4. sudo $0
  5. exit 0
  6. fi
  7. function printNotSupportedMessageAndExit() {
  8. echo
  9. echo "Currently this script only works for distributions supporting apt-get and yum."
  10. echo "Please add support for your distribution: http://webkit.org/b/110693"
  11. echo
  12. exit 1
  13. }
  14. function checkInstaller {
  15. # apt-get - Debian based distributions
  16. apt-get --version &> /dev/null
  17. if [ $? -eq 0 ]; then
  18. installDependenciesWithApt
  19. exit 0
  20. fi
  21. # yum - Fedora
  22. yum --version &> /dev/null
  23. if [ $? -eq 0 ]; then
  24. installDependenciesWithYum
  25. exit 0
  26. fi
  27. printNotSupportedMessageAndExit
  28. }
  29. function installDependenciesWithApt {
  30. # These are dependencies necessary for building WebKitGTK+.
  31. apt-get install \
  32. autoconf \
  33. automake \
  34. autopoint \
  35. autotools-dev \
  36. bison \
  37. flex \
  38. gail-3.0 \
  39. gawk \
  40. gnome-common \
  41. gperf \
  42. gtk-doc-tools \
  43. intltool \
  44. libatk1.0-dev \
  45. libenchant-dev \
  46. libfaad-dev \
  47. libgail-3-dev \
  48. libgail-dev \
  49. libgeoclue-dev \
  50. libgirepository1.0-dev \
  51. libgl1-mesa-dev \
  52. libgl1-mesa-glx \
  53. libgnutls-dev \
  54. libgudev-1.0-dev \
  55. libicu-dev \
  56. libjpeg62-dev \
  57. libmpg123-dev \
  58. libopus-dev \
  59. libpango1.0-dev \
  60. libpng12-dev \
  61. libpulse-dev \
  62. librsvg2-dev \
  63. libsecret-1-dev \
  64. libsqlite3-dev \
  65. libtheora-dev \
  66. libtool \
  67. libvorbis-dev \
  68. libwebp-dev \
  69. libxslt1-dev \
  70. libxt-dev \
  71. libxtst-dev \
  72. ruby
  73. # These are dependencies necessary for running tests.
  74. apt-get install \
  75. apache2 \
  76. curl \
  77. libapache2-mod-bw \
  78. libapache2-mod-php5 \
  79. libgpg-error-dev \
  80. pulseaudio-utils \
  81. python-gi \
  82. ruby
  83. # These are dependencies necessary for building the jhbuild.
  84. apt-get install \
  85. gobject-introspection \
  86. icon-naming-utils \
  87. libegl1-mesa-dev \
  88. libgcrypt11-dev \
  89. libgpg-error-dev \
  90. libp11-kit-dev \
  91. libtiff4-dev \
  92. libcroco3-dev \
  93. ragel \
  94. xutils-dev \
  95. xtrans-dev \
  96. libxfont-dev \
  97. libpciaccess-dev \
  98. x11proto-bigreqs-dev \
  99. x11proto-gl-dev \
  100. x11proto-input-dev \
  101. x11proto-video-dev \
  102. x11proto-scrnsaver-dev \
  103. x11proto-resource-dev \
  104. x11proto-xcmisc-dev \
  105. x11proto-xf86dri-dev \
  106. libxkbfile-dev
  107. }
  108. function installDependenciesWithYum {
  109. # These are dependencies necessary for building WebKitGTK+.
  110. yum install \
  111. autoconf \
  112. automake \
  113. bison \
  114. atk-devel \
  115. cairo-devel \
  116. enchant-devel \
  117. flex \
  118. fontconfig-devel \
  119. freetype-devel \
  120. gcc-c++ \
  121. geoclue-devel \
  122. gettext-devel \
  123. gobject-introspection-devel \
  124. gperf \
  125. gstreamer1-devel \
  126. gstreamer1-plugins-base-devel \
  127. gtk2-devel \
  128. gtk3-devel \
  129. gtk-doc \
  130. harfbuzz-devel \
  131. libsoup-devel \
  132. libicu-devel \
  133. libjpeg-turbo-devel \
  134. libpng-devel \
  135. libsecret-devel \
  136. libwebp-devel \
  137. libxslt-devel \
  138. libXt-devel \
  139. libXtst-devel \
  140. libgudev1-devel \
  141. mesa-libGL-devel \
  142. pcre-devel \
  143. ruby \
  144. sqlite-devel \
  145. perl-Switch \
  146. perl-version \
  147. python-devel
  148. # These are dependencies necessary for running tests.
  149. yum install \
  150. httpd \
  151. curl \
  152. mod_bw \
  153. libgpg-error-devel \
  154. pulseaudio-utils \
  155. pygobject3-base \
  156. ruby
  157. # These are dependencies necessary for building the jhbuild.
  158. yum install \
  159. gobject-introspection \
  160. icon-naming-utils \
  161. libgcrypt-devel \
  162. libgpg-error-devel \
  163. libp11-devel \
  164. libtiff-devel \
  165. libcroco-devel \
  166. mesa-libEGL-devel \
  167. ragel \
  168. xorg-x11-util-macros \
  169. xorg-x11-xtrans-devel \
  170. xorg-x11-proto-devel \
  171. libXfont-devel \
  172. libxkbfile-devel \
  173. libpciaccess-devel
  174. }
  175. checkInstaller