1# This file is used to manage the dependencies of the Open Screen repo. It is
2# used by gclient to determine what version of each dependency to check out.
3#
4# For more information, please refer to the official documentation:
5#   https://sites.google.com/a/chromium.org/dev/developers/how-tos/get-the-code
6#
7# When adding a new dependency, please update the top-level .gitignore file
8# to list the dependency's destination directory.
9
10use_relative_paths = True
11
12vars = {
13  'boringssl_git': 'https://boringssl.googlesource.com',
14  'chromium_git': 'https://chromium.googlesource.com',
15
16  # NOTE: we should only reference GitHub directly for dependencies toggled
17  # with the "not build_with_chromium" condition.
18  'github': 'https://github.com',
19
20  # NOTE: Strangely enough, this will be overridden by any _parent_ DEPS, so
21  # in Chromium it will correctly be True.
22  'build_with_chromium': False,
23
24  'checkout_chromium_quic_boringssl': False,
25
26  # Needed to download additional clang binaries for processing coverage data
27  # (from binaries with GN arg `use_coverage=true`).
28  #
29  # TODO(issuetracker.google.com/155195126): Change this to False and update
30  # buildbot to call tools/download-clang-update-script.py instead.
31  'checkout_clang_coverage_tools': True,
32}
33
34deps = {
35  # NOTE: This commit hash here references a repository/branch that is a mirror
36  # of the commits to the buildtools directory in the Chromium repository. This
37  # should be regularly updated with the tip of the MIRRORED master branch,
38  # found here:
39  # https://chromium.googlesource.com/chromium/src/buildtools/+/refs/heads/master.
40  'buildtools': {
41    'url': Var('chromium_git')+ '/chromium/src/buildtools' +
42      '@' + '6302c1175607a436e18947a5abe9df2209e845fc',
43    'condition': 'not build_with_chromium',
44  },
45
46  'third_party/protobuf/src': {
47    'url': Var('chromium_git') +
48      '/external/github.com/protocolbuffers/protobuf.git' +
49      '@' + '2514f0bd7da7e2af1bed4c5d1b84f031c4d12c10', # version 3.14
50    'condition': 'not build_with_chromium',
51  },
52
53  'third_party/libprotobuf-mutator/src': {
54    'url': Var('chromium_git') +
55      '/external/github.com/google/libprotobuf-mutator.git' +
56      '@' + 'e5869dd9690c3f4dfb842fb90bd07a5a9ee32172',
57    'condition': 'not build_with_chromium',
58  },
59
60  'third_party/zlib/src': {
61    'url': Var('github') +
62      '/madler/zlib.git' +
63      '@' + 'cacf7f1d4e3d44d871b605da3b647f07d718623f', # version 1.2.11
64    'condition': 'not build_with_chromium',
65  },
66
67  'third_party/jsoncpp/src': {
68    'url': Var('chromium_git') +
69      '/external/github.com/open-source-parsers/jsoncpp.git' +
70      '@' + '9059f5cad030ba11d37818847443a53918c327b1', # version 1.9.4
71    'condition': 'not build_with_chromium',
72  },
73
74  'third_party/googletest/src': {
75    'url': Var('chromium_git') +
76      '/external/github.com/google/googletest.git' +
77      '@' + '36d8eb532022d3b543bf55aa8ffa01b6e9f03490',
78    'condition': 'not build_with_chromium',
79  },
80
81  'third_party/mDNSResponder/src': {
82    # NOTE: this fork of mDNSResponder is ancient (9 years old), but since
83    # we are moving away from mDNSResponder we will not be updating this.
84    'url': Var('github') + '/jevinskie/mDNSResponder.git' +
85      '@' + '2942dde61f920fbbf96ff9a3840567ebbe7cb1b6',
86    'condition': 'not build_with_chromium',
87  },
88
89  # Note about updating BoringSSL: after changing this hash, run the update
90  # script in BoringSSL's util folder for generating build files from the
91  # <openscreen src-dir>/third_party/boringssl directory:
92  # python ./src/util/generate_build_files.py gn
93  'third_party/boringssl/src': {
94    'url' : Var('boringssl_git') + '/boringssl.git' +
95      '@' + 'f6bd54efbcafcf4625ce99b5f702dc4850b0ca50',
96    'condition': 'not build_with_chromium',
97  },
98
99  'third_party/chromium_quic/src': {
100    'url': Var('chromium_git') + '/openscreen/quic.git' +
101      '@' + '444faf6e3ae0dcade48438144f7e8ea2f8b3436d',
102    'condition': 'not build_with_chromium',
103  },
104
105  'third_party/tinycbor/src':
106    Var('chromium_git') + '/external/github.com/intel/tinycbor.git' +
107    '@' + 'fc42a049853b802e45f49588f8148fc29d7b4d9c',
108
109  # Abseil recommends living at head.  Chromium takes an Abseil snapshot
110  # irregularly, every 1-2 months. It's OK for us to come out slightly ahead
111  # of Chrome's copy here.
112  'third_party/abseil/src': {
113    'url': Var('chromium_git') +
114      '/external/github.com/abseil/abseil-cpp.git' + '@' +
115      'e19260fd7dbef881492fd73891e0be5bd4a09b95',
116    'condition': 'not build_with_chromium',
117  },
118
119  'third_party/libfuzzer/src': {
120    'url': Var('chromium_git') +
121      '/chromium/llvm-project/compiler-rt/lib/fuzzer.git' +
122      '@' + 'debe7d2d1982e540fbd6bd78604bf001753f9e74',
123    'condition': 'not build_with_chromium',
124  },
125
126  'third_party/modp_b64': {
127    'url': Var('chromium_git') + '/chromium/src/third_party/modp_b64'
128    '@' + '85754265d3847383704d19232e1ab873547cda9d',
129    'condition': 'not build_with_chromium',
130  },
131
132  'third_party/valijson/src': {
133    'url': Var('github') + '/tristanpenman/valijson.git' +
134      '@' + 'cf648930313655b19dc07ebae2f9c3fc37966a33', # Tip-of-tree
135    'condition': 'not build_with_chromium'
136  }
137}
138
139hooks = [
140  {
141    'name': 'clang_update_script',
142    'pattern': '.',
143    'condition': 'not build_with_chromium',
144    'action': [ 'python', 'tools/download-clang-update-script.py',
145                '--output', 'tools/clang/scripts/update.py' ],
146    # NOTE: This file appears in .gitignore, as it is not a part of the
147    # openscreen repo.
148  },
149 {
150    'name': 'yajsv_update_script',
151    'pattern': '.',
152    'condition': 'not build_with_chromium',
153    'action': [ 'python', 'tools/download-yajsv.py' ],
154  },
155  {
156    'name': 'update_clang',
157    'pattern': '.',
158    'condition': 'not build_with_chromium',
159    'action': [ 'python', 'tools/clang/scripts/update.py' ],
160  },
161  {
162    'name': 'clang_coverage_tools',
163    'pattern': '.',
164    'condition': 'not build_with_chromium and checkout_clang_coverage_tools',
165    'action': ['python', 'tools/clang/scripts/update.py',
166               '--package=coverage_tools'],
167  },
168  {
169    'name': 'clang_format_linux64',
170    'pattern': '.',
171    'action': [ 'download_from_google_storage.py', '--no_resume', '--no_auth',
172                '--bucket', 'chromium-clang-format',
173                '-s', 'buildtools/linux64/clang-format.sha1' ],
174    'condition': 'host_os == "linux" and not build_with_chromium',
175  },
176  {
177    'name': 'clang_format_mac',
178    'pattern': '.',
179    'action': [ 'download_from_google_storage.py', '--no_resume', '--no_auth',
180                '--bucket', 'chromium-clang-format',
181                '-s', 'buildtools/mac/clang-format.sha1' ],
182    'condition': 'host_os == "mac" and not build_with_chromium',
183  },
184]
185
186recursedeps = [
187  'third_party/chromium_quic/src',
188  'cast',
189  'buildtools',
190]
191
192include_rules = [
193  '+util',
194  '+platform/api',
195  '+platform/base',
196  '+platform/test',
197  '+testing/util',
198  '+third_party',
199
200  # Don't include abseil from the root so the path can change via include_dirs
201  # rules when in Chromium.
202  '-third_party/abseil',
203
204  # Abseil allowed headers.
205  '+absl/algorithm/container.h',
206  '+absl/base/thread_annotations.h',
207  '+absl/hash/hash.h',
208  '+absl/hash/hash_testing.h',
209  '+absl/strings/ascii.h',
210  '+absl/strings/match.h',
211  '+absl/strings/numbers.h',
212  '+absl/strings/str_cat.h',
213  '+absl/strings/str_join.h',
214  '+absl/strings/str_replace.h',
215  '+absl/strings/str_split.h',
216  '+absl/strings/string_view.h',
217  '+absl/strings/substitute.h',
218  '+absl/types/optional.h',
219  '+absl/types/span.h',
220  '+absl/types/variant.h',
221
222  # Similar to abseil, don't include boringssl using root path.  Instead,
223  # explicitly allow 'openssl' where needed.
224  '-third_party/boringssl',
225
226  # Test framework includes.
227  "-third_party/googletest",
228  "+gtest",
229  "+gmock",
230]
231
232skip_child_includes = [
233  'third_party/chromium_quic',
234]
235