| 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|yakkety|jessie)" | 114 supported_releases="(trusty|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 -e "ERROR: The only supported distros are\n" \ |
| 118 "14.10 (utopic), 15.04 (vivid), 15.10 (wily), 16.04 (xenial), " \ | 118 "\tUbuntu 14.04 (trusty)\n" \ |
| 119 "16.10 (yakkety) and Debian 8 (jessie) are currently supported" >&2 | 119 "\tUbuntu 16.04 (xenial)\n" \ |
| 120 "\tUbuntu 16.10 (yakkety)\n" \ |
| 121 "\tDebian 8 (jessie)" >&2 |
| 120 exit 1 | 122 exit 1 |
| 121 fi | 123 fi |
| 122 | 124 |
| 123 if ! uname -m | egrep -q "i686|x86_64"; then | 125 if ! uname -m | egrep -q "i686|x86_64"; then |
| 124 echo "Only x86 architectures are currently supported" >&2 | 126 echo "Only x86 architectures are currently supported" >&2 |
| 125 exit | 127 exit |
| 126 fi | 128 fi |
| 127 fi | 129 fi |
| 128 | 130 |
| 129 if [ "x$(id -u)" != x0 ] && [ 0 -eq "${do_quick_check-0}" ]; then | 131 if [ "x$(id -u)" != x0 ] && [ 0 -eq "${do_quick_check-0}" ]; then |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 libsqlite3-0-dbg | 277 libsqlite3-0-dbg |
| 276 libx11-6-dbg | 278 libx11-6-dbg |
| 277 libx11-xcb1-dbg | 279 libx11-xcb1-dbg |
| 278 libxau6-dbg | 280 libxau6-dbg |
| 279 libxcb1-dbg | 281 libxcb1-dbg |
| 280 libxcomposite1-dbg | 282 libxcomposite1-dbg |
| 281 libxcursor1-dbg | 283 libxcursor1-dbg |
| 282 libxdamage1-dbg | 284 libxdamage1-dbg |
| 283 libxdmcp6-dbg | 285 libxdmcp6-dbg |
| 284 libxext6-dbg | 286 libxext6-dbg |
| 285 libxfixes3-dbg | |
| 286 libxi6-dbg | 287 libxi6-dbg |
| 287 libxinerama1-dbg | 288 libxinerama1-dbg |
| 288 libxrandr2-dbg | 289 libxrandr2-dbg |
| 289 libxrender1-dbg | 290 libxrender1-dbg |
| 290 libxtst6-dbg | 291 libxtst6-dbg |
| 291 zlib1g-dbg | 292 zlib1g-dbg |
| 292 " | 293 " |
| 293 | 294 |
| 295 if [[ ! $lsb_release =~ "yakkety" ]]; then |
| 296 dbg_list="${dbg_list} libxfixes3-dbg" |
| 297 fi |
| 298 |
| 294 # Find the proper version of libstdc++6-4.x-dbg. | 299 # Find the proper version of libstdc++6-4.x-dbg. |
| 295 if [ "x$lsb_release" = "xprecise" ]; then | 300 if [ "x$lsb_release" = "xtrusty" ]; then |
| 296 dbg_list="${dbg_list} libstdc++6-4.6-dbg" | |
| 297 elif [ "x$lsb_release" = "xtrusty" ]; then | |
| 298 dbg_list="${dbg_list} libstdc++6-4.8-dbg" | 301 dbg_list="${dbg_list} libstdc++6-4.8-dbg" |
| 299 else | 302 else |
| 300 dbg_list="${dbg_list} libstdc++6-4.9-dbg" | 303 dbg_list="${dbg_list} libstdc++6-4.9-dbg" |
| 301 fi | 304 fi |
| 302 | 305 |
| 303 # 32-bit libraries needed e.g. to compile V8 snapshot for Android or armhf | 306 # 32-bit libraries needed e.g. to compile V8 snapshot for Android or armhf |
| 304 lib32_list="linux-libc-dev:i386" | 307 lib32_list="linux-libc-dev:i386" |
| 305 | 308 |
| 306 # arm cross toolchain packages needed to build chrome on armhf | 309 # arm cross toolchain packages needed to build chrome on armhf |
| 307 EM_REPO="deb http://emdebian.org/tools/debian/ jessie main" | 310 EM_REPO="deb http://emdebian.org/tools/debian/ jessie main" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 330 gpg --keyserver pgp.mit.edu --recv-keys ${EM_ARCHIVE_KEY_FINGER} | 333 gpg --keyserver pgp.mit.edu --recv-keys ${EM_ARCHIVE_KEY_FINGER} |
| 331 gpg -a --export ${EM_ARCHIVE_KEY_FINGER} | sudo apt-key add - | 334 gpg -a --export ${EM_ARCHIVE_KEY_FINGER} | sudo apt-key add - |
| 332 if ! grep "^${EM_REPO}" "${CROSSTOOLS_LIST}" &>/dev/null; then | 335 if ! grep "^${EM_REPO}" "${CROSSTOOLS_LIST}" &>/dev/null; then |
| 333 echo "${EM_SOURCE}" | sudo tee -a "${CROSSTOOLS_LIST}" >/dev/null | 336 echo "${EM_SOURCE}" | sudo tee -a "${CROSSTOOLS_LIST}" >/dev/null |
| 334 fi | 337 fi |
| 335 arm_list+=" ${GPP_ARM_PACKAGE}" | 338 arm_list+=" ${GPP_ARM_PACKAGE}" |
| 336 fi | 339 fi |
| 337 fi | 340 fi |
| 338 fi | 341 fi |
| 339 ;; | 342 ;; |
| 340 "precise") | |
| 341 arm_list="libc6-dev-armhf-cross | |
| 342 linux-libc-dev-armhf-cross | |
| 343 ${GPP_ARM_PACKAGE}" | |
| 344 ;; | |
| 345 "*") | 343 "*") |
| 346 arm_list="binutils-aarch64-linux-gnu | 344 arm_list="binutils-aarch64-linux-gnu |
| 347 libc6-dev-armhf-cross | 345 libc6-dev-armhf-cross |
| 348 linux-libc-dev-armhf-cross | 346 linux-libc-dev-armhf-cross |
| 349 ${GPP_ARM_PACKAGE}" | 347 ${GPP_ARM_PACKAGE}" |
| 350 ;; | 348 ;; |
| 351 esac | 349 esac |
| 352 | 350 |
| 353 # Work around for dependency issue Ubuntu/Trusty: http://crbug.com/435056 | 351 # Work around for dependency issue Ubuntu/Trusty: http://crbug.com/435056 |
| 354 case $lsb_release in | 352 case $lsb_release in |
| 355 trusty) | 353 trusty) |
| 356 arm_list+=" g++-4.8-multilib-arm-linux-gnueabihf | 354 arm_list+=" g++-4.8-multilib-arm-linux-gnueabihf |
| 357 gcc-4.8-multilib-arm-linux-gnueabihf" | 355 gcc-4.8-multilib-arm-linux-gnueabihf" |
| 358 ;; | 356 ;; |
| 359 wily|xenial|yakkety) | 357 xenial|yakkety) |
| 360 arm_list+=" g++-5-multilib-arm-linux-gnueabihf | 358 arm_list+=" g++-5-multilib-arm-linux-gnueabihf |
| 361 gcc-5-multilib-arm-linux-gnueabihf | 359 gcc-5-multilib-arm-linux-gnueabihf |
| 362 gcc-arm-linux-gnueabihf" | 360 gcc-arm-linux-gnueabihf" |
| 363 ;; | 361 ;; |
| 364 esac | 362 esac |
| 365 | 363 |
| 366 # Packages to build NaCl, its toolchains, and its ports. | 364 # Packages to build NaCl, its toolchains, and its ports. |
| 367 naclports_list="ant autoconf bison cmake gawk intltool xutils-dev xsltproc" | 365 naclports_list="ant autoconf bison cmake gawk intltool xutils-dev xsltproc" |
| 368 nacl_list="\ | 366 nacl_list="\ |
| 369 g++-mingw-w64-i686 | 367 g++-mingw-w64-i686 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 echo "WARNING: The following packages are unknown to your system" | 573 echo "WARNING: The following packages are unknown to your system" |
| 576 echo "(maybe missing a repo or need to 'sudo apt-get update'):" | 574 echo "(maybe missing a repo or need to 'sudo apt-get update'):" |
| 577 echo -e "${unknown}" | sed -e "s/^/ /" | 575 echo -e "${unknown}" | sed -e "s/^/ /" |
| 578 fi | 576 fi |
| 579 exit 1 | 577 exit 1 |
| 580 fi | 578 fi |
| 581 exit 0 | 579 exit 0 |
| 582 fi | 580 fi |
| 583 | 581 |
| 584 if test "$do_inst_lib32" = "1" || test "$do_inst_nacl" = "1"; then | 582 if test "$do_inst_lib32" = "1" || test "$do_inst_nacl" = "1"; then |
| 585 if [[ ! $lsb_release =~ (precise) ]]; then | 583 sudo dpkg --add-architecture i386 |
| 586 sudo dpkg --add-architecture i386 | |
| 587 fi | |
| 588 if [[ $lsb_release = "jessie" ]]; then | 584 if [[ $lsb_release = "jessie" ]]; then |
| 589 sudo dpkg --add-architecture armhf | 585 sudo dpkg --add-architecture armhf |
| 590 fi | 586 fi |
| 591 fi | 587 fi |
| 592 sudo apt-get update | 588 sudo apt-get update |
| 593 | 589 |
| 594 # We initially run "apt-get" with the --reinstall option and parse its output. | 590 # We initially run "apt-get" with the --reinstall option and parse its output. |
| 595 # This way, we can find all the packages that need to be newly installed | 591 # This way, we can find all the packages that need to be newly installed |
| 596 # without accidentally promoting any packages from "auto" to "manual". | 592 # without accidentally promoting any packages from "auto" to "manual". |
| 597 # We then re-run "apt-get" with just the list of missing packages. | 593 # We then re-run "apt-get" with just the list of missing packages. |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 if (echo "${OLD_LOCALE_GEN}" | cmp -s ${LOCALE_GEN}); then | 691 if (echo "${OLD_LOCALE_GEN}" | cmp -s ${LOCALE_GEN}); then |
| 696 echo "Locales already up-to-date." | 692 echo "Locales already up-to-date." |
| 697 else | 693 else |
| 698 sudo locale-gen | 694 sudo locale-gen |
| 699 fi | 695 fi |
| 700 else | 696 else |
| 701 for CHROMIUM_LOCALE in ${CHROMIUM_LOCALES}; do | 697 for CHROMIUM_LOCALE in ${CHROMIUM_LOCALES}; do |
| 702 sudo locale-gen ${CHROMIUM_LOCALE} | 698 sudo locale-gen ${CHROMIUM_LOCALE} |
| 703 done | 699 done |
| 704 fi | 700 fi |
| OLD | NEW |