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|quantal|raring|saucy|trusty|utopic)" | 76 ubuntu_codenames="(precise|trusty|utopic)" |
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) through 14.10 (utopic) are"\ | 79 echo "ERROR: Only Ubuntu 12.04 (precise), 14.04 (trusty) and " \ |
80 "currently supported" >&2 | 80 "14.10 (utopic) 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 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 libxau6 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 | 129 libxau6 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 |
130 libxext6 libxfixes3 libxi6 libxinerama1 libxrandr2 libxrender1 | 130 libxext6 libxfixes3 libxi6 libxinerama1 libxrandr2 libxrender1 |
131 libxtst6 zlib1g $chromeos_lib_list" | 131 libxtst6 zlib1g $chromeos_lib_list" |
132 | 132 |
133 # Debugging symbols for all of the run-time libraries | 133 # Debugging symbols for all of the run-time libraries |
134 dbg_list="libatk1.0-dbg libc6-dbg libcairo2-dbg libfontconfig1-dbg | 134 dbg_list="libatk1.0-dbg libc6-dbg libcairo2-dbg libfontconfig1-dbg |
135 libglib2.0-0-dbg libgtk2.0-0-dbg libpango1.0-0-dbg libpcre3-dbg | 135 libglib2.0-0-dbg libgtk2.0-0-dbg libpango1.0-0-dbg libpcre3-dbg |
136 libpixman-1-0-dbg libsqlite3-0-dbg libx11-6-dbg libxau6-dbg | 136 libpixman-1-0-dbg libsqlite3-0-dbg libx11-6-dbg libxau6-dbg |
137 libxcb1-dbg libxcomposite1-dbg libxcursor1-dbg libxdamage1-dbg | 137 libxcb1-dbg libxcomposite1-dbg libxcursor1-dbg libxdamage1-dbg |
138 libxdmcp6-dbg libxext6-dbg libxfixes3-dbg libxi6-dbg libxinerama1-dbg | 138 libxdmcp6-dbg libxext6-dbg libxfixes3-dbg libxi6-dbg libxinerama1-dbg |
139 libxrandr2-dbg libxrender1-dbg libxtst6-dbg zlib1g-dbg | 139 libxrandr2-dbg libxrender1-dbg libxtst6-dbg zlib1g-dbg" |
140 libstdc++6-4.6-dbg" | 140 |
| 141 # Find the proper version of libstdc++6-4.x-dbg. |
| 142 if [ "x$lsb_release" = "xprecise" ]; then |
| 143 dbg_list="${dbg_list} libstdc++6-4.6-dbg" |
| 144 elif [ "x$lsb_release" = "xtrusty" ]; then |
| 145 dbg_list="${dbg_list} libstdc++6-4.8-dbg" |
| 146 else |
| 147 dbg_list="${dbg_list} libstdc++6-4.9-dbg" |
| 148 fi |
141 | 149 |
142 # 32-bit libraries needed e.g. to compile V8 snapshot for Android or armhf | 150 # 32-bit libraries needed e.g. to compile V8 snapshot for Android or armhf |
143 lib32_list="linux-libc-dev:i386" | 151 lib32_list="linux-libc-dev:i386" |
144 | 152 |
145 # arm cross toolchain packages needed to build chrome on armhf | 153 # arm cross toolchain packages needed to build chrome on armhf |
146 arm_list="libc6-dev-armhf-cross | 154 arm_list="libc6-dev-armhf-cross |
147 linux-libc-dev-armhf-cross | 155 linux-libc-dev-armhf-cross |
148 g++-arm-linux-gnueabihf" | 156 g++-arm-linux-gnueabihf" |
149 | 157 |
150 # Packages to build NaCl, its toolchains, and its ports. | 158 # Packages to build NaCl, its toolchains, and its ports. |
151 naclports_list="ant autoconf bison cmake gawk intltool xutils-dev xsltproc" | 159 naclports_list="ant autoconf bison cmake gawk intltool xutils-dev xsltproc" |
152 nacl_list="g++-mingw-w64-i686 lib32z1-dev | 160 nacl_list="g++-mingw-w64-i686 lib32z1-dev |
153 libasound2:i386 libcap2:i386 libelf-dev:i386 libexif12:i386 | 161 libasound2:i386 libcap2:i386 libelf-dev:i386 libexif12:i386 |
154 libfontconfig1:i386 libgconf-2-4:i386 libglib2.0-0:i386 libgpm2:i386 | 162 libfontconfig1:i386 libgconf-2-4:i386 libglib2.0-0:i386 libgpm2:i386 |
155 libgtk2.0-0:i386 libncurses5:i386 lib32ncurses5-dev | 163 libgtk2.0-0:i386 libncurses5:i386 lib32ncurses5-dev |
156 libnss3:i386 libpango1.0-0:i386 | 164 libnss3:i386 libpango1.0-0:i386 |
157 libssl1.0.0:i386 libtinfo-dev libtinfo-dev:i386 libtool | 165 libssl1.0.0:i386 libtinfo-dev libtinfo-dev:i386 libtool |
158 libxcomposite1:i386 libxcursor1:i386 libxdamage1:i386 libxi6:i386 | 166 libxcomposite1:i386 libxcursor1:i386 libxdamage1:i386 libxi6:i386 |
159 libxrandr2:i386 libxss1:i386 libxtst6:i386 texinfo xvfb | 167 libxrandr2:i386 libxss1:i386 libxtst6:i386 texinfo xvfb |
160 ${naclports_list}" | 168 ${naclports_list}" |
161 | 169 |
162 # Find the proper version of libgbm-dev. We can't just install libgbm-dev as | 170 # Find the proper version of libgbm-dev. We can't just install libgbm-dev as |
163 # it depends on mesa, and only one version of mesa can exists on the system. | 171 # it depends on mesa, and only one version of mesa can exists on the system. |
164 # Hence we must match the same version or this entire script will fail. | 172 # Hence we must match the same version or this entire script will fail. |
165 mesa_variant="" | 173 mesa_variant="" |
166 for variant in "-lts-quantal" "-lts-raring" "-lts-saucy" "-lts-trusty" \ | 174 for variant in "-lts-trusty" "-lts-utopic"; do |
167 "-lts-utopic"; do | |
168 if $(dpkg-query -Wf'${Status}' libgl1-mesa-glx${variant} 2>/dev/null | \ | 175 if $(dpkg-query -Wf'${Status}' libgl1-mesa-glx${variant} 2>/dev/null | \ |
169 grep -q " ok installed"); then | 176 grep -q " ok installed"); then |
170 mesa_variant="${variant}" | 177 mesa_variant="${variant}" |
171 fi | 178 fi |
172 done | 179 done |
173 dev_list="${dev_list} libgbm-dev${mesa_variant} | 180 dev_list="${dev_list} libgbm-dev${mesa_variant} |
174 libgles2-mesa-dev${mesa_variant} libgl1-mesa-dev${mesa_variant} | 181 libgles2-mesa-dev${mesa_variant} libgl1-mesa-dev${mesa_variant} |
175 mesa-common-dev${mesa_variant}" | 182 mesa-common-dev${mesa_variant}" |
176 nacl_list="${nacl_list} libgl1-mesa-glx${mesa_variant}:i386" | 183 nacl_list="${nacl_list} libgl1-mesa-glx${mesa_variant}:i386" |
177 | 184 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 if [ -n "${missing}" ]; then | 349 if [ -n "${missing}" ]; then |
343 echo "WARNING: The following packages are not installed:" | 350 echo "WARNING: The following packages are not installed:" |
344 echo -e "${missing}" | sed -e "s/^/ /" | 351 echo -e "${missing}" | sed -e "s/^/ /" |
345 fi | 352 fi |
346 exit 1 | 353 exit 1 |
347 fi | 354 fi |
348 exit 0 | 355 exit 0 |
349 fi | 356 fi |
350 | 357 |
351 if test "$do_inst_lib32" = "1" || test "$do_inst_nacl" = "1"; then | 358 if test "$do_inst_lib32" = "1" || test "$do_inst_nacl" = "1"; then |
352 if [[ ! $lsb_release =~ (precise|quantal|raring) ]]; then | 359 if [[ ! $lsb_release =~ (precise) ]]; then |
353 sudo dpkg --add-architecture i386 | 360 sudo dpkg --add-architecture i386 |
354 fi | 361 fi |
355 fi | 362 fi |
356 #sudo apt-get update | 363 #sudo apt-get update |
357 | 364 |
358 # We initially run "apt-get" with the --reinstall option and parse its output. | 365 # We initially run "apt-get" with the --reinstall option and parse its output. |
359 # This way, we can find all the packages that need to be newly installed | 366 # This way, we can find all the packages that need to be newly installed |
360 # without accidentally promoting any packages from "auto" to "manual". | 367 # without accidentally promoting any packages from "auto" to "manual". |
361 # We then re-run "apt-get" with just the list of missing packages. | 368 # We then re-run "apt-get" with just the list of missing packages. |
362 echo "Finding missing packages..." | 369 echo "Finding missing packages..." |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 # 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 |
440 # linking (libcrypto.so). | 447 # linking (libcrypto.so). |
441 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 \ |
442 /usr/lib/i386-linux-gnu/libcrypto.so | 449 /usr/lib/i386-linux-gnu/libcrypto.so |
443 | 450 |
444 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 \ |
445 /usr/lib/i386-linux-gnu/libssl.so | 452 /usr/lib/i386-linux-gnu/libssl.so |
446 else | 453 else |
447 echo "Skipping symbolic links for NaCl." | 454 echo "Skipping symbolic links for NaCl." |
448 fi | 455 fi |
OLD | NEW |