| OLD | NEW |
| 1 #!/bin/bash -e | 1 #!/bin/bash -e |
| 2 | 2 |
| 3 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2009 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 if test "$do_inst_lib32" != "1" | 321 if test "$do_inst_lib32" != "1" |
| 322 then | 322 then |
| 323 echo "Exiting without installing any 32bit libraries." | 323 echo "Exiting without installing any 32bit libraries." |
| 324 exit 0 | 324 exit 0 |
| 325 fi | 325 fi |
| 326 | 326 |
| 327 # Standard 32bit compatibility libraries | 327 # Standard 32bit compatibility libraries |
| 328 echo "First, installing the limited existing 32-bit support..." | 328 echo "First, installing the limited existing 32-bit support..." |
| 329 cmp_list="ia32-libs lib32asound2-dev lib32readline5-dev lib32stdc++6 lib32z1 | 329 cmp_list="ia32-libs lib32asound2-dev lib32readline5-dev lib32stdc++6 lib32z1 |
| 330 lib32z1-dev libc6-dev-i386 libc6-i386 g++-multilib" | 330 lib32z1-dev libc6-dev-i386 libc6-i386 g++-multilib" |
| 331 apt-get install $cmp_list | 331 sudo apt-get install $cmp_list |
| 332 | 332 |
| 333 tmp=/tmp/install-32bit.$$ | 333 tmp=/tmp/install-32bit.$$ |
| 334 trap 'rm -rf "${tmp}"' EXIT INT TERM QUIT | 334 trap 'rm -rf "${tmp}"' EXIT INT TERM QUIT |
| 335 mkdir -p "${tmp}/apt/lists/partial" "${tmp}/cache" "${tmp}/partial" | 335 mkdir -p "${tmp}/apt/lists/partial" "${tmp}/cache" "${tmp}/partial" |
| 336 touch "${tmp}/status" | 336 touch "${tmp}/status" |
| 337 | 337 |
| 338 [ -r /etc/apt/apt.conf ] && cp /etc/apt/apt.conf "${tmp}/apt/" | 338 [ -r /etc/apt/apt.conf ] && cp /etc/apt/apt.conf "${tmp}/apt/" |
| 339 cat >>"${tmp}/apt/apt.conf" <<EOF | 339 cat >>"${tmp}/apt/apt.conf" <<EOF |
| 340 Apt::Architecture "i386"; | 340 Apt::Architecture "i386"; |
| 341 Dir::Cache "${tmp}/cache"; | 341 Dir::Cache "${tmp}/cache"; |
| 342 Dir::Cache::Archives "${tmp}/"; | 342 Dir::Cache::Archives "${tmp}/"; |
| 343 Dir::State::Lists "${tmp}/apt/lists/"; | 343 Dir::State::Lists "${tmp}/apt/lists/"; |
| 344 Dir::State::status "${tmp}/status"; | 344 Dir::State::status "${tmp}/status"; |
| 345 EOF | 345 EOF |
| 346 | 346 |
| 347 # Download 32bit packages | 347 # Download 32bit packages |
| 348 echo "Computing list of available 32bit packages..." | 348 echo "Computing list of available 32bit packages..." |
| 349 apt-get -c="${tmp}/apt/apt.conf" update | 349 sudo apt-get -c="${tmp}/apt/apt.conf" update |
| 350 | 350 |
| 351 echo "Downloading available 32bit packages..." | 351 echo "Downloading available 32bit packages..." |
| 352 apt-get -c="${tmp}/apt/apt.conf" \ | 352 sudo apt-get -c="${tmp}/apt/apt.conf" \ |
| 353 --yes --download-only --force-yes --reinstall install \ | 353 --yes --download-only --force-yes --reinstall install \ |
| 354 ${lib_list} ${dbg_list} | 354 ${lib_list} ${dbg_list} |
| 355 | 355 |
| 356 # Open packages, remove everything that is not a library, move the | 356 # Open packages, remove everything that is not a library, move the |
| 357 # library to a lib32 directory and package everything as a *.deb file. | 357 # library to a lib32 directory and package everything as a *.deb file. |
| 358 echo "Repackaging and installing 32bit packages for use on 64bit systems..." | 358 echo "Repackaging and installing 32bit packages for use on 64bit systems..." |
| 359 for i in ${lib_list} ${dbg_list}; do | 359 for i in ${lib_list} ${dbg_list}; do |
| 360 orig="$(echo "${tmp}/${i}"_*_i386.deb)" | 360 orig="$(echo "${tmp}/${i}"_*_i386.deb)" |
| 361 compat="$(echo "${orig}" | | 361 compat="$(echo "${orig}" | |
| 362 sed -e 's,\(_[^_/]*_\)i386\(.deb\),-ia32\1amd64\2,')" | 362 sed -e 's,\(_[^_/]*_\)i386\(.deb\),-ia32\1amd64\2,')" |
| 363 rm -rf "${tmp}/staging" | 363 rm -rf "${tmp}/staging" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 sed -e 's/[.]so[.][0-9].*/.so/' | | 441 sed -e 's/[.]so[.][0-9].*/.so/' | |
| 442 sort -u); do | 442 sort -u); do |
| 443 [ "x${i##*/}" = "xld-linux.so" ] && continue | 443 [ "x${i##*/}" = "xld-linux.so" ] && continue |
| 444 [ -r "$i" ] && continue | 444 [ -r "$i" ] && continue |
| 445 j="$(ls "$i."* | sed -e 's/.*[.]so[.]\([^.]*\)$/\1/;t;d' | | 445 j="$(ls "$i."* | sed -e 's/.*[.]so[.]\([^.]*\)$/\1/;t;d' | |
| 446 sort -n | tail -n 1)" | 446 sort -n | tail -n 1)" |
| 447 [ -r "$i.$j" ] || continue | 447 [ -r "$i.$j" ] || continue |
| 448 sudo ln -s "${i##*/}.$j" "$i" | 448 sudo ln -s "${i##*/}.$j" "$i" |
| 449 done | 449 done |
| 450 fi | 450 fi |
| OLD | NEW |