| 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 'freetype': 'third_party/freetype/BUILD.gn', |
| 22 'harfbuzz-ng': 'third_party/harfbuzz-ng/BUILD.gn', | 23 'harfbuzz-ng': 'third_party/harfbuzz-ng/BUILD.gn', |
| 23 'icu': 'third_party/icu/BUILD.gn', | 24 'icu': 'third_party/icu/BUILD.gn', |
| 24 'libdrm': 'third_party/libdrm/BUILD.gn', | 25 'libdrm': 'third_party/libdrm/BUILD.gn', |
| 25 'libevent': 'base/third_party/libevent/BUILD.gn', | 26 'libevent': 'base/third_party/libevent/BUILD.gn', |
| 26 'libjpeg': 'build/secondary/third_party/libjpeg_turbo/BUILD.gn', | 27 'libjpeg': 'build/secondary/third_party/libjpeg_turbo/BUILD.gn', |
| 27 'libpng': 'third_party/libpng/BUILD.gn', | 28 'libpng': 'third_party/libpng/BUILD.gn', |
| 28 'libvpx': 'third_party/libvpx/BUILD.gn', | 29 'libvpx': 'third_party/libvpx/BUILD.gn', |
| 29 'libwebp': 'third_party/libwebp/BUILD.gn', | 30 'libwebp': 'third_party/libwebp/BUILD.gn', |
| 30 'libxml': 'third_party/libxml/BUILD.gn', | 31 'libxml': 'third_party/libxml/BUILD.gn', |
| 31 'libxslt': 'third_party/libxslt/BUILD.gn', | 32 'libxslt': 'third_party/libxslt/BUILD.gn', |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 if unhandled_libraries: | 73 if unhandled_libraries: |
| 73 print('Unrecognized system libraries requested: %s' % ', '.join( | 74 print('Unrecognized system libraries requested: %s' % ', '.join( |
| 74 sorted(unhandled_libraries)), file=sys.stderr) | 75 sorted(unhandled_libraries)), file=sys.stderr) |
| 75 return 1 | 76 return 1 |
| 76 | 77 |
| 77 return 0 | 78 return 0 |
| 78 | 79 |
| 79 | 80 |
| 80 if __name__ == '__main__': | 81 if __name__ == '__main__': |
| 81 sys.exit(DoMain(sys.argv[1:])) | 82 sys.exit(DoMain(sys.argv[1:])) |
| OLD | NEW |