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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 --no-prompt) do_default=1 | 56 --no-prompt) do_default=1 |
57 do_quietly="-qq --assume-yes" | 57 do_quietly="-qq --assume-yes" |
58 ;; | 58 ;; |
59 --quick-check) do_quick_check=1;; | 59 --quick-check) do_quick_check=1;; |
60 --unsupported) do_unsupported=1;; | 60 --unsupported) do_unsupported=1;; |
61 *) usage;; | 61 *) usage;; |
62 esac | 62 esac |
63 shift | 63 shift |
64 done | 64 done |
65 | 65 |
66 ubuntu_versions="12\.04|12\.10|13\.04|13\.10" | 66 ubuntu_versions="12\.04|12\.10|13\.04|13\.10|14\.04" |
67 ubuntu_codenames="precise|quantal|raring|saucy" | 67 ubuntu_codenames="precise|quantal|raring|saucy|trusty" |
68 ubuntu_issue="Ubuntu ($ubuntu_versions|$ubuntu_codenames)" | 68 ubuntu_issue="Ubuntu ($ubuntu_versions|$ubuntu_codenames)" |
69 # GCEL is an Ubuntu-derived VM image used on Google Compute Engine; /etc/issue | 69 # GCEL is an Ubuntu-derived VM image used on Google Compute Engine; /etc/issue |
70 # doesn't contain a version number so just trust that the user knows what | 70 # doesn't contain a version number so just trust that the user knows what |
71 # they're doing. | 71 # they're doing. |
72 gcel_issue="^GCEL" | 72 gcel_issue="^GCEL" |
73 | 73 |
74 if [ 0 -eq "${do_unsupported-0}" ] && [ 0 -eq "${do_quick_check-0}" ] ; then | 74 if [ 0 -eq "${do_unsupported-0}" ] && [ 0 -eq "${do_quick_check-0}" ] ; then |
75 if ! egrep -q "($ubuntu_issue|$gcel_issue)" /etc/issue; then | 75 if ! egrep -q "($ubuntu_issue|$gcel_issue)" /etc/issue; then |
76 echo "ERROR: Only Ubuntu 12.04 (precise) through 13.10 (saucy) are"\ | 76 echo "ERROR: Only Ubuntu 12.04 (precise) through 14.04 (trusty) are"\ |
77 "currently supported" >&2 | 77 "currently supported" >&2 |
78 exit 1 | 78 exit 1 |
79 fi | 79 fi |
80 | 80 |
81 if ! uname -m | egrep -q "i686|x86_64"; then | 81 if ! uname -m | egrep -q "i686|x86_64"; then |
82 echo "Only x86 architectures are currently supported" >&2 | 82 echo "Only x86 architectures are currently supported" >&2 |
83 exit | 83 exit |
84 fi | 84 fi |
85 fi | 85 fi |
86 | 86 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 # Debugging symbols for all of the run-time libraries | 131 # Debugging symbols for all of the run-time libraries |
132 dbg_list="libatk1.0-dbg libc6-dbg libcairo2-dbg libfontconfig1-dbg | 132 dbg_list="libatk1.0-dbg libc6-dbg libcairo2-dbg libfontconfig1-dbg |
133 libglib2.0-0-dbg libgtk2.0-0-dbg libpango1.0-0-dbg libpcre3-dbg | 133 libglib2.0-0-dbg libgtk2.0-0-dbg libpango1.0-0-dbg libpcre3-dbg |
134 libpixman-1-0-dbg libsqlite3-0-dbg libx11-6-dbg libxau6-dbg | 134 libpixman-1-0-dbg libsqlite3-0-dbg libx11-6-dbg libxau6-dbg |
135 libxcb1-dbg libxcomposite1-dbg libxcursor1-dbg libxdamage1-dbg | 135 libxcb1-dbg libxcomposite1-dbg libxcursor1-dbg libxdamage1-dbg |
136 libxdmcp6-dbg libxext6-dbg libxfixes3-dbg libxi6-dbg libxinerama1-dbg | 136 libxdmcp6-dbg libxext6-dbg libxfixes3-dbg libxi6-dbg libxinerama1-dbg |
137 libxrandr2-dbg libxrender1-dbg libxtst6-dbg zlib1g-dbg | 137 libxrandr2-dbg libxrender1-dbg libxtst6-dbg zlib1g-dbg |
138 libstdc++6-4.6-dbg" | 138 libstdc++6-4.6-dbg" |
139 | 139 |
140 # arm cross toolchain packages needed to build chrome on armhf | 140 # arm cross toolchain packages needed to build chrome on armhf |
141 arm_list="libc6-armhf-cross libc6-dev-armhf-cross libgcc1-armhf-cross | 141 arm_list="libc6-dev-armhf-cross |
142 libgomp1-armhf-cross linux-libc-dev-armhf-cross | 142 linux-libc-dev-armhf-cross |
143 libgcc1-dbg-armhf-cross libgomp1-dbg-armhf-cross | 143 g++-arm-linux-gnueabihf" |
144 binutils-arm-linux-gnueabihf cpp-arm-linux-gnueabihf | |
145 gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf | |
146 libmudflap0-dbg-armhf-cross" | |
147 | |
148 # Old armel cross toolchain packages | |
149 armel_list="libc6-armel-cross libc6-dev-armel-cross libgcc1-armel-cross | |
150 libgomp1-armel-cross linux-libc-dev-armel-cross | |
151 libgcc1-dbg-armel-cross libgomp1-dbg-armel-cross | |
152 binutils-arm-linux-gnueabi cpp-arm-linux-gnueabi | |
153 gcc-arm-linux-gnueabi g++-arm-linux-gnueabi | |
154 libmudflap0-dbg-armel-cross" | |
155 | |
156 # TODO(sbc): remove armel once the armhf transition is complete | |
157 arm_list="$arm_list $armel_list" | |
158 | 144 |
159 # Packages to build standalone NaCl and all its toolchains. | 145 # Packages to build standalone NaCl and all its toolchains. |
160 nacl_list="g++-mingw-w64-i686 libtinfo-dev:i386" | 146 nacl_list="g++-mingw-w64-i686 libtinfo-dev:i386" |
161 | 147 |
162 # Some package names have changed over time | 148 # Some package names have changed over time |
163 if package_exists ttf-mscorefonts-installer; then | 149 if package_exists ttf-mscorefonts-installer; then |
164 dev_list="${dev_list} ttf-mscorefonts-installer" | 150 dev_list="${dev_list} ttf-mscorefonts-installer" |
165 else | 151 else |
166 dev_list="${dev_list} msttcorefonts" | 152 dev_list="${dev_list} msttcorefonts" |
167 fi | 153 fi |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 echo "Including debugging symbols." | 236 echo "Including debugging symbols." |
251 else | 237 else |
252 echo "Skipping debugging symbols." | 238 echo "Skipping debugging symbols." |
253 dbg_list= | 239 dbg_list= |
254 fi | 240 fi |
255 | 241 |
256 # When cross building for arm on 64-bit systems the host binaries | 242 # When cross building for arm on 64-bit systems the host binaries |
257 # that are part of v8 need to be compiled with -m32 which means | 243 # that are part of v8 need to be compiled with -m32 which means |
258 # that basic multilib support is needed. | 244 # that basic multilib support is needed. |
259 if file /sbin/init | grep -q 'ELF 64-bit'; then | 245 if file /sbin/init | grep -q 'ELF 64-bit'; then |
260 arm_list="$arm_list g++-multilib" | 246 # TODO(thestig): Use lsb_release rather than looking /etc/issue. |
| 247 if ! egrep -q "trusty" /etc/issue; then |
| 248 # gcc-multilib conflicts with the arm cross compiler in trusty but |
| 249 # g++-4.8-multilib gives us the 32-bit support that we need. |
| 250 arm_list="$arm_list g++-4.8-multilib" |
| 251 else |
| 252 arm_list="$arm_list g++-multilib" |
| 253 fi |
261 fi | 254 fi |
262 | 255 |
263 if test "$do_inst_arm" = "1" ; then | 256 if test "$do_inst_arm" = "1" ; then |
264 echo "Including ARM cross toolchain." | 257 echo "Including ARM cross toolchain." |
265 else | 258 else |
266 echo "Skipping ARM cross toolchain." | 259 echo "Skipping ARM cross toolchain." |
267 arm_list= | 260 arm_list= |
268 fi | 261 fi |
269 | 262 |
270 if test "$do_inst_nacl" = "1"; then | 263 if test "$do_inst_nacl" = "1"; then |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 sed -e 's/[.]so[.][0-9].*/.so/' | | 577 sed -e 's/[.]so[.][0-9].*/.so/' | |
585 sort -u); do | 578 sort -u); do |
586 [ "x${i##*/}" = "xld-linux.so" ] && continue | 579 [ "x${i##*/}" = "xld-linux.so" ] && continue |
587 [ -r "$i" ] && continue | 580 [ -r "$i" ] && continue |
588 j="$(ls "$i."* | sed -e 's/.*[.]so[.]\([^.]*\)$/\1/;t;d' | | 581 j="$(ls "$i."* | sed -e 's/.*[.]so[.]\([^.]*\)$/\1/;t;d' | |
589 sort -n | tail -n 1)" | 582 sort -n | tail -n 1)" |
590 [ -r "$i.$j" ] || continue | 583 [ -r "$i.$j" ] || continue |
591 sudo ln -s "${i##*/}.$j" "$i" | 584 sudo ln -s "${i##*/}.$j" "$i" |
592 done | 585 done |
593 fi | 586 fi |
OLD | NEW |