| 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 echo "The following command failed: " ${new_list_cmd} | 243 echo "The following command failed: " ${new_list_cmd} |
| 244 echo | 244 echo |
| 245 echo "It produces the following output:" | 245 echo "It produces the following output:" |
| 246 yes n | $new_list_cmd || true | 246 yes n | $new_list_cmd || true |
| 247 echo | 247 echo |
| 248 echo "You will have to install the above packages yourself." | 248 echo "You will have to install the above packages yourself." |
| 249 echo | 249 echo |
| 250 exit 100 | 250 exit 100 |
| 251 fi | 251 fi |
| 252 | 252 |
| 253 # Install arm root image | |
| 254 if test "$do_inst_arm" = "1"; then | |
| 255 # As well as the arm toolchain packages we also need a recent arm root | |
| 256 # image to build against (using --sysroot). We could construct this | |
| 257 # from scratch based on the current state or precise/arm but for | |
| 258 # consistency we currently use a pre-built root image which was constructed | |
| 259 # for building trusted NaCl code. | |
| 260 CHROME_ROOT="$(dirname ${BASH_SOURCE[0]})" | |
| 261 CHROME_ROOT="$(dirname ${CHROME_ROOT})" | |
| 262 SYSROOT="${CHROME_ROOT}/arm-sysroot" | |
| 263 TC_URL_PREFIX=https://commondatastorage.googleapis.com/nativeclient-archive2/t
oolchain | |
| 264 TC_REV=8001 | |
| 265 TC_URL=${TC_URL_PREFIX}/${TC_REV}/naclsdk_linux_arm-trusted.tgz | |
| 266 | |
| 267 INSTALL_ROOT="yes" | |
| 268 STAMP="${SYSROOT}/.stamp" | |
| 269 if [ -f "${STAMP}" ]; then | |
| 270 if [ "${TC_URL}" = $(cat ${STAMP}) ]; then | |
| 271 INSTALL_ROOT="no" | |
| 272 fi | |
| 273 fi | |
| 274 | |
| 275 if [ $INSTALL_ROOT = "no" ]; then | |
| 276 echo "ARM root image already up-to-date." | |
| 277 else | |
| 278 echo "Installing ARM root image." | |
| 279 mkdir -p ${SYSROOT} | |
| 280 tarball=${SYSROOT}/naclsdk_linux_arm-trusted.tgz | |
| 281 set -x | |
| 282 curl -L ${TC_URL} -o ${tarball} | |
| 283 tar xf ${tarball} -C ${SYSROOT} | |
| 284 rm ${tarball} | |
| 285 echo -n "${TC_URL}" > "${STAMP}" | |
| 286 fi | |
| 287 fi | |
| 288 | |
| 289 # Install 32bit backwards compatibility support for 64bit systems | 253 # Install 32bit backwards compatibility support for 64bit systems |
| 290 if [ "$(uname -m)" = "x86_64" ]; then | 254 if [ "$(uname -m)" = "x86_64" ]; then |
| 291 if test "$do_inst_lib32" != "1" | 255 if test "$do_inst_lib32" != "1" |
| 292 then | 256 then |
| 293 echo "NOTE: If you were expecting the option to install 32bit libs," | 257 echo "NOTE: If you were expecting the option to install 32bit libs," |
| 294 echo "please run with the --lib32 flag." | 258 echo "please run with the --lib32 flag." |
| 295 echo | 259 echo |
| 296 echo "Installation complete." | 260 echo "Installation complete." |
| 297 exit 0 | 261 exit 0 |
| 298 fi | 262 fi |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 sed -e 's/[.]so[.][0-9].*/.so/' | | 436 sed -e 's/[.]so[.][0-9].*/.so/' | |
| 473 sort -u); do | 437 sort -u); do |
| 474 [ "x${i##*/}" = "xld-linux.so" ] && continue | 438 [ "x${i##*/}" = "xld-linux.so" ] && continue |
| 475 [ -r "$i" ] && continue | 439 [ -r "$i" ] && continue |
| 476 j="$(ls "$i."* | sed -e 's/.*[.]so[.]\([^.]*\)$/\1/;t;d' | | 440 j="$(ls "$i."* | sed -e 's/.*[.]so[.]\([^.]*\)$/\1/;t;d' | |
| 477 sort -n | tail -n 1)" | 441 sort -n | tail -n 1)" |
| 478 [ -r "$i.$j" ] || continue | 442 [ -r "$i.$j" ] || continue |
| 479 sudo ln -s "${i##*/}.$j" "$i" | 443 sudo ln -s "${i##*/}.$j" "$i" |
| 480 done | 444 done |
| 481 fi | 445 fi |
| OLD | NEW |