| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 nacl_list="g++-mingw-w64-i686 lib32z1-dev | 167 nacl_list="g++-mingw-w64-i686 lib32z1-dev |
| 168 libasound2:i386 libcap2:i386 libelf-dev:i386 libexif12:i386 | 168 libasound2:i386 libcap2:i386 libelf-dev:i386 libexif12:i386 |
| 169 libfontconfig1:i386 libgconf-2-4:i386 libglib2.0-0:i386 libgpm2:i386 | 169 libfontconfig1:i386 libgconf-2-4:i386 libglib2.0-0:i386 libgpm2:i386 |
| 170 libgtk2.0-0:i386 libncurses5:i386 lib32ncurses5-dev | 170 libgtk2.0-0:i386 libncurses5:i386 lib32ncurses5-dev |
| 171 libnss3:i386 libpango1.0-0:i386 | 171 libnss3:i386 libpango1.0-0:i386 |
| 172 libssl1.0.0:i386 libtinfo-dev libtinfo-dev:i386 libtool | 172 libssl1.0.0:i386 libtinfo-dev libtinfo-dev:i386 libtool |
| 173 libxcomposite1:i386 libxcursor1:i386 libxdamage1:i386 libxi6:i386 | 173 libxcomposite1:i386 libxcursor1:i386 libxdamage1:i386 libxi6:i386 |
| 174 libxrandr2:i386 libxss1:i386 libxtst6:i386 texinfo xvfb | 174 libxrandr2:i386 libxss1:i386 libxtst6:i386 texinfo xvfb |
| 175 ${naclports_list}" | 175 ${naclports_list}" |
| 176 | 176 |
| 177 # Find the proper version of libgbm-dev. We can't just install libgbm-dev as | 177 # Find the proper version of packages that depend on mesa. Only one -lts variant |
| 178 # it depends on mesa, and only one version of mesa can exists on the system. | 178 # of mesa can be installed and everything that depends on it must match. |
| 179 # Hence we must match the same version or this entire script will fail. | 179 |
| 180 mesa_variant="" | 180 # Query for the name and status of all mesa LTS variants, filter for only |
| 181 for variant in "-lts-trusty" "-lts-utopic"; do | 181 # installed packages, extract just the name, and eliminate duplicates (there can |
| 182 if $(dpkg-query -Wf'${Status}' libgl1-mesa-glx${variant} 2>/dev/null | \ | 182 # be more than one with the same name in the case of multiarch). Expand into an |
| 183 grep -q " ok installed"); then | 183 # array. |
| 184 mesa_variant="${variant}" | 184 mesa_packages=($(dpkg-query -Wf'${package} ${status}\n' \ |
| 185 fi | 185 libgl1-mesa-glx-lts-\* | \ |
| 186 done | 186 grep " ok installed" | cut -d " " -f 1 | sort -u)) |
| 187 if [ "${#mesa_packages[@]}" -eq 0 ]; then |
| 188 mesa_variant="" |
| 189 elif [ "${#mesa_packages[@]}" -eq 1 ]; then |
| 190 # Strip the base package name and leave just "-lts-whatever" |
| 191 mesa_variant="${mesa_packages[0]#libgl1-mesa-glx}" |
| 192 else |
| 193 echo "ERROR: unable to determine which libgl1-mesa-glx variant is installed." |
| 194 exit 1 |
| 195 fi |
| 187 dev_list="${dev_list} libgbm-dev${mesa_variant} | 196 dev_list="${dev_list} libgbm-dev${mesa_variant} |
| 188 libgles2-mesa-dev${mesa_variant} libgl1-mesa-dev${mesa_variant} | 197 libgles2-mesa-dev${mesa_variant} libgl1-mesa-dev${mesa_variant} |
| 189 mesa-common-dev${mesa_variant}" | 198 mesa-common-dev${mesa_variant}" |
| 190 nacl_list="${nacl_list} libgl1-mesa-glx${mesa_variant}:i386" | 199 nacl_list="${nacl_list} libgl1-mesa-glx${mesa_variant}:i386" |
| 191 | 200 |
| 192 # Some package names have changed over time | 201 # Some package names have changed over time |
| 193 if package_exists ttf-mscorefonts-installer; then | 202 if package_exists ttf-mscorefonts-installer; then |
| 194 dev_list="${dev_list} ttf-mscorefonts-installer" | 203 dev_list="${dev_list} ttf-mscorefonts-installer" |
| 195 else | 204 else |
| 196 dev_list="${dev_list} msttcorefonts" | 205 dev_list="${dev_list} msttcorefonts" |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 # only contains libcrypto.so.1.0.0 and not the symlink needed for | 462 # only contains libcrypto.so.1.0.0 and not the symlink needed for |
| 454 # linking (libcrypto.so). | 463 # linking (libcrypto.so). |
| 455 create_library_symlink /lib/i386-linux-gnu/libcrypto.so.1.0.0 \ | 464 create_library_symlink /lib/i386-linux-gnu/libcrypto.so.1.0.0 \ |
| 456 /usr/lib/i386-linux-gnu/libcrypto.so | 465 /usr/lib/i386-linux-gnu/libcrypto.so |
| 457 | 466 |
| 458 create_library_symlink /lib/i386-linux-gnu/libssl.so.1.0.0 \ | 467 create_library_symlink /lib/i386-linux-gnu/libssl.so.1.0.0 \ |
| 459 /usr/lib/i386-linux-gnu/libssl.so | 468 /usr/lib/i386-linux-gnu/libssl.so |
| 460 else | 469 else |
| 461 echo "Skipping symbolic links for NaCl." | 470 echo "Skipping symbolic links for NaCl." |
| 462 fi | 471 fi |
| OLD | NEW |