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 https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_i nstructions.md | 8 # See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_i nstructions.md |
9 | 9 |
10 usage() { | 10 usage() { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
65 do_inst_lib32=1 | 65 do_inst_lib32=1 |
66 fi | 66 fi |
67 | 67 |
68 # Check for lsb_release command in $PATH | 68 # Check for lsb_release command in $PATH |
69 if ! which lsb_release > /dev/null; then | 69 if ! which lsb_release > /dev/null; then |
70 echo "ERROR: lsb_release not found in \$PATH" >&2 | 70 echo "ERROR: lsb_release not found in \$PATH" >&2 |
71 exit 1; | 71 exit 1; |
72 fi | 72 fi |
73 | 73 |
74 lsb_release=$(lsb_release --codename --short) | 74 lsb_release=$(lsb_release --codename --short) |
75 ubuntu_codenames="(precise|trusty|utopic|vivid|wily)" | 75 ubuntu_codenames="(precise|trusty|utopic|vivid|wily|xenial)" |
76 if [ 0 -eq "${do_unsupported-0}" ] && [ 0 -eq "${do_quick_check-0}" ] ; then | 76 if [ 0 -eq "${do_unsupported-0}" ] && [ 0 -eq "${do_quick_check-0}" ] ; then |
77 if [[ ! $lsb_release =~ $ubuntu_codenames ]]; then | 77 if [[ ! $lsb_release =~ $ubuntu_codenames ]]; then |
78 echo "ERROR: Only Ubuntu 12.04 (precise), 14.04 (trusty), " \ | 78 echo "ERROR: Only Ubuntu 12.04 (precise), 14.04 (trusty), " \ |
79 "14.10 (utopic), 15.04 (vivid) and 15.10 (wily) " \ | 79 "14.10 (utopic), 15.04 (vivid), 15.10 (wily) and 16.04 (xenial) " \ |
80 "are currently supported" >&2 | 80 "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 |
91 echo "Running as non-root user." | 91 echo "Running as non-root user." |
92 echo "You might have to enter your password one or more times for 'sudo'." | 92 echo "You might have to enter your password one or more times for 'sudo'." |
93 echo | 93 echo |
94 fi | 94 fi |
95 | 95 |
96 # Packages needed for chromeos only | 96 # Packages needed for chromeos only |
97 chromeos_dev_list="libbluetooth-dev libxkbcommon-dev realpath" | 97 chromeos_dev_list="libbluetooth-dev libxkbcommon-dev realpath" |
98 | 98 |
99 # Packages needed for development | 99 # Packages needed for development |
100 dev_list="bison cdbs curl dpkg-dev elfutils devscripts fakeroot | 100 dev_list="bison cdbs curl dpkg-dev elfutils devscripts fakeroot |
101 flex fonts-thai-tlwg g++ git-core git-svn gperf language-pack-da | 101 flex fonts-thai-tlwg g++ git-core git-svn gperf language-pack-da |
102 language-pack-fr language-pack-he language-pack-zh-hant | 102 language-pack-fr language-pack-he language-pack-zh-hant |
103 libapache2-mod-php5 libasound2-dev libbrlapi-dev libav-tools | 103 libasound2-dev libbrlapi-dev libav-tools |
104 libbz2-dev libcairo2-dev libcap-dev libcups2-dev libcurl4-gnutls-dev | 104 libbz2-dev libcairo2-dev libcap-dev libcups2-dev libcurl4-gnutls-dev |
105 libdrm-dev libelf-dev libffi-dev libgconf2-dev libglib2.0-dev | 105 libdrm-dev libelf-dev libffi-dev libgconf2-dev libglib2.0-dev |
106 libglu1-mesa-dev libgnome-keyring-dev libgtk2.0-dev libkrb5-dev | 106 libglu1-mesa-dev libgnome-keyring-dev libgtk2.0-dev libkrb5-dev |
107 libnspr4-dev libnss3-dev libpam0g-dev libpci-dev libpulse-dev | 107 libnspr4-dev libnss3-dev libpam0g-dev libpci-dev libpulse-dev |
108 libsctp-dev libspeechd-dev libsqlite3-dev libssl-dev libudev-dev | 108 libsctp-dev libspeechd-dev libsqlite3-dev libssl-dev libudev-dev |
109 libwww-perl libxslt1-dev libxss-dev libxt-dev libxtst-dev openbox | 109 libwww-perl libxslt1-dev libxss-dev libxt-dev libxtst-dev openbox |
110 patch perl php5-cgi pkg-config python python-cherrypy3 python-crypto | 110 patch perl pkg-config python python-cherrypy3 python-crypto |
111 python-dev python-numpy python-opencv python-openssl python-psutil | 111 python-dev python-numpy python-opencv python-openssl python-psutil |
112 python-yaml rpm ruby subversion ttf-dejavu-core ttf-indic-fonts | 112 python-yaml rpm ruby subversion ttf-dejavu-core wdiff zip |
113 ttf-kochi-gothic ttf-kochi-mincho wdiff zip $chromeos_dev_list" | 113 $chromeos_dev_list" |
114 | 114 |
115 # 64-bit systems need a minimum set of 32-bit compat packages for the pre-built | 115 # 64-bit systems need a minimum set of 32-bit compat packages for the pre-built |
116 # NaCl binaries. | 116 # NaCl binaries. |
117 if file -L /sbin/init | grep -q 'ELF 64-bit'; then | 117 if file -L /sbin/init | grep -q 'ELF 64-bit'; then |
118 dev_list="${dev_list} libc6-i386 lib32gcc1 lib32stdc++6" | 118 dev_list="${dev_list} libc6-i386 lib32gcc1 lib32stdc++6" |
119 fi | 119 fi |
120 | 120 |
121 # Run-time libraries required by chromeos only | 121 # Run-time libraries required by chromeos only |
122 chromeos_lib_list="libpulse0 libbz2-1.0" | 122 chromeos_lib_list="libpulse0 libbz2-1.0" |
123 | 123 |
(...skipping 30 matching lines...) Expand all Loading... | |
154 arm_list="libc6-dev-armhf-cross | 154 arm_list="libc6-dev-armhf-cross |
155 linux-libc-dev-armhf-cross | 155 linux-libc-dev-armhf-cross |
156 g++-arm-linux-gnueabihf" | 156 g++-arm-linux-gnueabihf" |
157 | 157 |
158 # Work around for dependency issue Ubuntu/Trusty: http://crbug.com/435056 | 158 # Work around for dependency issue Ubuntu/Trusty: http://crbug.com/435056 |
159 case $lsb_release in | 159 case $lsb_release in |
160 trusty) | 160 trusty) |
161 arm_list+=" g++-4.8-multilib-arm-linux-gnueabihf | 161 arm_list+=" g++-4.8-multilib-arm-linux-gnueabihf |
162 gcc-4.8-multilib-arm-linux-gnueabihf" | 162 gcc-4.8-multilib-arm-linux-gnueabihf" |
163 ;; | 163 ;; |
164 wily) | 164 wily) |
friedman1
2016/04/22 01:27:25
FYI this could be merged here with:
wily|xenial)
krasin
2016/04/22 01:31:49
yeah, I've considered that, but given how awkward
| |
165 arm_list+=" g++-5-multilib-arm-linux-gnueabihf | 165 arm_list+=" g++-5-multilib-arm-linux-gnueabihf |
166 gcc-5-multilib-arm-linux-gnueabihf | 166 gcc-5-multilib-arm-linux-gnueabihf |
167 gcc-arm-linux-gnueabihf" | 167 gcc-arm-linux-gnueabihf" |
168 ;; | 168 ;; |
169 xenial) | |
170 arm_list+=" g++-5-multilib-arm-linux-gnueabihf | |
171 gcc-5-multilib-arm-linux-gnueabihf | |
172 gcc-arm-linux-gnueabihf" | |
173 ;; | |
169 esac | 174 esac |
170 | 175 |
171 # Packages to build NaCl, its toolchains, and its ports. | 176 # Packages to build NaCl, its toolchains, and its ports. |
172 naclports_list="ant autoconf bison cmake gawk intltool xutils-dev xsltproc" | 177 naclports_list="ant autoconf bison cmake gawk intltool xutils-dev xsltproc" |
173 nacl_list="g++-mingw-w64-i686 lib32z1-dev | 178 nacl_list="g++-mingw-w64-i686 lib32z1-dev |
174 libasound2:i386 libcap2:i386 libelf-dev:i386 libfontconfig1:i386 | 179 libasound2:i386 libcap2:i386 libelf-dev:i386 libfontconfig1:i386 |
175 libgconf-2-4:i386 libglib2.0-0:i386 libgpm2:i386 libgtk2.0-0:i386 | 180 libgconf-2-4:i386 libglib2.0-0:i386 libgpm2:i386 libgtk2.0-0:i386 |
176 libncurses5:i386 lib32ncurses5-dev libnss3:i386 libpango1.0-0:i386 | 181 libncurses5:i386 lib32ncurses5-dev libnss3:i386 libpango1.0-0:i386 |
177 libssl1.0.0:i386 libtinfo-dev libtinfo-dev:i386 libtool | 182 libssl1.0.0:i386 libtinfo-dev libtinfo-dev:i386 libtool |
178 libxcomposite1:i386 libxcursor1:i386 libxdamage1:i386 libxi6:i386 | 183 libxcomposite1:i386 libxcursor1:i386 libxdamage1:i386 libxi6:i386 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
236 if package_exists apache2-bin; then | 241 if package_exists apache2-bin; then |
237 dev_list="${dev_list} apache2-bin" | 242 dev_list="${dev_list} apache2-bin" |
238 else | 243 else |
239 dev_list="${dev_list} apache2.2-bin" | 244 dev_list="${dev_list} apache2.2-bin" |
240 fi | 245 fi |
241 if package_exists fonts-stix; then | 246 if package_exists fonts-stix; then |
242 dev_list="${dev_list} fonts-stix" | 247 dev_list="${dev_list} fonts-stix" |
243 else | 248 else |
244 dev_list="${dev_list} xfonts-mathml" | 249 dev_list="${dev_list} xfonts-mathml" |
245 fi | 250 fi |
251 if package_exists fonts-indic; then | |
252 dev_list="${dev_list} fonts-indic" | |
253 else | |
254 dev_list="${dev_list} ttf-indic-fonts" | |
255 fi | |
256 if package_exists php7.0-cgi; then | |
257 dev_list="${dev_list} php7.0-cgi libapache2-mod-php7.0" | |
258 else | |
259 dev_list="${dev_list} php5-cgi libapache2-mod-php5" | |
260 fi | |
261 # Ubuntu 16.04 has this package deleted. | |
262 if package_exists ttf-kochi-gothic; then | |
263 dev_list="${dev_list} ttf-kochi-gothic" | |
264 fi | |
265 # Ubuntu 16.04 has this package deleted. | |
266 if package_exists ttf-kochi-mincho; then | |
267 dev_list="${dev_list} ttf-kochi-mincho" | |
268 fi | |
246 | 269 |
247 # Some packages are only needed if the distribution actually supports | 270 # Some packages are only needed if the distribution actually supports |
248 # installing them. | 271 # installing them. |
249 if package_exists appmenu-gtk; then | 272 if package_exists appmenu-gtk; then |
250 lib_list="$lib_list appmenu-gtk" | 273 lib_list="$lib_list appmenu-gtk" |
251 fi | 274 fi |
252 | 275 |
253 # When cross building for arm/Android on 64-bit systems the host binaries | 276 # When cross building for arm/Android on 64-bit systems the host binaries |
254 # that are part of v8 need to be compiled with -m32 which means | 277 # that are part of v8 need to be compiled with -m32 which means |
255 # that basic multilib support is needed. | 278 # that basic multilib support is needed. |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
476 # only contains libcrypto.so.1.0.0 and not the symlink needed for | 499 # only contains libcrypto.so.1.0.0 and not the symlink needed for |
477 # linking (libcrypto.so). | 500 # linking (libcrypto.so). |
478 create_library_symlink /lib/i386-linux-gnu/libcrypto.so.1.0.0 \ | 501 create_library_symlink /lib/i386-linux-gnu/libcrypto.so.1.0.0 \ |
479 /usr/lib/i386-linux-gnu/libcrypto.so | 502 /usr/lib/i386-linux-gnu/libcrypto.so |
480 | 503 |
481 create_library_symlink /lib/i386-linux-gnu/libssl.so.1.0.0 \ | 504 create_library_symlink /lib/i386-linux-gnu/libssl.so.1.0.0 \ |
482 /usr/lib/i386-linux-gnu/libssl.so | 505 /usr/lib/i386-linux-gnu/libssl.so |
483 else | 506 else |
484 echo "Skipping symbolic links for NaCl." | 507 echo "Skipping symbolic links for NaCl." |
485 fi | 508 fi |
OLD | NEW |