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 https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_i
nstructions.md | 8 # See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_i
nstructions.md |
9 | 9 |
10 usage() { | 10 usage() { |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 do_inst_lib32=1 | 104 do_inst_lib32=1 |
105 fi | 105 fi |
106 | 106 |
107 # Check for lsb_release command in $PATH | 107 # Check for lsb_release command in $PATH |
108 if ! which lsb_release > /dev/null; then | 108 if ! which lsb_release > /dev/null; then |
109 echo "ERROR: lsb_release not found in \$PATH" >&2 | 109 echo "ERROR: lsb_release not found in \$PATH" >&2 |
110 exit 1; | 110 exit 1; |
111 fi | 111 fi |
112 | 112 |
113 lsb_release=$(lsb_release --codename --short) | 113 lsb_release=$(lsb_release --codename --short) |
114 supported_releases="(precise|trusty|utopic|vivid|wily|xenial|jessie)" | 114 supported_releases="(precise|trusty|utopic|vivid|wily|xenial|yakkety|jessie)" |
115 if [ 0 -eq "${do_unsupported-0}" ] && [ 0 -eq "${do_quick_check-0}" ] ; then | 115 if [ 0 -eq "${do_unsupported-0}" ] && [ 0 -eq "${do_quick_check-0}" ] ; then |
116 if [[ ! $lsb_release =~ $supported_releases ]]; then | 116 if [[ ! $lsb_release =~ $supported_releases ]]; then |
117 echo "ERROR: Only Ubuntu 12.04 (precise), 14.04 (trusty), " \ | 117 echo "ERROR: Only Ubuntu 12.04 (precise), 14.04 (trusty), " \ |
118 "14.10 (utopic), 15.04 (vivid), 15.10 (wily) and 16.04 (xenial), " \ | 118 "14.10 (utopic), 15.04 (vivid), 15.10 (wily), 16.04 (xenial), " \ |
119 "and Debian 8 (jessie) are currently supported" >&2 | 119 "16.10 (yakkety) and Debian 8 (jessie) are currently supported" >&2 |
120 exit 1 | 120 exit 1 |
121 fi | 121 fi |
122 | 122 |
123 if ! uname -m | egrep -q "i686|x86_64"; then | 123 if ! uname -m | egrep -q "i686|x86_64"; then |
124 echo "Only x86 architectures are currently supported" >&2 | 124 echo "Only x86 architectures are currently supported" >&2 |
125 exit | 125 exit |
126 fi | 126 fi |
127 fi | 127 fi |
128 | 128 |
129 if [ "x$(id -u)" != x0 ] && [ 0 -eq "${do_quick_check-0}" ]; then | 129 if [ "x$(id -u)" != x0 ] && [ 0 -eq "${do_quick_check-0}" ]; then |
(...skipping 26 matching lines...) Expand all Loading... |
156 dev_list="${dev_list} libc6-i386 lib32gcc1 lib32stdc++6" | 156 dev_list="${dev_list} libc6-i386 lib32gcc1 lib32stdc++6" |
157 fi | 157 fi |
158 | 158 |
159 # Run-time libraries required by chromeos only | 159 # Run-time libraries required by chromeos only |
160 chromeos_lib_list="libpulse0 libbz2-1.0" | 160 chromeos_lib_list="libpulse0 libbz2-1.0" |
161 | 161 |
162 # Full list of required run-time libraries | 162 # Full list of required run-time libraries |
163 lib_list="libatk1.0-0 libc6 libasound2 libcairo2 libcap2 libcups2 libexpat1 | 163 lib_list="libatk1.0-0 libc6 libasound2 libcairo2 libcap2 libcups2 libexpat1 |
164 libffi6 libfontconfig1 libfreetype6 libglib2.0-0 libgnome-keyring0 | 164 libffi6 libfontconfig1 libfreetype6 libglib2.0-0 libgnome-keyring0 |
165 libgtk2.0-0 libpam0g libpango1.0-0 libpci3 libpcre3 libpixman-1-0 | 165 libgtk2.0-0 libpam0g libpango1.0-0 libpci3 libpcre3 libpixman-1-0 |
166 libpng12-0 libspeechd2 libstdc++6 libsqlite3-0 libx11-6 libx11-xcb1 | 166 libspeechd2 libstdc++6 libsqlite3-0 libx11-6 libx11-xcb1 |
167 libxau6 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 | 167 libxau6 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 |
168 libxext6 libxfixes3 libxi6 libxinerama1 libxrandr2 libxrender1 | 168 libxext6 libxfixes3 libxi6 libxinerama1 libxrandr2 libxrender1 |
169 libxtst6 zlib1g $chromeos_lib_list" | 169 libxtst6 zlib1g $chromeos_lib_list" |
170 | 170 |
171 # Debugging symbols for all of the run-time libraries | 171 # Debugging symbols for all of the run-time libraries |
172 dbg_list="libatk1.0-dbg libc6-dbg libcairo2-dbg libffi6-dbg libfontconfig1-dbg | 172 dbg_list="libatk1.0-dbg libc6-dbg libcairo2-dbg libffi6-dbg libfontconfig1-dbg |
173 libglib2.0-0-dbg libgtk2.0-0-dbg libpango1.0-0-dbg libpcre3-dbg | 173 libglib2.0-0-dbg libgtk2.0-0-dbg libpango1.0-0-dbg libpcre3-dbg |
174 libpixman-1-0-dbg libsqlite3-0-dbg libx11-6-dbg libx11-xcb1-dbg | 174 libpixman-1-0-dbg libsqlite3-0-dbg libx11-6-dbg libx11-xcb1-dbg |
175 libxau6-dbg libxcb1-dbg libxcomposite1-dbg libxcursor1-dbg | 175 libxau6-dbg libxcb1-dbg libxcomposite1-dbg libxcursor1-dbg |
176 libxdamage1-dbg libxdmcp6-dbg libxext6-dbg libxfixes3-dbg libxi6-dbg | 176 libxdamage1-dbg libxdmcp6-dbg libxext6-dbg libxfixes3-dbg libxi6-dbg |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 ${GPP_ARM_PACKAGE}" | 229 ${GPP_ARM_PACKAGE}" |
230 ;; | 230 ;; |
231 esac | 231 esac |
232 | 232 |
233 # Work around for dependency issue Ubuntu/Trusty: http://crbug.com/435056 | 233 # Work around for dependency issue Ubuntu/Trusty: http://crbug.com/435056 |
234 case $lsb_release in | 234 case $lsb_release in |
235 trusty) | 235 trusty) |
236 arm_list+=" g++-4.8-multilib-arm-linux-gnueabihf | 236 arm_list+=" g++-4.8-multilib-arm-linux-gnueabihf |
237 gcc-4.8-multilib-arm-linux-gnueabihf" | 237 gcc-4.8-multilib-arm-linux-gnueabihf" |
238 ;; | 238 ;; |
239 wily) | 239 wily|xenial|yakkety) |
240 arm_list+=" g++-5-multilib-arm-linux-gnueabihf | 240 arm_list+=" g++-5-multilib-arm-linux-gnueabihf |
241 gcc-5-multilib-arm-linux-gnueabihf | 241 gcc-5-multilib-arm-linux-gnueabihf |
242 gcc-arm-linux-gnueabihf" | 242 gcc-arm-linux-gnueabihf" |
243 ;; | |
244 xenial) | |
245 arm_list+=" g++-5-multilib-arm-linux-gnueabihf | |
246 gcc-5-multilib-arm-linux-gnueabihf | |
247 gcc-arm-linux-gnueabihf" | |
248 ;; | 243 ;; |
249 esac | 244 esac |
250 | 245 |
251 # Packages to build NaCl, its toolchains, and its ports. | 246 # Packages to build NaCl, its toolchains, and its ports. |
252 naclports_list="ant autoconf bison cmake gawk intltool xutils-dev xsltproc" | 247 naclports_list="ant autoconf bison cmake gawk intltool xutils-dev xsltproc" |
253 nacl_list="g++-mingw-w64-i686 lib32z1-dev | 248 nacl_list="g++-mingw-w64-i686 lib32z1-dev |
254 libasound2:i386 libcap2:i386 libelf-dev:i386 libfontconfig1:i386 | 249 libasound2:i386 libcap2:i386 libelf-dev:i386 libfontconfig1:i386 |
255 libgconf-2-4:i386 libglib2.0-0:i386 libgpm2:i386 libgtk2.0-0:i386 | 250 libgconf-2-4:i386 libglib2.0-0:i386 libgpm2:i386 libgtk2.0-0:i386 |
256 libncurses5:i386 lib32ncurses5-dev libnss3:i386 libpango1.0-0:i386 | 251 libncurses5:i386 lib32ncurses5-dev libnss3:i386 libpango1.0-0:i386 |
257 libssl1.0.0:i386 libtinfo-dev libtinfo-dev:i386 libtool | 252 libssl1.0.0:i386 libtinfo-dev libtinfo-dev:i386 libtool |
(...skipping 19 matching lines...) Expand all Loading... |
277 else | 272 else |
278 echo "ERROR: unable to determine which libgl1-mesa-glx variant is installed." | 273 echo "ERROR: unable to determine which libgl1-mesa-glx variant is installed." |
279 exit 1 | 274 exit 1 |
280 fi | 275 fi |
281 dev_list="${dev_list} libgbm-dev${mesa_variant} | 276 dev_list="${dev_list} libgbm-dev${mesa_variant} |
282 libgles2-mesa-dev${mesa_variant} libgl1-mesa-dev${mesa_variant} | 277 libgles2-mesa-dev${mesa_variant} libgl1-mesa-dev${mesa_variant} |
283 mesa-common-dev${mesa_variant}" | 278 mesa-common-dev${mesa_variant}" |
284 nacl_list="${nacl_list} libgl1-mesa-glx${mesa_variant}:i386" | 279 nacl_list="${nacl_list} libgl1-mesa-glx${mesa_variant}:i386" |
285 | 280 |
286 # Some package names have changed over time | 281 # Some package names have changed over time |
| 282 if package_exists libpng12-0; then |
| 283 lib_list="${lib_list} libpng12-0" |
| 284 else |
| 285 lib_list="${lib_list} libpng16-16" |
| 286 fi |
287 if package_exists libnspr4-dbg; then | 287 if package_exists libnspr4-dbg; then |
288 dbg_list="${dbg_list} libnspr4-dbg libnss3-dbg" | 288 dbg_list="${dbg_list} libnspr4-dbg libnss3-dbg" |
289 lib_list="${lib_list} libnspr4 libnss3" | 289 lib_list="${lib_list} libnspr4 libnss3" |
290 else | 290 else |
291 dbg_list="${dbg_list} libnspr4-0d-dbg libnss3-1d-dbg" | 291 dbg_list="${dbg_list} libnspr4-0d-dbg libnss3-1d-dbg" |
292 lib_list="${lib_list} libnspr4-0d libnss3-1d" | 292 lib_list="${lib_list} libnspr4-0d libnss3-1d" |
293 fi | 293 fi |
294 if package_exists libjpeg-dev; then | 294 if package_exists libjpeg-dev; then |
295 dev_list="${dev_list} libjpeg-dev" | 295 dev_list="${dev_list} libjpeg-dev" |
296 else | 296 else |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 if (echo "${OLD_LOCALE_GEN}" | cmp -s ${LOCALE_GEN}); then | 552 if (echo "${OLD_LOCALE_GEN}" | cmp -s ${LOCALE_GEN}); then |
553 echo "Locales already up-to-date." | 553 echo "Locales already up-to-date." |
554 else | 554 else |
555 sudo locale-gen | 555 sudo locale-gen |
556 fi | 556 fi |
557 else | 557 else |
558 for CHROMIUM_LOCALE in ${CHROMIUM_LOCALES}; do | 558 for CHROMIUM_LOCALE in ${CHROMIUM_LOCALES}; do |
559 sudo locale-gen ${CHROMIUM_LOCALE} | 559 sudo locale-gen ${CHROMIUM_LOCALE} |
560 done | 560 done |
561 fi | 561 fi |
OLD | NEW |