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

Unified 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.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build-v8.gypi ('k') | dependencies » ('j') | dependencies » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build-v8-patch-v8.gyp.py
diff --git a/build-v8-patch-v8.gyp.py b/build-v8-patch-v8.gyp.py
new file mode 100644
index 0000000000000000000000000000000000000000..15469301f34ca8077cd811c9c00f8588180453d9
--- /dev/null
+++ b/build-v8-patch-v8.gyp.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
sergei 2017/09/25 09:27:39 I actually find this approach with manual patching
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+import io
+import os
+
+this_dir_path = os.path.dirname(os.path.realpath(__file__))
+v8_src_path = os.path.join(this_dir_path, "third_party", "v8", "src")
+v8_gyp_path = os.path.join(v8_src_path, "v8.gyp")
+v8_gyp_backup_path = os.path.join(v8_src_path, "v8.gyp_f29d55e61904333f3ccc792021885dfa8dc980e2")
+
+def remove_inspector():
+ # if already patched or prebuilt V8
+ if os.path.exists(v8_gyp_backup_path) or not os.path.exists(v8_gyp_path):
+ return
+ os.rename(v8_gyp_path, v8_gyp_backup_path)
+ with io.open(v8_gyp_backup_path) as src, io.open(v8_gyp_path, "w", newline="\n") as dst:
+ for line in src:
+ if not "inspector" in line:
+ dst.write(line)
+ elif "inspector.gypi" in line:
+ dst.write(line.replace(", 'inspector/inspector.gypi'", ""))
+
+if __name__ == '__main__':
+ remove_inspector()
« no previous file with comments | « build-v8.gypi ('k') | dependencies » ('j') | dependencies » ('J')

Powered by Google App Engine
This is Rietveld