summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorscottbyer@chromium.org <scottbyer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-08 17:51:33 +0000
committerscottbyer@chromium.org <scottbyer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-08 17:51:33 +0000
commit34799f9d2314ea8ae20ab4e9ad805da8f82b327f (patch)
tree6a9d0a18f8fdc08acf43e0374e96c3edba2e45ed /build
parent63597e4ebc117bb561b93f4d775d787120e6728a (diff)
downloadchromium_src-34799f9d2314ea8ae20ab4e9ad805da8f82b327f.zip
chromium_src-34799f9d2314ea8ae20ab4e9ad805da8f82b327f.tar.gz
chromium_src-34799f9d2314ea8ae20ab4e9ad805da8f82b327f.tar.bz2
install-build-deps.sh fixes for Lucid and Chromium OS.
Add in two extra libraries needed for building Chromium-for-Chromium OS on a fresh install Ubuntu Lucid 64-bit. Also, start checking for header differences between the 32-bit and 64-bit packages, adding those headers into the 32-bit cons'ed up package install (on Lucid Lynx, the current libcurl4-gnutls-dev package needs this). Clean up any leftover symbolic links that point nowhere. Also take any declared package conflicts and remove them from the Provides line to allow the cons'ed up package to always install (the package derived from libcurl4-gnutls-dev). BUG=none TEST=none Review URL: http://codereview.chromium.org/2865032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51863 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r--build/common.gypi10
-rwxr-xr-xbuild/install-build-deps.sh69
2 files changed, 61 insertions, 18 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 6a95c4f..8a8d1fb 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -1007,6 +1007,16 @@
'-msse2',
],
}],
+ # Install packages have started cropping up with
+ # different headers between the 32-bit and 64-bit
+ # versions, so we have to shadow those differences off
+ # and make sure a 32-bit-on-64-bit build picks up the
+ # right files.
+ ['host_arch!="ia32"', {
+ 'include_dirs+': [
+ '/usr/include32',
+ ],
+ }],
],
# -mmmx allows mmintrin.h to be used for mmx intrinsics.
# video playback is mmx and sse2 optimized.
diff --git a/build/install-build-deps.sh b/build/install-build-deps.sh
index f5ac8387..7e781cb 100755
--- a/build/install-build-deps.sh
+++ b/build/install-build-deps.sh
@@ -108,7 +108,7 @@ dev_list="apache2 bison fakeroot flex g++ gperf libapache2-mod-php5
ttf-kochi-mincho wdiff libcurl4-gnutls-dev $chromeos_dev_list"
# Run-time libraries required by chromeos only
-chromeos_lib_list="libpulse0"
+chromeos_lib_list="libpulse0 libbz2-1.0 libcurl4-gnutls-dev"
# Full list of required run-time libraries
lib_list="libatk1.0-0 libc6 libasound2 libcairo2 libdbus-glib-1-2 libexpat1
@@ -340,19 +340,44 @@ EOF
tar zCfx dpkg data.tar.gz
tar zCfx dpkg/DEBIAN control.tar.gz
- # Rename package, change architecture, remove dependencies
- sed -i -e "s/\(Package:.*\)/\1-ia32/" \
- -e "s/\(Architecture:\).*/\1 amd64/" \
- -e "s/\(Depends:\).*/\1 ia32-libs/" \
- -e "/Recommends/d" \
- -e "/Conflicts/d" \
- dpkg/DEBIAN/control
-
- # Only keep files that live in "lib" directories
- sed -i -e "/\/lib64\//d" -e "/\/.?bin\//d" \
- -e "s,\([ /]lib\)/,\132/g,;t1;d;:1" \
- -e "s,^/usr/lib32/debug\(.*/lib32\),/usr/lib/debug\1," \
- dpkg/DEBIAN/md5sums
+ # Create a posix extended regular expression fragment that will
+ # recognize the includes which have changed. Should be rare,
+ # will almost always be empty.
+ includes=`sed -n -e "s/^[0-9a-z]* //g" \
+ -e "\,usr/include/,p" dpkg/DEBIAN/md5sums |
+ xargs -n 1 -I FILE /bin/sh -c \
+ "cmp -s dpkg/FILE /FILE || echo FILE" |
+ tr "\n" "|" |
+ sed -e "s,|$,,"`
+
+ # If empty, set it to not match anything.
+ test -z "$includes" && includes="^//"
+
+ # Turn the conflicts into an extended RE for removal from the
+ # Provides line.
+ conflicts=`sed -n -e "/Conflicts/s/Conflicts: *//;T;s/, */|/g;p" \
+ dpkg/DEBIAN/control`
+
+ # Rename package, change architecture, remove conflicts and dependencies
+ sed -r -i \
+ -e "/Package/s/$/-ia32/" \
+ -e "/Architecture/s/:.*$/: amd64/" \
+ -e "/Depends/s/:.*/: ia32-libs/" \
+ -e "/Provides/s/($conflicts)(, *)?//g;T1;s/, *$//;:1" \
+ -e "/Recommends/d" \
+ -e "/Conflicts/d" \
+ dpkg/DEBIAN/control
+
+ # Only keep files that live in "lib" directories or the includes
+ # that have changed.
+ sed -r -i \
+ -e "/\/lib64\//d" -e "/\/.?bin\//d" \
+ -e "\,$includes,s,[ /]include/,&32/,g;s,include/32/,include32/,g" \
+ -e "s, lib/, lib32/,g" \
+ -e "s,/lib/,/lib32/,g" \
+ -e "t;d" \
+ -e "\,^/usr/lib32/debug\(.*/lib32\),s,^/usr/lib32/debug,/usr/lib/debug," \
+ dpkg/DEBIAN/md5sums
# Re-run ldconfig after installation/removal
{ echo "#!/bin/sh"; echo "[ \"x\$1\" = xconfigure ]&&ldconfig||:"; } \
@@ -366,13 +391,18 @@ EOF
-name postinst -o -name postrm ")" -o -print |
xargs -r rm -rf
- # Remove any files/dirs that live outside of "lib" directories
- find dpkg -mindepth 1 "(" -name DEBIAN -o -name lib ")" -prune -o \
- -print | tac | xargs -r -n 1 sh -c \
- "rm \$0 2>/dev/null || rmdir \$0 2>/dev/null || : "
+ # Remove any files/dirs that live outside of "lib" directories,
+ # or are not in our list of changed includes.
+ find dpkg -mindepth 1 -regextype posix-extended \
+ "(" -name DEBIAN -o -name lib -o -regex "dpkg/($includes)" ")" \
+ -prune -o -print | tac |
+ xargs -r -n 1 sh -c "rm \$0 2>/dev/null || rmdir \$0 2>/dev/null || : "
find dpkg -name lib64 -o -name bin -o -name "?bin" |
tac | xargs -r rm -rf
+ # Remove any symbolic links that were broken by the above steps.
+ find -L dpkg -type l -print | tac | xargs -r rm -rf
+
# Rename lib to lib32, but keep debug symbols in /usr/lib/debug/usr/lib32
# That is where gdb looks for them.
find dpkg -type d -o -path "*/lib/*" -print |
@@ -383,6 +413,9 @@ EOF
mkdir -p \"\${i%/*}\";
mv \"\${0}\" \"\${i}\""
+ # Rename include to include32.
+ [ -d "dpkg/usr/include" ] && mv "dpkg/usr/include" "dpkg/usr/include32"
+
# Prune any empty directories
find dpkg -type d | tac | xargs -r -n 1 rmdir 2>/dev/null || :