Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: build/install-build-deps.sh

Issue 15741015: Change detection method for checking package name changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased against upstream Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 usage() { 11 usage() {
12 echo "Usage: $0 [--options]" 12 echo "Usage: $0 [--options]"
13 echo "Options:" 13 echo "Options:"
14 echo "--[no-]syms: enable or disable installation of debugging symbols" 14 echo "--[no-]syms: enable or disable installation of debugging symbols"
15 echo "--[no-]lib32: enable or disable installation of 32 bit libraries" 15 echo "--[no-]lib32: enable or disable installation of 32 bit libraries"
16 echo "--[no-]arm: enable or disable installation of arm cross toolchain" 16 echo "--[no-]arm: enable or disable installation of arm cross toolchain"
17 echo "--[no-]chromeos-fonts: enable or disable installation of Chrome OS"\ 17 echo "--[no-]chromeos-fonts: enable or disable installation of Chrome OS"\
18 "fonts" 18 "fonts"
19 echo "--no-prompt: silently select standard options/defaults" 19 echo "--no-prompt: silently select standard options/defaults"
20 echo "Script will prompt interactively if options not given." 20 echo "Script will prompt interactively if options not given."
21 exit 1 21 exit 1
22 } 22 }
23 23
24 # Checks whether a particular package is available in the repos.
25 # USAGE: $ package_exists <package name>
26 package_exists() {
27 apt-cache pkgnames | grep -x "$1" > /dev/null 2>&1
28 }
29
24 while test "$1" != "" 30 while test "$1" != ""
25 do 31 do
26 case "$1" in 32 case "$1" in
27 --syms) do_inst_syms=1;; 33 --syms) do_inst_syms=1;;
28 --no-syms) do_inst_syms=0;; 34 --no-syms) do_inst_syms=0;;
29 --lib32) do_inst_lib32=1;; 35 --lib32) do_inst_lib32=1;;
30 --no-lib32) do_inst_lib32=0;; 36 --no-lib32) do_inst_lib32=0;;
31 --arm) do_inst_arm=1;; 37 --arm) do_inst_arm=1;;
32 --no-arm) do_inst_arm=0;; 38 --no-arm) do_inst_arm=0;;
33 --chromeos-fonts) do_inst_chromeos_fonts=1;; 39 --chromeos-fonts) do_inst_chromeos_fonts=1;;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 # arm cross toolchain packages needed to build chrome on arm 122 # arm cross toolchain packages needed to build chrome on arm
117 arm_list="libc6-armel-cross libc6-dev-armel-cross libgcc1-armel-cross 123 arm_list="libc6-armel-cross libc6-dev-armel-cross libgcc1-armel-cross
118 libgomp1-armel-cross linux-libc-dev-armel-cross 124 libgomp1-armel-cross linux-libc-dev-armel-cross
119 libgcc1-dbg-armel-cross libgomp1-dbg-armel-cross 125 libgcc1-dbg-armel-cross libgomp1-dbg-armel-cross
120 binutils-arm-linux-gnueabi cpp-arm-linux-gnueabi 126 binutils-arm-linux-gnueabi cpp-arm-linux-gnueabi
121 gcc-arm-linux-gnueabi g++-arm-linux-gnueabi 127 gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
122 libmudflap0-dbg-armel-cross" 128 libmudflap0-dbg-armel-cross"
123 129
124 130
125 # Some package names have changed over time 131 # Some package names have changed over time
126 if apt-cache show ttf-mscorefonts-installer >/dev/null 2>&1; then 132 if package_exists ttf-mscorefonts-installer; then
127 dev_list="${dev_list} ttf-mscorefonts-installer" 133 dev_list="${dev_list} ttf-mscorefonts-installer"
128 else 134 else
129 dev_list="${dev_list} msttcorefonts" 135 dev_list="${dev_list} msttcorefonts"
130 fi 136 fi
131 if apt-cache show libnspr4-dbg >/dev/null 2>&1; then 137 if package_exists libnspr4-dbg; then
132 dbg_list="${dbg_list} libnspr4-dbg libnss3-dbg" 138 dbg_list="${dbg_list} libnspr4-dbg libnss3-dbg"
133 lib_list="${lib_list} libnspr4 libnss3" 139 lib_list="${lib_list} libnspr4 libnss3"
134 else 140 else
135 dbg_list="${dbg_list} libnspr4-0d-dbg libnss3-1d-dbg" 141 dbg_list="${dbg_list} libnspr4-0d-dbg libnss3-1d-dbg"
136 lib_list="${lib_list} libnspr4-0d libnss3-1d" 142 lib_list="${lib_list} libnspr4-0d libnss3-1d"
137 fi 143 fi
138 if apt-cache show libjpeg-dev >/dev/null 2>&1; then 144 if package_exists libjpeg-dev; then
139 dev_list="${dev_list} libjpeg-dev" 145 dev_list="${dev_list} libjpeg-dev"
140 else 146 else
141 dev_list="${dev_list} libjpeg62-dev" 147 dev_list="${dev_list} libjpeg62-dev"
142 fi 148 fi
143 if [ "$(apt-cache pkgnames libudev1 2>&1)" == "libudev1" ] ; then 149 if package_exists libudev1; then
144 dev_list="${dev_list} libudev1" 150 dev_list="${dev_list} libudev1"
145 else 151 else
146 dev_list="${dev_list} libudev0" 152 dev_list="${dev_list} libudev0"
147 fi 153 fi
148 154
149 155
150 # Some packages are only needed, if the distribution actually supports 156 # Some packages are only needed, if the distribution actually supports
151 # installing them. 157 # installing them.
152 if apt-cache show appmenu-gtk >/dev/null 2>&1; then 158 if package_exists appmenu-gtk; then
153 lib_list="$lib_list appmenu-gtk" 159 lib_list="$lib_list appmenu-gtk"
154 fi 160 fi
155 161
156 # Waits for the user to press 'Y' or 'N'. Either uppercase of lowercase is 162 # Waits for the user to press 'Y' or 'N'. Either uppercase of lowercase is
157 # accepted. Returns 0 for 'Y' and 1 for 'N'. If an optional parameter has 163 # accepted. Returns 0 for 'Y' and 1 for 'N'. If an optional parameter has
158 # been provided to yes_no(), the function also accepts RETURN as a user input. 164 # been provided to yes_no(), the function also accepts RETURN as a user input.
159 # The parameter specifies the exit code that should be returned in that case. 165 # The parameter specifies the exit code that should be returned in that case.
160 # The function will echo the user's selection followed by a newline character. 166 # The function will echo the user's selection followed by a newline character.
161 # Users can abort the function by pressing CTRL-C. This will call "exit 1". 167 # Users can abort the function by pressing CTRL-C. This will call "exit 1".
162 yes_no() { 168 yes_no() {
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 sed -e 's/[.]so[.][0-9].*/.so/' | 501 sed -e 's/[.]so[.][0-9].*/.so/' |
496 sort -u); do 502 sort -u); do
497 [ "x${i##*/}" = "xld-linux.so" ] && continue 503 [ "x${i##*/}" = "xld-linux.so" ] && continue
498 [ -r "$i" ] && continue 504 [ -r "$i" ] && continue
499 j="$(ls "$i."* | sed -e 's/.*[.]so[.]\([^.]*\)$/\1/;t;d' | 505 j="$(ls "$i."* | sed -e 's/.*[.]so[.]\([^.]*\)$/\1/;t;d' |
500 sort -n | tail -n 1)" 506 sort -n | tail -n 1)"
501 [ -r "$i.$j" ] || continue 507 [ -r "$i.$j" ] || continue
502 sudo ln -s "${i##*/}.$j" "$i" 508 sudo ln -s "${i##*/}.$j" "$i"
503 done 509 done
504 fi 510 fi
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698