OLD | NEW |
| (Empty) |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 import json | |
6 import sys | |
7 | |
8 import recipe_util # pylint: disable=F0401 | |
9 | |
10 | |
11 # This class doesn't need an __init__ method, so we disable the warning | |
12 # pylint: disable=W0232 | |
13 class Blink(recipe_util.Recipe): | |
14 """Basic Recipe alias for Blink -> Chromium.""" | |
15 | |
16 @staticmethod | |
17 def fetch_spec(props): | |
18 chromium_url = 'https://chromium.googlesource.com/chromium/src.git' | |
19 chromium_solution = {'name': 'src', | |
20 'url': chromium_url, | |
21 'deps_file': 'DEPS', | |
22 'managed': False, | |
23 'custom_deps': { | |
24 'src/third_party/WebKit': None, | |
25 }, | |
26 } | |
27 blink_url = 'https://chromium.googlesource.com/chromium/blink.git' | |
28 blink_solution = {'name': 'src/third_party/WebKit', | |
29 'url': blink_url, | |
30 'deps_file': '.DEPS.git', | |
31 'managed': False, | |
32 'custom_deps': {}, | |
33 } | |
34 spec = { | |
35 'solutions': [chromium_solution, blink_solution], | |
36 'auto': True, | |
37 } | |
38 if props.get('target_os'): | |
39 spec['target_os'] = props['target_os'].split(',') | |
40 if props.get('target_os_only'): | |
41 spec['target_os_only'] = props['target_os_only'] | |
42 toolchain_hook = [sys.executable, 'src/build/confirm_toolchain.py'] | |
43 spec['fetch_hooks'] = [toolchain_hook] | |
44 return { | |
45 'type': 'gclient_git_svn', | |
46 'gclient_git_svn_spec': spec, | |
47 } | |
48 | |
49 @staticmethod | |
50 def expected_root(_props): | |
51 return 'src/third_party/WebKit' | |
52 | |
53 | |
54 def main(argv=None): | |
55 return Blink().handle_args(argv) | |
56 | |
57 | |
58 if __name__ == '__main__': | |
59 sys.exit(main(sys.argv)) | |
OLD | NEW |