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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 linux-libc-dev-armhf-cross | 148 linux-libc-dev-armhf-cross |
149 g++-arm-linux-gnueabihf" | 149 g++-arm-linux-gnueabihf" |
150 | 150 |
151 # Packages to build NaCl, its toolchains, and its ports. | 151 # Packages to build NaCl, its toolchains, and its ports. |
152 naclports_list="ant autoconf bison cmake gawk intltool xutils-dev xsltproc" | 152 naclports_list="ant autoconf bison cmake gawk intltool xutils-dev xsltproc" |
153 nacl_list="g++-mingw-w64-i686 lib32z1-dev | 153 nacl_list="g++-mingw-w64-i686 lib32z1-dev |
154 libasound2:i386 libcap2:i386 libelf-dev:i386 libexif12:i386 | 154 libasound2:i386 libcap2:i386 libelf-dev:i386 libexif12:i386 |
155 libfontconfig1:i386 libgconf-2-4:i386 libglib2.0-0:i386 libgpm2:i386 | 155 libfontconfig1:i386 libgconf-2-4:i386 libglib2.0-0:i386 libgpm2:i386 |
156 libgtk2.0-0:i386 libncurses5:i386 lib32ncurses5-dev | 156 libgtk2.0-0:i386 libncurses5:i386 lib32ncurses5-dev |
157 libnss3:i386 libpango1.0-0:i386 | 157 libnss3:i386 libpango1.0-0:i386 |
158 libssl0.9.8:i386 libtinfo-dev libtinfo-dev:i386 libtool | 158 libssl1.0.0:i386 libtinfo-dev libtinfo-dev:i386 libtool |
159 libxcomposite1:i386 libxcursor1:i386 libxdamage1:i386 libxi6:i386 | 159 libxcomposite1:i386 libxcursor1:i386 libxdamage1:i386 libxi6:i386 |
160 libxrandr2:i386 libxss1:i386 libxtst6:i386 texinfo xvfb | 160 libxrandr2:i386 libxss1:i386 libxtst6:i386 texinfo xvfb |
161 ${naclports_list}" | 161 ${naclports_list}" |
162 | 162 |
163 # Find the proper version of libgbm-dev. We can't just install libgbm-dev as | 163 # Find the proper version of libgbm-dev. We can't just install libgbm-dev as |
164 # it depends on mesa, and only one version of mesa can exists on the system. | 164 # it depends on mesa, and only one version of mesa can exists on the system. |
165 # Hence we must match the same version or this entire script will fail. | 165 # Hence we must match the same version or this entire script will fail. |
166 mesa_variant="" | 166 mesa_variant="" |
167 for variant in "-lts-quantal" "-lts-raring" "-lts-saucy" "-lts-trusty"; do | 167 for variant in "-lts-quantal" "-lts-raring" "-lts-saucy" "-lts-trusty"; do |
168 if $(dpkg-query -Wf'${Status}' libgl1-mesa-glx${variant} 2>/dev/null | \ | 168 if $(dpkg-query -Wf'${Status}' libgl1-mesa-glx${variant} 2>/dev/null | \ |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 exit 1 | 345 exit 1 |
346 fi | 346 fi |
347 exit 0 | 347 exit 0 |
348 fi | 348 fi |
349 | 349 |
350 if test "$do_inst_lib32" = "1" || test "$do_inst_nacl" = "1"; then | 350 if test "$do_inst_lib32" = "1" || test "$do_inst_nacl" = "1"; then |
351 if [[ ! $lsb_release =~ (precise|quantal|raring) ]]; then | 351 if [[ ! $lsb_release =~ (precise|quantal|raring) ]]; then |
352 sudo dpkg --add-architecture i386 | 352 sudo dpkg --add-architecture i386 |
353 fi | 353 fi |
354 fi | 354 fi |
355 sudo apt-get update | 355 #sudo apt-get update |
356 | 356 |
357 # We initially run "apt-get" with the --reinstall option and parse its output. | 357 # We initially run "apt-get" with the --reinstall option and parse its output. |
358 # This way, we can find all the packages that need to be newly installed | 358 # This way, we can find all the packages that need to be newly installed |
359 # without accidentally promoting any packages from "auto" to "manual". | 359 # without accidentally promoting any packages from "auto" to "manual". |
360 # We then re-run "apt-get" with just the list of missing packages. | 360 # We then re-run "apt-get" with just the list of missing packages. |
361 echo "Finding missing packages..." | 361 echo "Finding missing packages..." |
362 # Intentionally leaving $packages unquoted so it's more readable. | 362 # Intentionally leaving $packages unquoted so it's more readable. |
363 echo "Packages required: " $packages | 363 echo "Packages required: " $packages |
364 echo | 364 echo |
365 new_list_cmd="sudo apt-get install --reinstall $(echo $packages)" | 365 new_list_cmd="sudo apt-get install --reinstall $(echo $packages)" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 fi | 409 fi |
410 echo "It is recommended to install your repo on a local file system." | 410 echo "It is recommended to install your repo on a local file system." |
411 echo "You can skip the installation of the Chrome OS default founts with" | 411 echo "You can skip the installation of the Chrome OS default founts with" |
412 echo "the command line option: --no-chromeos-fonts." | 412 echo "the command line option: --no-chromeos-fonts." |
413 exit 1 | 413 exit 1 |
414 fi | 414 fi |
415 else | 415 else |
416 echo "Skipping installation of Chrome OS fonts." | 416 echo "Skipping installation of Chrome OS fonts." |
417 fi | 417 fi |
418 | 418 |
| 419 # $1 - target name |
| 420 # $2 - link name |
| 421 create_library_symlink() { |
| 422 target=$1 |
| 423 linkname=$2 |
| 424 if [ -L $linkname ]; then |
| 425 if [ "$(basename $(readlink $linkname))" != "$(basename $target)" ]; then |
| 426 sudo rm $linkname |
| 427 fi |
| 428 fi |
| 429 if [ ! -r $linkname ]; then |
| 430 echo "Creating link: $linkname" |
| 431 sudo ln -fs $target $linkname |
| 432 fi |
| 433 } |
| 434 |
419 if test "$do_inst_nacl" = "1"; then | 435 if test "$do_inst_nacl" = "1"; then |
420 echo "Installing symbolic links for NaCl." | 436 echo "Installing symbolic links for NaCl." |
421 if [ ! -r /usr/lib/i386-linux-gnu/libcrypto.so ]; then | 437 # naclports needs to cross build python for i386, but libssl1.0.0:i386 |
422 sudo ln -fs libcrypto.so.0.9.8 /usr/lib/i386-linux-gnu/libcrypto.so | 438 # only contains libcrypto.so.1.0.0 and not the symlink needed for |
423 fi | 439 # linking (libcrypto.so). |
424 if [ ! -r /usr/lib/i386-linux-gnu/libssl.so ]; then | 440 create_library_symlink /lib/i386-linux-gnu/libcrypto.so.1.0.0 \ |
425 sudo ln -fs libssl.so.0.9.8 /usr/lib/i386-linux-gnu/libssl.so | 441 /usr/lib/i386-linux-gnu/libcrypto.so |
426 fi | 442 |
| 443 create_library_symlink /lib/i386-linux-gnu/libssl.so.1.0.0 \ |
| 444 /usr/lib/i386-linux-gnu/libssl.so |
427 else | 445 else |
428 echo "Skipping symbolic links for NaCl." | 446 echo "Skipping symbolic links for NaCl." |
429 fi | 447 fi |
OLD | NEW |