OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2016 The Chromium Authors. All rights reserved. | 2 # Copyright 2016 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 """ | 6 """ |
7 Replaces GN files in tree with files from here that | 7 Replaces GN files in tree with files from here that |
8 make the build use system libraries. | 8 make the build use system libraries. |
9 """ | 9 """ |
10 | 10 |
11 from __future__ import print_function | 11 from __future__ import print_function |
12 | 12 |
13 import argparse | 13 import argparse |
14 import os | 14 import os |
15 import shutil | 15 import shutil |
16 import sys | 16 import sys |
17 | 17 |
18 | 18 |
19 REPLACEMENTS = { | 19 REPLACEMENTS = { |
| 20 'flac': 'third_party/flac/BUILD.gn', |
| 21 'harfbuzz-ng': 'third_party/harfbuzz-ng/BUILD.gn', |
| 22 'libwebp': 'third_party/libwebp/BUILD.gn', |
20 'libxml': 'third_party/libxml/BUILD.gn', | 23 'libxml': 'third_party/libxml/BUILD.gn', |
21 'zlib': 'third_party/zlib/BUILD.gn', | 24 'zlib': 'third_party/zlib/BUILD.gn', |
22 } | 25 } |
23 | 26 |
24 | 27 |
25 def DoMain(argv): | 28 def DoMain(argv): |
26 my_dirname = os.path.dirname(__file__) | 29 my_dirname = os.path.dirname(__file__) |
27 source_tree_root = os.path.abspath( | 30 source_tree_root = os.path.abspath( |
28 os.path.join(my_dirname, '..', '..', '..')) | 31 os.path.join(my_dirname, '..', '..', '..')) |
29 | 32 |
(...skipping 27 matching lines...) Expand all Loading... |
57 if unhandled_libraries: | 60 if unhandled_libraries: |
58 print('Unrecognized system libraries requested: %s' % ', '.join( | 61 print('Unrecognized system libraries requested: %s' % ', '.join( |
59 sorted(unhandled_libraries)), file=sys.stderr) | 62 sorted(unhandled_libraries)), file=sys.stderr) |
60 return 1 | 63 return 1 |
61 | 64 |
62 return 0 | 65 return 0 |
63 | 66 |
64 | 67 |
65 if __name__ == '__main__': | 68 if __name__ == '__main__': |
66 sys.exit(DoMain(sys.argv[1:])) | 69 sys.exit(DoMain(sys.argv[1:])) |
OLD | NEW |