| 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 'ffmpeg': 'third_party/ffmpeg/BUILD.gn', | 20 'ffmpeg': 'third_party/ffmpeg/BUILD.gn', |
| 21 'flac': 'third_party/flac/BUILD.gn', | 21 'flac': 'third_party/flac/BUILD.gn', |
| 22 'harfbuzz-ng': 'third_party/harfbuzz-ng/BUILD.gn', | 22 'harfbuzz-ng': 'third_party/harfbuzz-ng/BUILD.gn', |
| 23 'libevent': 'base/third_party/libevent/BUILD.gn', | 23 'libevent': 'base/third_party/libevent/BUILD.gn', |
| 24 'libpng': 'third_party/libpng/BUILD.gn', |
| 25 'libvpx': 'third_party/libvpx/BUILD.gn', |
| 24 'libwebp': 'third_party/libwebp/BUILD.gn', | 26 'libwebp': 'third_party/libwebp/BUILD.gn', |
| 25 'libxml': 'third_party/libxml/BUILD.gn', | 27 'libxml': 'third_party/libxml/BUILD.gn', |
| 26 'libxslt': 'third_party/libxslt/BUILD.gn', | 28 'libxslt': 'third_party/libxslt/BUILD.gn', |
| 29 're2': 'third_party/re2/BUILD.gn', |
| 27 'snappy': 'third_party/snappy/BUILD.gn', | 30 'snappy': 'third_party/snappy/BUILD.gn', |
| 28 'yasm': 'third_party/yasm/yasm_assemble.gni', | 31 'yasm': 'third_party/yasm/yasm_assemble.gni', |
| 29 'zlib': 'third_party/zlib/BUILD.gn', | 32 'zlib': 'third_party/zlib/BUILD.gn', |
| 30 } | 33 } |
| 31 | 34 |
| 32 | 35 |
| 33 def DoMain(argv): | 36 def DoMain(argv): |
| 34 my_dirname = os.path.dirname(__file__) | 37 my_dirname = os.path.dirname(__file__) |
| 35 source_tree_root = os.path.abspath( | 38 source_tree_root = os.path.abspath( |
| 36 os.path.join(my_dirname, '..', '..', '..')) | 39 os.path.join(my_dirname, '..', '..', '..')) |
| (...skipping 28 matching lines...) Expand all Loading... |
| 65 if unhandled_libraries: | 68 if unhandled_libraries: |
| 66 print('Unrecognized system libraries requested: %s' % ', '.join( | 69 print('Unrecognized system libraries requested: %s' % ', '.join( |
| 67 sorted(unhandled_libraries)), file=sys.stderr) | 70 sorted(unhandled_libraries)), file=sys.stderr) |
| 68 return 1 | 71 return 1 |
| 69 | 72 |
| 70 return 0 | 73 return 0 |
| 71 | 74 |
| 72 | 75 |
| 73 if __name__ == '__main__': | 76 if __name__ == '__main__': |
| 74 sys.exit(DoMain(sys.argv[1:])) | 77 sys.exit(DoMain(sys.argv[1:])) |
| OLD | NEW |