Refer to Chrome's DEPS to make rolling easier.

- Sync Chrome's DEPS to chromium_deps/, and use the From() keyword
  to pull the correct revisions from it, rather than having to manually
  enter them.
- This idea is borrowed from the WebKit DEPS:
http://trac.webkit.org/browser/trunk/Source/WebKit/chromium/DEPS
- Fix update.py's DEPS parsing to handle From().
- Roll Chrome 120526:122775.
- Organize the deps alphabetically.
- Sync the in-tree gold linker, which is now required due to a change
  in the linker flags.
- Add the new deps to .gitignore.

BUG=
TEST=build on all platforms

Review URL: https://webrtc-codereview.appspot.com/401004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1755 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andrew@webrtc.org 2012-02-23 21:32:37 +00:00
parent 946601e408
commit 6241beefa2
3 changed files with 76 additions and 68 deletions

2
.gitignore vendored
View File

@ -30,6 +30,7 @@
.pydevproject
.settings
/build
/chromium_deps
/gyp-mac-tool
/Makefile
/out
@ -40,6 +41,7 @@
/third_party/cygwin
/third_party/expat
/third_party/gaeunit
/third_party/gold
/third_party/google-gflags/src
/third_party/google-visualization-python
/third_party/jsoncpp

123
DEPS
View File

@ -3,7 +3,7 @@ vars = {
# If you do not know, use the full path while defining your new deps entry.
"googlecode_url": "http://%s.googlecode.com/svn",
"chromium_trunk" : "http://src.chromium.org/svn/trunk",
"chromium_revision": "120526",
"chromium_revision": "122775",
# External resources like video and audio files used for testing purposes.
# Downloaded on demand when needed.
@ -13,27 +13,65 @@ vars = {
# NOTE: Prefer revision numbers to tags for svn deps. Use http rather than
# https; the latter can cause problems for users behind proxies.
deps = {
"trunk/chromium_deps":
File(Var("chromium_trunk") + "/src/DEPS@" + Var("chromium_revision")),
"trunk/build":
Var("chromium_trunk") + "/src/build@" + Var("chromium_revision"),
"trunk/testing":
Var("chromium_trunk") + "/src/testing@" + Var("chromium_revision"),
"trunk/testing/gtest":
(Var("googlecode_url") % "googletest") + "/trunk@573",
"trunk/testing/gmock":
(Var("googlecode_url") % "googlemock") + "/trunk@386",
From("trunk/chromium_deps", "src/testing/gmock"),
"trunk/testing/gtest":
From("trunk/chromium_deps", "src/testing/gtest"),
"trunk/third_party/expat":
Var("chromium_trunk") + "/src/third_party/expat@" + Var("chromium_revision"),
# Used by tools/quality_tracking.
"trunk/third_party/gaeunit":
"http://code.google.com/p/gaeunit.git@e16d5bd4",
"trunk/third_party/google-gflags/src":
(Var("googlecode_url") % "google-gflags") + "/trunk/src@45",
# Used by tools/quality_tracking/dashboard and tools/python_charts.
"trunk/third_party/google-visualization-python":
(Var("googlecode_url") % "google-visualization-python") + "/trunk@15",
"trunk/third_party/libjpeg":
Var("chromium_trunk") + "/src/third_party/libjpeg@" + Var("chromium_revision"),
"trunk/third_party/libjpeg_turbo":
From("trunk/chromium_deps", "src/third_party/libjpeg_turbo"),
"trunk/third_party/libvpx/source/libvpx":
"http://git.chromium.org/webm/libvpx.git@v1.0.0",
"trunk/third_party/libyuv":
(Var("googlecode_url") % "libyuv") + "/trunk@182",
"trunk/third_party/protobuf":
Var("chromium_trunk") + "/src/third_party/protobuf@" + Var("chromium_revision"),
# Used by tools/quality_tracking.
"trunk/third_party/oauth2":
"http://github.com/simplegeo/python-oauth2.git@a83f4a29",
"trunk/third_party/yasm":
Var("chromium_trunk") + "/src/third_party/yasm@" + Var("chromium_revision"),
"trunk/third_party/yasm/source/patched-yasm":
From("trunk/chromium_deps", "src/third_party/yasm/source/patched-yasm"),
"trunk/tools/clang":
Var("chromium_trunk") + "/src/tools/clang@" + Var("chromium_revision"),
"trunk/tools/gyp":
(Var("googlecode_url") % "gyp") + "/trunk@1187",
# Needed by build/common.gypi.
"trunk/tools/win/supalink":
Var("chromium_trunk") + "/src/tools/win/supalink@" + Var("chromium_revision"),
"trunk/tools/clang/scripts":
Var("chromium_trunk") + "/src/tools/clang/scripts@" + Var("chromium_revision"),
From("trunk/chromium_deps", "src/tools/gyp"),
"trunk/tools/python":
Var("chromium_trunk") + "/src/tools/python@" + Var("chromium_revision"),
@ -41,57 +79,24 @@ deps = {
"trunk/tools/valgrind":
Var("chromium_trunk") + "/src/tools/valgrind@" + Var("chromium_revision"),
"trunk/third_party/protobuf/":
Var("chromium_trunk") + "/src/third_party/protobuf@" + Var("chromium_revision"),
"trunk/third_party/libvpx/source/libvpx":
"http://git.chromium.org/webm/libvpx.git@v1.0.0",
"trunk/third_party/libjpeg_turbo/":
Var("chromium_trunk") + "/deps/third_party/libjpeg_turbo@119959",
"trunk/third_party/libjpeg/":
Var("chromium_trunk") + "/src/third_party/libjpeg@" + Var("chromium_revision"),
"trunk/third_party/yasm/":
Var("chromium_trunk") + "/src/third_party/yasm@" + Var("chromium_revision"),
"trunk/third_party/expat/":
Var("chromium_trunk") + "/src/third_party/expat@" + Var("chromium_revision"),
"trunk/third_party/google-gflags/src":
(Var("googlecode_url") % "google-gflags") + "/trunk/src@45",
"trunk/third_party/yasm/source/patched-yasm":
Var("chromium_trunk") + "/deps/third_party/yasm/patched-yasm@73761",
# Used by libjpeg-turbo
"trunk/third_party/yasm/binaries":
Var("chromium_trunk") + "/deps/third_party/yasm/binaries@74228",
# TODO(andrew): roll to 164 after fixing:
# http://code.google.com/p/webrtc/issues/detail?id=267
"trunk/third_party/libyuv":
(Var("googlecode_url") % "libyuv") + "/trunk@182",
# Used by tools/quality_tracking/dashboard and tools/python_charts
"trunk/third_party/google-visualization-python":
(Var("googlecode_url") % "google-visualization-python") + "/trunk@15",
# Used by tools/quality_tracking
"trunk/third_party/oauth2":
"http://github.com/simplegeo/python-oauth2.git@a83f4a29",
# Used by tools/quality_tracking
"trunk/third_party/gaeunit":
"http://code.google.com/p/gaeunit.git@e16d5bd4",
# Needed by build/common.gypi.
"trunk/tools/win/supalink":
Var("chromium_trunk") + "/src/tools/win/supalink@" + Var("chromium_revision"),
}
deps_os = {
"win": {
"trunk/third_party/cygwin/":
"trunk/third_party/cygwin":
Var("chromium_trunk") + "/deps/third_party/cygwin@66844",
}
# Used by libjpeg-turbo.
"trunk/third_party/yasm/binaries":
From("trunk/chromium_deps", "src/third_party/yasm/binaries"),
},
"unix": {
"trunk/third_party/gold":
From("trunk/chromium_deps", "src/third_party/gold"),
},
}
hooks = [

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python
# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
@ -39,18 +39,18 @@ def main():
extension = '.tgz'
# Variables used by the script.
project_root_dir = os.path.normpath(sys.path[0] + '/../../')
project_root_dir = os.path.normpath(sys.path[0] + '/../../')
deps_file = os.path.join(project_root_dir, 'DEPS')
downloads_dir = os.path.join(project_root_dir, 'resources')
current_version_file = os.path.join(downloads_dir, version_filename)
# Ensure the downloads dir is created.
if not os.path.isdir(downloads_dir):
os.mkdir(downloads_dir)
# Define and parse arguments.
parser = OptionParser()
parser.add_option('-f', '--force', action='store_true', dest='force',
parser.add_option('-f', '--force', action='store_true', dest='force',
help='forces download and removes all existing resources.')
(options, unused_args) = parser.parse_args()
@ -66,13 +66,13 @@ def main():
deps_vars = EvalDepsFile(deps_file)['vars']
latest_version = int(deps_vars[deps_key])
print 'Version in DEPS file: %d' % latest_version
# Download archive if forced or DEPS version is different than our current.
if latest_version != current_version or options.force:
temp_dir = tempfile.mkdtemp(prefix='webrtc-resources-')
archive_name = '%s%s%s' % (filename_prefix, latest_version, extension)
remote_archive_url = urljoin(remote_url_base, archive_name)
# Download into the temporary directory with display of progress, inspired
# Download into the temporary directory with display of progress, inspired
# by the Stack Overflow post at http://goo.gl/JIrbo
temp_file = os.path.join(temp_dir, archive_name)
print 'Downloading: %s' % remote_archive_url
@ -108,7 +108,7 @@ def main():
f = open(new_version_file, 'w')
f.write('%d' % latest_version)
f.close()
# Extract the archive.
archive = tarfile.open(temp_file, 'r:gz')
archive.extractall(downloads_dir)
@ -121,8 +121,9 @@ def main():
def EvalDepsFile(path):
scope = {'Var': lambda name: scope['vars'][name],
'File': lambda name: name}
scope = {'Var': lambda name: scope['vars'][name],
'File': lambda name: name,
'From': lambda deps, definition: deps}
execfile(path, {}, scope)
return scope