Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: build-v8-patch-v8.gyp.py

Issue 29555620: Issue 5698 - Update V8 to 6.1.534.41 (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created Sept. 25, 2017, 7:46 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build-v8.gypi ('k') | dependencies » ('j') | dependencies » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
sergei 2017/09/25 09:27:39 I actually find this approach with manual patching
2
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7 import io
8 import os
9
10 this_dir_path = os.path.dirname(os.path.realpath(__file__))
11 v8_src_path = os.path.join(this_dir_path, "third_party", "v8", "src")
12 v8_gyp_path = os.path.join(v8_src_path, "v8.gyp")
13 v8_gyp_backup_path = os.path.join(v8_src_path, "v8.gyp_f29d55e61904333f3ccc79202 1885dfa8dc980e2")
14
15 def remove_inspector():
16 # if already patched or prebuilt V8
17 if os.path.exists(v8_gyp_backup_path) or not os.path.exists(v8_gyp_path):
18 return
19 os.rename(v8_gyp_path, v8_gyp_backup_path)
20 with io.open(v8_gyp_backup_path) as src, io.open(v8_gyp_path, "w", newline=" \n") as dst:
21 for line in src:
22 if not "inspector" in line:
23 dst.write(line)
24 elif "inspector.gypi" in line:
25 dst.write(line.replace(", 'inspector/inspector.gypi'", ""))
26
27 if __name__ == '__main__':
28 remove_inspector()
OLDNEW
« no previous file with comments | « build-v8.gypi ('k') | dependencies » ('j') | dependencies » ('J')

Powered by Google App Engine
This is Rietveld