OLD | NEW |
1 #!/bin/bash -e | 1 #!/bin/bash -e |
2 | 2 |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # Script to install everything needed to build chromium (well, ideally, anyway) | 7 # Script to install everything needed to build chromium (well, ideally, anyway) |
8 # See http://code.google.com/p/chromium/wiki/LinuxBuildInstructions | 8 # See http://code.google.com/p/chromium/wiki/LinuxBuildInstructions |
9 # and http://code.google.com/p/chromium/wiki/LinuxBuild64Bit | 9 # and http://code.google.com/p/chromium/wiki/LinuxBuild64Bit |
10 | 10 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 do_inst_lib32=1 | 66 do_inst_lib32=1 |
67 fi | 67 fi |
68 | 68 |
69 # Check for lsb_release command in $PATH | 69 # Check for lsb_release command in $PATH |
70 if ! which lsb_release > /dev/null; then | 70 if ! which lsb_release > /dev/null; then |
71 echo "ERROR: lsb_release not found in \$PATH" >&2 | 71 echo "ERROR: lsb_release not found in \$PATH" >&2 |
72 exit 1; | 72 exit 1; |
73 fi | 73 fi |
74 | 74 |
75 lsb_release=$(lsb_release --codename --short) | 75 lsb_release=$(lsb_release --codename --short) |
76 ubuntu_codenames="(precise|trusty|utopic|vivid)" | 76 ubuntu_codenames="(precise|trusty|utopic|vivid|wily)" |
77 if [ 0 -eq "${do_unsupported-0}" ] && [ 0 -eq "${do_quick_check-0}" ] ; then | 77 if [ 0 -eq "${do_unsupported-0}" ] && [ 0 -eq "${do_quick_check-0}" ] ; then |
78 if [[ ! $lsb_release =~ $ubuntu_codenames ]]; then | 78 if [[ ! $lsb_release =~ $ubuntu_codenames ]]; then |
79 echo "ERROR: Only Ubuntu 12.04 (precise), 14.04 (trusty), " \ | 79 echo "ERROR: Only Ubuntu 12.04 (precise), 14.04 (trusty), " \ |
80 "14.10 (utopic) and 15.04 (vivid) are currently supported" >&2 | 80 "14.10 (utopic) and 15.04 (vivid) are currently supported" >&2 |
81 exit 1 | 81 exit 1 |
82 fi | 82 fi |
83 | 83 |
84 if ! uname -m | egrep -q "i686|x86_64"; then | 84 if ! uname -m | egrep -q "i686|x86_64"; then |
85 echo "Only x86 architectures are currently supported" >&2 | 85 echo "Only x86 architectures are currently supported" >&2 |
86 exit | 86 exit |
87 fi | 87 fi |
88 fi | 88 fi |
89 | 89 |
90 if [ "x$(id -u)" != x0 ] && [ 0 -eq "${do_quick_check-0}" ]; then | 90 if [ "x$(id -u)" != x0 ] && [ 0 -eq "${do_quick_check-0}" ]; then |
91 echo "Running as non-root user." | 91 echo "Running as non-root user." |
92 echo "You might have to enter your password one or more times for 'sudo'." | 92 echo "You might have to enter your password one or more times for 'sudo'." |
93 echo | 93 echo |
94 fi | 94 fi |
95 | 95 |
96 # Packages needed for chromeos only | 96 # Packages needed for chromeos only |
97 chromeos_dev_list="libbluetooth-dev libxkbcommon-dev" | 97 chromeos_dev_list="libbluetooth-dev libxkbcommon-dev realpath" |
98 | 98 |
99 # Packages needed for development | 99 # Packages needed for development |
100 dev_list="apache2.2-bin bison cdbs curl dpkg-dev elfutils devscripts fakeroot | 100 dev_list="bison cdbs curl dpkg-dev elfutils devscripts fakeroot |
101 flex fonts-thai-tlwg g++ git-core git-svn gperf language-pack-da | 101 flex fonts-thai-tlwg g++ git-core git-svn gperf language-pack-da |
102 language-pack-fr language-pack-he language-pack-zh-hant | 102 language-pack-fr language-pack-he language-pack-zh-hant |
103 libapache2-mod-php5 libasound2-dev libbrlapi-dev libav-tools | 103 libapache2-mod-php5 libasound2-dev libbrlapi-dev libav-tools |
104 libbz2-dev libcairo2-dev libcap-dev libcups2-dev libcurl4-gnutls-dev | 104 libbz2-dev libcairo2-dev libcap-dev libcups2-dev libcurl4-gnutls-dev |
105 libdrm-dev libelf-dev libexif-dev libgconf2-dev libglib2.0-dev | 105 libdrm-dev libelf-dev libexif-dev libgconf2-dev libglib2.0-dev |
106 libglu1-mesa-dev libgnome-keyring-dev libgtk2.0-dev libkrb5-dev | 106 libglu1-mesa-dev libgnome-keyring-dev libgtk2.0-dev libkrb5-dev |
107 libnspr4-dev libnss3-dev libpam0g-dev libpci-dev libpulse-dev | 107 libnspr4-dev libnss3-dev libpam0g-dev libpci-dev libpulse-dev |
108 libsctp-dev libspeechd-dev libsqlite3-dev libssl-dev libudev-dev | 108 libsctp-dev libspeechd-dev libsqlite3-dev libssl-dev libudev-dev |
109 libwww-perl libxslt1-dev libxss-dev libxt-dev libxtst-dev openbox | 109 libwww-perl libxslt1-dev libxss-dev libxt-dev libxtst-dev openbox |
110 patch perl php5-cgi pkg-config python python-cherrypy3 python-crypto | 110 patch perl php5-cgi pkg-config python python-cherrypy3 python-crypto |
111 python-dev python-numpy python-opencv python-openssl python-psutil | 111 python-dev python-numpy python-opencv python-openssl python-psutil |
112 rpm ruby subversion ttf-dejavu-core ttf-indic-fonts ttf-kochi-gothic | 112 python-yaml rpm ruby subversion ttf-dejavu-core ttf-indic-fonts |
113 ttf-kochi-mincho wdiff xfonts-mathml zip $chromeos_dev_list" | 113 ttf-kochi-gothic ttf-kochi-mincho wdiff |
| 114 $chromeos_dev_list" |
114 | 115 |
115 # 64-bit systems need a minimum set of 32-bit compat packages for the pre-built | 116 # 64-bit systems need a minimum set of 32-bit compat packages for the pre-built |
116 # NaCl binaries. | 117 # NaCl binaries. |
117 if file /sbin/init | grep -q 'ELF 64-bit'; then | 118 if file /sbin/init | grep -q 'ELF 64-bit'; then |
118 dev_list="${dev_list} libc6-i386 lib32gcc1 lib32stdc++6" | 119 dev_list="${dev_list} libc6-i386 lib32gcc1 lib32stdc++6" |
119 fi | 120 fi |
120 | 121 |
121 # Run-time libraries required by chromeos only | 122 # Run-time libraries required by chromeos only |
122 chromeos_lib_list="libpulse0 libbz2-1.0" | 123 chromeos_lib_list="libpulse0 libbz2-1.0" |
123 | 124 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 if $(dpkg-query -Wf'${Status}' libgl1-mesa-glx${variant} 2>/dev/null | \ | 182 if $(dpkg-query -Wf'${Status}' libgl1-mesa-glx${variant} 2>/dev/null | \ |
182 grep -q " ok installed"); then | 183 grep -q " ok installed"); then |
183 mesa_variant="${variant}" | 184 mesa_variant="${variant}" |
184 fi | 185 fi |
185 done | 186 done |
186 dev_list="${dev_list} libgbm-dev${mesa_variant} | 187 dev_list="${dev_list} libgbm-dev${mesa_variant} |
187 libgles2-mesa-dev${mesa_variant} libgl1-mesa-dev${mesa_variant} | 188 libgles2-mesa-dev${mesa_variant} libgl1-mesa-dev${mesa_variant} |
188 mesa-common-dev${mesa_variant}" | 189 mesa-common-dev${mesa_variant}" |
189 nacl_list="${nacl_list} libgl1-mesa-glx${mesa_variant}:i386" | 190 nacl_list="${nacl_list} libgl1-mesa-glx${mesa_variant}:i386" |
190 | 191 |
191 # Some package names have changed over time | |
192 if package_exists ttf-mscorefonts-installer; then | |
193 dev_list="${dev_list} ttf-mscorefonts-installer" | |
194 else | |
195 dev_list="${dev_list} msttcorefonts" | |
196 fi | |
197 if package_exists libnspr4-dbg; then | 192 if package_exists libnspr4-dbg; then |
198 dbg_list="${dbg_list} libnspr4-dbg libnss3-dbg" | 193 dbg_list="${dbg_list} libnspr4-dbg libnss3-dbg" |
199 lib_list="${lib_list} libnspr4 libnss3" | 194 lib_list="${lib_list} libnspr4 libnss3" |
200 else | 195 else |
201 dbg_list="${dbg_list} libnspr4-0d-dbg libnss3-1d-dbg" | 196 dbg_list="${dbg_list} libnspr4-0d-dbg libnss3-1d-dbg" |
202 lib_list="${lib_list} libnspr4-0d libnss3-1d" | 197 lib_list="${lib_list} libnspr4-0d libnss3-1d" |
203 fi | 198 fi |
204 if package_exists libjpeg-dev; then | 199 if package_exists libjpeg-dev; then |
205 dev_list="${dev_list} libjpeg-dev" | 200 dev_list="${dev_list} libjpeg-dev" |
206 else | 201 else |
207 dev_list="${dev_list} libjpeg62-dev" | 202 dev_list="${dev_list} libjpeg62-dev" |
208 fi | 203 fi |
209 if package_exists libudev1; then | 204 if package_exists libudev1; then |
210 dev_list="${dev_list} libudev1" | 205 dev_list="${dev_list} libudev1" |
211 nacl_list="${nacl_list} libudev1:i386" | 206 nacl_list="${nacl_list} libudev1:i386" |
212 else | 207 else |
213 dev_list="${dev_list} libudev0" | 208 dev_list="${dev_list} libudev0" |
214 nacl_list="${nacl_list} libudev0:i386" | 209 nacl_list="${nacl_list} libudev0:i386" |
215 fi | 210 fi |
216 if package_exists libbrlapi0.6; then | 211 if package_exists libbrlapi0.6; then |
217 dev_list="${dev_list} libbrlapi0.6" | 212 dev_list="${dev_list} libbrlapi0.6" |
218 else | 213 else |
219 dev_list="${dev_list} libbrlapi0.5" | 214 dev_list="${dev_list} libbrlapi0.5" |
220 fi | 215 fi |
221 | 216 |
222 | |
223 # Some packages are only needed if the distribution actually supports | 217 # Some packages are only needed if the distribution actually supports |
224 # installing them. | 218 # installing them. |
225 if package_exists appmenu-gtk; then | 219 if package_exists appmenu-gtk; then |
226 lib_list="$lib_list appmenu-gtk" | 220 lib_list="$lib_list appmenu-gtk" |
227 fi | 221 fi |
228 | 222 |
229 # When cross building for arm/Android on 64-bit systems the host binaries | 223 # When cross building for arm/Android on 64-bit systems the host binaries |
230 # that are part of v8 need to be compiled with -m32 which means | 224 # that are part of v8 need to be compiled with -m32 which means |
231 # that basic multilib support is needed. | 225 # that basic multilib support is needed. |
232 if file /sbin/init | grep -q 'ELF 64-bit'; then | 226 if file /sbin/init | grep -q 'ELF 64-bit'; then |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 # only contains libcrypto.so.1.0.0 and not the symlink needed for | 446 # only contains libcrypto.so.1.0.0 and not the symlink needed for |
453 # linking (libcrypto.so). | 447 # linking (libcrypto.so). |
454 create_library_symlink /lib/i386-linux-gnu/libcrypto.so.1.0.0 \ | 448 create_library_symlink /lib/i386-linux-gnu/libcrypto.so.1.0.0 \ |
455 /usr/lib/i386-linux-gnu/libcrypto.so | 449 /usr/lib/i386-linux-gnu/libcrypto.so |
456 | 450 |
457 create_library_symlink /lib/i386-linux-gnu/libssl.so.1.0.0 \ | 451 create_library_symlink /lib/i386-linux-gnu/libssl.so.1.0.0 \ |
458 /usr/lib/i386-linux-gnu/libssl.so | 452 /usr/lib/i386-linux-gnu/libssl.so |
459 else | 453 else |
460 echo "Skipping symbolic links for NaCl." | 454 echo "Skipping symbolic links for NaCl." |
461 fi | 455 fi |
OLD | NEW |