Restore variadic macros in DevToolsEmbedderMessageDispatcher
[chromium-blink-merge.git] / third_party / harfbuzz-ng / harfbuzz.gyp
blobb9be8ae2f6c4789e15f540bcf7636ea3eb085c79
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6   'includes': [
7     '../../build/win_precompile.gypi',
8   ],
9   'variables': {
10     'conditions': [
11       ['OS=="linux" and chromeos==1', {
12         # Since version 1.31.0, pangoft2 which we depend on pulls in harfbuzz
13         # anyways. However, we want to have control of the version of harfbuzz
14         # we use, so don't use system harfbuzz unless we are building for
15         # chrome os, where we have the system harfbuzz under control.
16         'use_system_harfbuzz%': '<!(python ../../build/check_return_value.py <(pkg-config) --atleast-version=1.31.0 pangoft2)',
17       }, {
18         'use_system_harfbuzz': 0,
19       }],
20     ],
21   },
22   'conditions': [
23     ['use_system_harfbuzz==0', {
24       'targets': [
25         {
26           'target_name': 'harfbuzz-ng',
27           'type': 'static_library',
28           'defines': [
29             'HAVE_OT',
30             'HAVE_ICU',
31             'HAVE_ICU_BUILTIN',
32             'HB_NO_MT',
33           ],
34           'sources': [
35             'src/hb-atomic-private.hh',
36             'src/hb-blob.cc',
37             'src/hb-blob.h',
38             'src/hb-buffer.cc',
39             'src/hb-buffer-deserialize-json.hh',
40             'src/hb-buffer-deserialize-text.hh',
41             'src/hb-buffer.h',
42             'src/hb-buffer-private.hh',
43             'src/hb-buffer-serialize.cc',
44             'src/hb-cache-private.hh',
45             'src/hb-common.cc',
46             'src/hb-common.h',
47             'src/hb-deprecated.h',
48             'src/hb-face.cc',
49             'src/hb-face.h',
50             'src/hb-face-private.hh',
51             'src/hb-fallback-shape.cc',
52             'src/hb-font.cc',
53             'src/hb-font.h',
54             'src/hb-font-private.hh',
55             'src/hb.h',
56             'src/hb-icu.cc',
57             'src/hb-icu.h',
58             'src/hb-mutex-private.hh',
59             'src/hb-object-private.hh',
60             'src/hb-open-file-private.hh',
61             'src/hb-open-type-private.hh',
62             'src/hb-ot.h',
63             'src/hb-ot-font.cc',
64             'src/hb-ot-font.h',
65             'src/hb-ot-head-table.hh',
66             'src/hb-ot-hhea-table.hh',
67             'src/hb-ot-hmtx-table.hh',
68             'src/hb-ot-layout.cc',
69             'src/hb-ot-layout-common-private.hh',
70             'src/hb-ot-layout-gdef-table.hh',
71             'src/hb-ot-layout-gpos-table.hh',
72             'src/hb-ot-layout-gsubgpos-private.hh',
73             'src/hb-ot-layout-gsub-table.hh',
74             'src/hb-ot-layout.h',
75             'src/hb-ot-layout-private.hh',
76             'src/hb-ot-map.cc',
77             'src/hb-ot-map-private.hh',
78             'src/hb-ot-maxp-table.hh',
79             'src/hb-ot-name-table.hh',
80             'src/hb-ot-shape.cc',
81             'src/hb-ot-shape-complex-arabic.cc',
82             'src/hb-ot-shape-complex-arabic-fallback.hh',
83             'src/hb-ot-shape-complex-arabic-private.hh',
84             'src/hb-ot-shape-complex-arabic-table.hh',
85             'src/hb-ot-shape-complex-default.cc',
86             'src/hb-ot-shape-complex-hangul.cc',
87             'src/hb-ot-shape-complex-hebrew.cc',
88             'src/hb-ot-shape-complex-indic.cc',
89             'src/hb-ot-shape-complex-indic-machine.hh',
90             'src/hb-ot-shape-complex-indic-private.hh',
91             'src/hb-ot-shape-complex-indic-table.cc',
92             'src/hb-ot-shape-complex-myanmar.cc',
93             'src/hb-ot-shape-complex-myanmar-machine.hh',
94             'src/hb-ot-shape-complex-private.hh',
95             'src/hb-ot-shape-complex-thai.cc',
96             'src/hb-ot-shape-complex-tibetan.cc',
97             'src/hb-ot-shape-complex-use.cc',
98             'src/hb-ot-shape-complex-use-machine.hh',
99             'src/hb-ot-shape-complex-use-private.hh',
100             'src/hb-ot-shape-complex-use-table.cc',
101             'src/hb-ot-shape-fallback.cc',
102             'src/hb-ot-shape-fallback-private.hh',
103             'src/hb-ot-shape.h',
104             'src/hb-ot-shape-normalize.cc',
105             'src/hb-ot-shape-normalize-private.hh',
106             'src/hb-ot-shape-private.hh',
107             'src/hb-ot-tag.cc',
108             'src/hb-ot-tag.h',
109             'src/hb-private.hh',
110             'src/hb-set.cc',
111             'src/hb-set.h',
112             'src/hb-set-private.hh',
113             'src/hb-shape.cc',
114             'src/hb-shape.h',
115             'src/hb-shape-plan.cc',
116             'src/hb-shape-plan.h',
117             'src/hb-shape-plan-private.hh',
118             'src/hb-shaper.cc',
119             'src/hb-shaper-impl-private.hh',
120             'src/hb-shaper-list.hh',
121             'src/hb-shaper-private.hh',
122             'src/hb-unicode.cc',
123             'src/hb-unicode.h',
124             'src/hb-unicode-private.hh',
125             'src/hb-utf-private.hh',
126             'src/hb-version.h',
127             'src/hb-warning.cc',
128           ],
129           'include_dirs': [
130             'src',
131           ],
132           'direct_dependent_settings': {
133             'include_dirs': [
134               'src',
135             ],
136           },
137           'dependencies': [
138             '../../third_party/icu/icu.gyp:icuuc',
139           ],
140           'variables': {
141             'clang_warning_flags': [
142               '-Wno-unused-value',
143               # Harfbuzz uses unused typedefs for its static asserts (and its
144               # static asserts are strange enough that they can't be replaced
145               # by static_assert).
146               '-Wno-unused-local-typedef',
147             ],
148           },
149           'conditions': [
150             ['OS=="win"', {
151               # TODO(eae): C4267 on amd64. size_t -> int, size_t -> unsigned int
152               'msvs_disabled_warnings': [4267, 4334],
153             }],
154             ['OS=="mac"', {
155               'defines': [
156                 'HAVE_CORETEXT',
157               ],
158               'sources': [
159                 'src/hb-coretext.cc',
160                 'src/hb-coretext.h',
161               ],
162             }],
163             # When without -fvisibility=hidden for pango to use the harfbuzz
164             # in the tree, all symbols pango needs must be included, or
165             # pango uses mixed versions of harfbuzz and leads to crash.
166             # See crbug.com/462689.
167             ['use_pango==1 and OS=="linux" and chromeos==0 and buildtype!="Official" and target_arch!="arm" and target_arch!="mipsel"', {
168               'cflags!': ['-fvisibility=hidden'],
169               'sources': [
170                 'src/hb-ft.cc',
171                 'src/hb-ft.h',
172                 'src/hb-glib.cc',
173                 'src/hb-glib.h',
174               ],
175               'link_settings': {
176                 'ldflags': [
177                   # These symbols are referenced from libpangoft2, which will be
178                   # dynamically linked later.
179                   '-Wl,-uhb_ft_face_create_cached,-uhb_glib_get_unicode_funcs',
180                 ],
181               },
182               'dependencies': [
183                 '../../build/linux/system.gyp:freetype2',
184                 '../../build/linux/system.gyp:glib',
185               ],
186             }],
187           ],
188         },
189       ],
190     }, {  # use_system_harfbuzz==1
191       'targets': [
192         {
193           'target_name': 'harfbuzz-ng',
194           'type': 'none',
195           'cflags': [
196             '<!@(<(pkg-config) --cflags harfbuzz)',
197           ],
198           'direct_dependent_settings': {
199             'cflags': [
200               '<!@(<(pkg-config) --cflags harfbuzz)',
201             ],
202           },
203           'link_settings': {
204             'ldflags': [
205               '<!@(<(pkg-config) --libs-only-L --libs-only-other harfbuzz)',
206             ],
207             'libraries': [
208               '<!@(<(pkg-config) --libs-only-l harfbuzz)',
209             ],
210           },
211         },
212       ],
213     }],
214   ],