| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import os | 6 import os |
| 7 import utils | 7 import utils |
| 8 | 8 |
| 9 def patch(): | 9 def patch(): |
| 10 os.chdir(utils.mojo_root_dir) | 10 os.chdir(utils.mojo_root_dir) |
| 11 | 11 |
| 12 utils.filter_file("build/landmines.py", | 12 utils.filter_file("build/landmines.py", |
| 13 lambda line: not "gyp_environment" in line) | 13 lambda line: not "gyp_environment" in line) |
| 14 utils.commit("filter gyp_environment out of build/landmines.py") | 14 utils.commit("filter gyp_environment out of build/landmines.py") |
| 15 | 15 |
| 16 utils.filter_file("gpu/BUILD.gn", lambda line: not "//gpu/ipc" in line) | 16 utils.filter_file("gpu/BUILD.gn", lambda line: not "//gpu/ipc" in line) |
| 17 utils.commit("filter gpu/ipc out of gpu/BUILD.gn") | 17 utils.commit("filter //gpu/ipc out of gpu/BUILD.gn") |
| 18 |
| 19 utils.filter_file("cc/BUILD.gn", lambda line: not "//media" in line) |
| 20 utils.commit("filter //media out of cc/BUILD.gn") |
| 18 | 21 |
| 19 for p in utils.find(["*.patch"], os.path.dirname(os.path.realpath(__file__))): | 22 for p in utils.find(["*.patch"], os.path.dirname(os.path.realpath(__file__))): |
| 20 print "applying patch %s" % os.path.basename(p) | 23 print "applying patch %s" % os.path.basename(p) |
| 21 utils.system(["git", "apply", p]) | 24 utils.system(["git", "apply", p]) |
| 22 utils.commit("applied patch %s" % os.path.basename(p)) | 25 utils.commit("applied patch %s" % os.path.basename(p)) |
| OLD | NEW |