Chromium Code Reviews| Index: third_party/harfbuzz-ng/harfbuzz.gyp |
| diff --git a/third_party/harfbuzz-ng/harfbuzz.gyp b/third_party/harfbuzz-ng/harfbuzz.gyp |
| index 6416a0c973eb5b389a2de00cf9156f22d513fb53..a782383512f42851eb567a85fa2a76ffe3bfecad 100644 |
| --- a/third_party/harfbuzz-ng/harfbuzz.gyp |
| +++ b/third_party/harfbuzz-ng/harfbuzz.gyp |
| @@ -6,129 +6,183 @@ |
| 'includes': [ |
| '../../build/win_precompile.gypi', |
| ], |
| - 'targets': [ |
| - { |
| - 'target_name': 'harfbuzz-ng', |
| - 'type': 'static_library', |
| - 'defines': [ |
| - 'HAVE_OT', |
| - 'HAVE_ICU', |
| - 'HB_NO_MT', |
| - ], |
| - 'sources': [ |
| - 'src/hb-atomic-private.hh', |
| - 'src/hb-blob.cc', |
| - 'src/hb-blob.h', |
| - 'src/hb-buffer-deserialize-json.hh', |
| - 'src/hb-buffer-deserialize-text.hh', |
| - 'src/hb-buffer-private.hh', |
| - 'src/hb-buffer-serialize.cc', |
| - 'src/hb-buffer.cc', |
| - 'src/hb-buffer.h', |
| - 'src/hb-cache-private.hh', |
| - 'src/hb-common.cc', |
| - 'src/hb-common.h', |
| - 'src/hb-deprecated.h', |
| - 'src/hb-face-private.hh', |
| - 'src/hb-face.cc', |
| - 'src/hb-face.h', |
| - 'src/hb-fallback-shape.cc', |
| - 'src/hb-font-private.hh', |
| - 'src/hb-font.cc', |
| - 'src/hb-font.h', |
| - 'src/hb-icu.cc', |
| - 'src/hb-icu.h', |
| - 'src/hb-mutex-private.hh', |
| - 'src/hb-object-private.hh', |
| - 'src/hb-open-file-private.hh', |
| - 'src/hb-open-type-private.hh', |
| - 'src/hb-ot-head-table.hh', |
| - 'src/hb-ot-hhea-table.hh', |
| - 'src/hb-ot-hmtx-table.hh', |
| - 'src/hb-ot-layout-common-private.hh', |
| - 'src/hb-ot-layout-gdef-table.hh', |
| - 'src/hb-ot-layout-gpos-table.hh', |
| - 'src/hb-ot-layout-gsub-table.hh', |
| - 'src/hb-ot-layout-gsubgpos-private.hh', |
| - 'src/hb-ot-layout-private.hh', |
| - 'src/hb-ot-layout.cc', |
| - 'src/hb-ot-layout.h', |
| - 'src/hb-ot-map-private.hh', |
| - 'src/hb-ot-map.cc', |
| - 'src/hb-ot-maxp-table.hh', |
| - 'src/hb-ot-name-table.hh', |
| - 'src/hb-ot-shape-complex-arabic-fallback.hh', |
| - 'src/hb-ot-shape-complex-arabic-table.hh', |
| - 'src/hb-ot-shape-complex-arabic.cc', |
| - 'src/hb-ot-shape-complex-default.cc', |
| - 'src/hb-ot-shape-complex-indic-machine.hh', |
| - 'src/hb-ot-shape-complex-indic-private.hh', |
| - 'src/hb-ot-shape-complex-indic-table.cc', |
| - 'src/hb-ot-shape-complex-indic.cc', |
| - 'src/hb-ot-shape-complex-myanmar-machine.hh', |
| - 'src/hb-ot-shape-complex-myanmar.cc', |
| - 'src/hb-ot-shape-complex-private.hh', |
| - 'src/hb-ot-shape-complex-sea-machine.hh', |
| - 'src/hb-ot-shape-complex-sea.cc', |
| - 'src/hb-ot-shape-complex-thai.cc', |
| - 'src/hb-ot-shape-fallback-private.hh', |
| - 'src/hb-ot-shape-fallback.cc', |
| - 'src/hb-ot-shape-normalize-private.hh', |
| - 'src/hb-ot-shape-normalize.cc', |
| - 'src/hb-ot-shape-private.hh', |
| - 'src/hb-ot-shape.cc', |
| - 'src/hb-ot-tag.cc', |
| - 'src/hb-ot-tag.h', |
| - 'src/hb-ot.h', |
| - 'src/hb-private.hh', |
| - 'src/hb-set-private.hh', |
| - 'src/hb-set.cc', |
| - 'src/hb-set.h', |
| - 'src/hb-shape-plan-private.hh', |
| - 'src/hb-shape-plan.cc', |
| - 'src/hb-shape-plan.h', |
| - 'src/hb-shape.cc', |
| - 'src/hb-shape.h', |
| - 'src/hb-shaper-impl-private.hh', |
| - 'src/hb-shaper-list.hh', |
| - 'src/hb-shaper-private.hh', |
| - 'src/hb-shaper.cc', |
| - 'src/hb-tt-font.cc', |
| - 'src/hb-unicode-private.hh', |
| - 'src/hb-unicode.cc', |
| - 'src/hb-unicode.h', |
| - 'src/hb-utf-private.hh', |
| - 'src/hb-version.h', |
| - 'src/hb-warning.cc', |
| - 'src/hb.h', |
| + 'variables': { |
| + 'variables': { |
| + 'conditions': [ |
| + ['sysroot!=""', { |
| + 'pkg-config': '<(chroot_cmd) ../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"', |
| + }, { |
| + 'pkg-config': 'pkg-config' |
| + }], |
| ], |
| - 'include_dirs': [ |
| - 'src', |
| + }, |
| + |
| + 'pkg-config': '<(pkg-config)', |
| + |
| + # Since version 1.32.4, pangoft2 which we depend on pulls in harfbuzz |
| + # anyways. |
| + 'use_system_harfbuzz': '<!(python ../../build/check_return_value.py <(pkg-config) --atleast-version=1.32.4 pangoft2)', |
| + }, |
| + 'conditions': [ |
| + ['use_system_harfbuzz==0', { |
| + 'targets': [ |
| + { |
| + 'target_name': 'harfbuzz-ng', |
| + 'type': 'static_library', |
| + 'defines': [ |
| + 'HAVE_OT', |
| + 'HAVE_ICU', |
| + 'HB_NO_MT', |
| + ], |
| + 'sources': [ |
| + 'src/hb-atomic-private.hh', |
| + 'src/hb-blob.cc', |
| + 'src/hb-blob.h', |
| + 'src/hb-buffer-deserialize-json.hh', |
| + 'src/hb-buffer-deserialize-text.hh', |
| + 'src/hb-buffer-private.hh', |
| + 'src/hb-buffer-serialize.cc', |
| + 'src/hb-buffer.cc', |
| + 'src/hb-buffer.h', |
| + 'src/hb-cache-private.hh', |
| + 'src/hb-common.cc', |
| + 'src/hb-common.h', |
| + 'src/hb-deprecated.h', |
| + 'src/hb-face-private.hh', |
| + 'src/hb-face.cc', |
| + 'src/hb-face.h', |
| + 'src/hb-fallback-shape.cc', |
| + 'src/hb-font-private.hh', |
| + 'src/hb-font.cc', |
| + 'src/hb-font.h', |
| + 'src/hb-icu.cc', |
| + 'src/hb-icu.h', |
| + 'src/hb-mutex-private.hh', |
| + 'src/hb-object-private.hh', |
| + 'src/hb-open-file-private.hh', |
| + 'src/hb-open-type-private.hh', |
| + 'src/hb-ot-head-table.hh', |
| + 'src/hb-ot-hhea-table.hh', |
| + 'src/hb-ot-hmtx-table.hh', |
| + 'src/hb-ot-layout-common-private.hh', |
| + 'src/hb-ot-layout-gdef-table.hh', |
| + 'src/hb-ot-layout-gpos-table.hh', |
| + 'src/hb-ot-layout-gsub-table.hh', |
| + 'src/hb-ot-layout-gsubgpos-private.hh', |
| + 'src/hb-ot-layout-private.hh', |
| + 'src/hb-ot-layout.cc', |
| + 'src/hb-ot-layout.h', |
| + 'src/hb-ot-map-private.hh', |
| + 'src/hb-ot-map.cc', |
| + 'src/hb-ot-maxp-table.hh', |
| + 'src/hb-ot-name-table.hh', |
| + 'src/hb-ot-shape-complex-arabic-fallback.hh', |
| + 'src/hb-ot-shape-complex-arabic-table.hh', |
| + 'src/hb-ot-shape-complex-arabic.cc', |
| + 'src/hb-ot-shape-complex-default.cc', |
| + 'src/hb-ot-shape-complex-indic-machine.hh', |
| + 'src/hb-ot-shape-complex-indic-private.hh', |
| + 'src/hb-ot-shape-complex-indic-table.cc', |
| + 'src/hb-ot-shape-complex-indic.cc', |
| + 'src/hb-ot-shape-complex-myanmar-machine.hh', |
| + 'src/hb-ot-shape-complex-myanmar.cc', |
| + 'src/hb-ot-shape-complex-private.hh', |
| + 'src/hb-ot-shape-complex-sea-machine.hh', |
| + 'src/hb-ot-shape-complex-sea.cc', |
| + 'src/hb-ot-shape-complex-thai.cc', |
| + 'src/hb-ot-shape-fallback-private.hh', |
| + 'src/hb-ot-shape-fallback.cc', |
| + 'src/hb-ot-shape-normalize-private.hh', |
| + 'src/hb-ot-shape-normalize.cc', |
| + 'src/hb-ot-shape-private.hh', |
| + 'src/hb-ot-shape.cc', |
| + 'src/hb-ot-tag.cc', |
| + 'src/hb-ot-tag.h', |
| + 'src/hb-ot.h', |
| + 'src/hb-private.hh', |
| + 'src/hb-set-private.hh', |
| + 'src/hb-set.cc', |
| + 'src/hb-set.h', |
| + 'src/hb-shape-plan-private.hh', |
| + 'src/hb-shape-plan.cc', |
| + 'src/hb-shape-plan.h', |
| + 'src/hb-shape.cc', |
| + 'src/hb-shape.h', |
| + 'src/hb-shaper-impl-private.hh', |
| + 'src/hb-shaper-list.hh', |
| + 'src/hb-shaper-private.hh', |
| + 'src/hb-shaper.cc', |
| + 'src/hb-tt-font.cc', |
| + 'src/hb-unicode-private.hh', |
| + 'src/hb-unicode.cc', |
| + 'src/hb-unicode.h', |
| + 'src/hb-utf-private.hh', |
| + 'src/hb-version.h', |
| + 'src/hb-warning.cc', |
| + 'src/hb.h', |
| + ], |
| + 'include_dirs': [ |
| + 'src', |
| + ], |
| + 'direct_dependent_settings': { |
| + 'include_dirs': [ |
| + 'src', |
| + ], |
| + }, |
| + 'dependencies': [ |
| + '../../third_party/icu/icu.gyp:icuuc', |
| + ], |
| + 'conditions': [ |
| + ['clang==1', { |
| + 'xcode_settings': { |
| + 'WARNING_CFLAGS': [ |
| + '-Wno-unused-value', |
| + ], |
| + }, |
| + 'cflags': [ |
| + '-Wno-unused-value', |
| + ] |
| + }], |
| + ['OS=="win"', { |
| + # TODO(eae): C4267 on amd64. size_t -> int, size_t -> unsigned int |
| + 'msvs_disabled_warnings': [4267, 4334], |
| + }], |
| + ], |
| + }, |
| ], |
| - 'direct_dependent_settings': { |
| - 'include_dirs': [ |
| - 'src', |
| - ], |
| + }, { # use_system_harfbuzz==1 |
| + 'variables': { |
| + # Check for presence of harfbuzz-icu library, use it if present. |
|
jungshik at Google
2014/03/18 19:05:30
On Chrome OS, the current plan is NOT to use harfb
|
| + 'harfbuzz_libraries': |
| + '<!(python <(DEPTH)/tools/compile_test/compile_test.py ' |
| + '--code "int main() { return 0; }" ' |
| + '--run-linker ' |
| + '--on-success "harfbuzz harfbuzz-icu" ' |
| + '--on-failure "harfbuzz" ' |
| + '-- -lharfbuzz-icu)', |
| }, |
| - 'dependencies': [ |
| - '../../third_party/icu/icu.gyp:icuuc', |
| - ], |
| - 'conditions': [ |
| - ['clang==1', { |
| - 'xcode_settings': { |
| - 'WARNING_CFLAGS': [ |
| - '-Wno-unused-value', |
| + 'targets': [ |
| + { |
| + 'target_name': 'harfbuzz-ng', |
| + 'type': 'none', |
| + 'cflags': [ |
| + '<!@(<(pkg-config) --cflags <(harfbuzz_libraries))', |
| + ], |
| + 'direct_dependent_settings': { |
| + 'cflags': [ |
| + '<!@(<(pkg-config) --cflags <(harfbuzz_libraries))', |
| ], |
| }, |
| - 'cflags': [ |
| - '-Wno-unused-value', |
| - ] |
| - }], |
| - ['OS=="win"', { |
| - # TODO(eae): C4267 on amd64. size_t -> int, size_t -> unsigned int |
| - 'msvs_disabled_warnings': [4267, 4334], |
| - }], |
| + 'link_settings': { |
| + 'ldflags': [ |
| + '<!@(<(pkg-config) --libs-only-L --libs-only-other <(harfbuzz_libraries))', |
| + ], |
| + 'libraries': [ |
| + '<!@(<(pkg-config) --libs-only-l <(harfbuzz_libraries))', |
| + ], |
| + }, |
| + }, |
| ], |
| - }, |
| + }], |
| ], |
| } |