Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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.
5 {
6 'variables': {
7 'conditions': [
8 ['sysroot!=""', {
9 'pkg-config': './pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
10 }, {
11 'pkg-config': 'pkg-config'
12 }]
13 ],
14 },
15 'conditions': [
16 [ 'os_posix==1 and OS!="mac"', {
17 'variables': {
18 # We use our own copy of libssl3, although we still need to link against
19 # the rest of NSS.
20 'use_system_ssl%': 0,
21 },
22 }, {
23 'variables': {
24 'use_system_ssl%': 1,
25 },
26 }],
27 [ 'chromeos==0', {
28 # Hide GTK and related dependencies for Chrome OS, so they won't get
29 # added back to Chrome OS. Don't try to use GTK on Chrome OS.
30 'targets': [
31 {
32 'target_name': 'gtk',
33 'type': 'none',
34 'toolsets': ['host', 'target'],
35 'variables': {
36 # gtk requires gmodule, but it does not list it as a dependency
37 # in some misconfigured systems.
38 'gtk_packages': 'gmodule-2.0 gtk+-2.0 gthread-2.0',
39 },
40 'conditions': [
41 ['_toolset=="target"', {
42 'direct_dependent_settings': {
43 'cflags': [
44 '<!@(<(pkg-config) --cflags <(gtk_packages))',
45 ],
46 },
47 'link_settings': {
48 'ldflags': [
49 '<!@(<(pkg-config) --libs-only-L --libs-only-other <(gtk_packages))',
50 ],
51 'libraries': [
52 '<!@(<(pkg-config) --libs-only-l <(gtk_packages))',
53 ],
54 },
55 }, {
56 'direct_dependent_settings': {
57 'cflags': [
58 '<!@(pkg-config --cflags <(gtk_packages))',
59 ],
60 },
61 'link_settings': {
62 'ldflags': [
63 '<!@(pkg-config --libs-only-L --libs-only-other <(gtk_packages))',
64 ],
65 'libraries': [
66 '<!@(pkg-config --libs-only-l <(gtk_packages))',
67 ],
68 },
69 }],
70 ],
71 },
72 {
73 'target_name': 'gtkprint',
74 'type': 'none',
75 'conditions': [
76 ['_toolset=="target"', {
77 'direct_dependent_settings': {
78 'cflags': [
79 '<!@(<(pkg-config) --cflags gtk+-unix-print-2.0)',
80 ],
81 },
82 'link_settings': {
83 'ldflags': [
84 '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-unix-print-2.0)',
85 ],
86 'libraries': [
87 '<!@(<(pkg-config) --libs-only-l gtk+-unix-print-2.0)',
88 ],
89 },
90 }],
91 ],
92 },
93 {
94 'target_name': 'gdk',
95 'type': 'none',
96 'conditions': [
97 ['_toolset=="target"', {
98 'direct_dependent_settings': {
99 'cflags': [
100 '<!@(<(pkg-config) --cflags gdk-2.0)',
101 ],
102 },
103 'link_settings': {
104 'ldflags': [
105 '<!@(<(pkg-config) --libs-only-L --libs-only-other gdk-2.0)',
106 ],
107 'libraries': [
108 '<!@(<(pkg-config) --libs-only-l gdk-2.0)',
109 ],
110 },
111 }],
112 ],
113 },
114 ], # targets
115 }, { # chromeos==1
116 'targets': [
117 {
118 # TODO(satorux): Remove this once dbus-glib clients are gone.
119 'target_name': 'dbus-glib',
120 'type': 'none',
121 'direct_dependent_settings': {
122 'cflags': [
123 '<!@(<(pkg-config) --cflags dbus-glib-1)',
124 ],
125 },
126 'link_settings': {
127 'ldflags': [
128 '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-glib-1)',
129 ],
130 'libraries': [
131 '<!@(<(pkg-config) --libs-only-l dbus-glib-1)',
132 ],
133 },
134 },
135 ],
136 }]
137 ], # conditions
138 'targets': [
139 {
140 'target_name': 'ssl',
141 'type': 'none',
142 'conditions': [
143 ['_toolset=="target"', {
144 'conditions': [
145 ['use_openssl==1', {
146 'dependencies': [
147 '../../third_party/openssl/openssl.gyp:openssl',
148 ],
149 }],
150 ['use_openssl==0 and use_system_ssl==0', {
151 'dependencies': [
152 '../../net/third_party/nss/ssl.gyp:libssl',
153 '../../third_party/zlib/zlib.gyp:zlib',
154 ],
155 'direct_dependent_settings': {
156 'include_dirs+': [
157 # We need for our local copies of the libssl3 headers to come
158 # before other includes, as we are shadowing system headers.
159 '<(DEPTH)/net/third_party/nss/ssl',
160 ],
161 'cflags': [
162 '<!@(<(pkg-config) --cflags nss)',
163 ],
164 },
165 'link_settings': {
166 'ldflags': [
167 '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
168 ],
169 'libraries': [
170 '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
171 ],
172 },
173 }],
174 ['use_openssl==0 and use_system_ssl==1', {
175 'direct_dependent_settings': {
176 'cflags': [
177 '<!@(<(pkg-config) --cflags nss)',
178 ],
179 'defines': [
180 'USE_SYSTEM_SSL',
181 ],
182 },
183 'link_settings': {
184 'ldflags': [
185 '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
186 ],
187 'libraries': [
188 '<!@(<(pkg-config) --libs-only-l nss)',
189 ],
190 },
191 }],
192 ]
193 }],
194 ],
195 },
196 {
197 'target_name': 'freetype2',
198 'type': 'none',
199 'conditions': [
200 ['_toolset=="target"', {
201 'direct_dependent_settings': {
202 'cflags': [
203 '<!@(<(pkg-config) --cflags freetype2)',
204 ],
205 },
206 'link_settings': {
207 'ldflags': [
208 '<!@(<(pkg-config) --libs-only-L --libs-only-other freetype2)',
209 ],
210 'libraries': [
211 '<!@(<(pkg-config) --libs-only-l freetype2)',
212 ],
213 },
214 }],
215 ],
216 },
217 {
218 'target_name': 'fontconfig',
219 'type': 'none',
220 'conditions': [
221 ['_toolset=="target"', {
222 'direct_dependent_settings': {
223 'cflags': [
224 '<!@(<(pkg-config) --cflags fontconfig)',
225 ],
226 },
227 'link_settings': {
228 'ldflags': [
229 '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)',
230 ],
231 'libraries': [
232 '<!@(<(pkg-config) --libs-only-l fontconfig)',
233 ],
234 },
235 }],
236 ],
237 },
238 {
239 'target_name': 'gconf',
240 'type': 'none',
241 'conditions': [
242 ['use_gconf==1 and _toolset=="target"', {
243 'direct_dependent_settings': {
244 'cflags': [
245 '<!@(<(pkg-config) --cflags gconf-2.0)',
246 ],
247 'defines': [
248 'USE_GCONF',
249 ],
250 },
251 'link_settings': {
252 'ldflags': [
253 '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)',
254 ],
255 'libraries': [
256 '<!@(<(pkg-config) --libs-only-l gconf-2.0)',
257 ],
258 },
259 }],
260 ],
261 },
262 {
263 'target_name': 'gio',
264 'type': 'none',
265 'conditions': [
266 ['use_gio==1 and _toolset=="target"', {
267 'direct_dependent_settings': {
268 'cflags': [
269 '<!@(<(pkg-config) --cflags gio-2.0)',
270 ],
271 'defines': [
272 'USE_GIO',
273 ],
274 'conditions': [
275 ['linux_link_gsettings==0', {
276 'defines': ['DLOPEN_GSETTINGS'],
277 }],
278 ],
279 },
280 'link_settings': {
281 'ldflags': [
282 '<!@(<(pkg-config) --libs-only-L --libs-only-other gio-2.0)',
283 ],
284 'libraries': [
285 '<!@(<(pkg-config) --libs-only-l gio-2.0)',
286 ],
287 'conditions': [
288 ['linux_link_gsettings==0 and OS=="linux"', {
289 'libraries': [
290 '-ldl',
291 ],
292 }],
293 ],
294 },
295 }],
296 ],
297 },
298 {
299 'target_name': 'x11',
300 'type': 'none',
301 'toolsets': ['host', 'target'],
302 'conditions': [
303 ['_toolset=="target"', {
304 'direct_dependent_settings': {
305 'cflags': [
306 '<!@(<(pkg-config) --cflags x11)',
307 ],
308 },
309 'link_settings': {
310 'ldflags': [
311 '<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)',
312 ],
313 'libraries': [
314 '<!@(<(pkg-config) --libs-only-l x11 xi)',
315 ],
316 },
317 }, {
318 'direct_dependent_settings': {
319 'cflags': [
320 '<!@(pkg-config --cflags x11)',
321 ],
322 },
323 'link_settings': {
324 'ldflags': [
325 '<!@(pkg-config --libs-only-L --libs-only-other x11 xi)',
326 ],
327 'libraries': [
328 '<!@(pkg-config --libs-only-l x11 xi)',
329 ],
330 },
331 }],
332 ],
333 },
334 {
335 'target_name': 'xext',
336 'type': 'none',
337 'conditions': [
338 ['_toolset=="target"', {
339 'direct_dependent_settings': {
340 'cflags': [
341 '<!@(<(pkg-config) --cflags xext)',
342 ],
343 },
344 'link_settings': {
345 'ldflags': [
346 '<!@(<(pkg-config) --libs-only-L --libs-only-other xext)',
347 ],
348 'libraries': [
349 '<!@(<(pkg-config) --libs-only-l xext)',
350 ],
351 },
352 }],
353 ],
354 },
355 {
356 'target_name': 'xfixes',
357 'type': 'none',
358 'conditions': [
359 ['_toolset=="target"', {
360 'direct_dependent_settings': {
361 'cflags': [
362 '<!@(<(pkg-config) --cflags xfixes)',
363 ],
364 },
365 'link_settings': {
366 'ldflags': [
367 '<!@(<(pkg-config) --libs-only-L --libs-only-other xfixes)',
368 ],
369 'libraries': [
370 '<!@(<(pkg-config) --libs-only-l xfixes)',
371 ],
372 },
373 }],
374 ],
375 },
376 {
377 'target_name': 'libgcrypt',
378 'type': 'none',
379 'conditions': [
380 ['_toolset=="target" and use_cups==1', {
381 'direct_dependent_settings': {
382 'cflags': [
383 '<!@(libgcrypt-config --cflags)',
384 ],
385 },
386 'link_settings': {
387 'libraries': [
388 '<!@(libgcrypt-config --libs)',
389 ],
390 },
391 }],
392 ],
393 },
394 {
395 'target_name': 'selinux',
396 'type': 'none',
397 'conditions': [
398 ['_toolset=="target"', {
399 'link_settings': {
400 'libraries': [
401 '-lselinux',
402 ],
403 },
404 }],
405 ],
406 },
407 {
408 'target_name': 'gnome_keyring',
409 'type': 'none',
410 'conditions': [
411 ['use_gnome_keyring==1', {
412 'direct_dependent_settings': {
413 'cflags': [
414 '<!@(<(pkg-config) --cflags gnome-keyring-1)',
415 ],
416 'defines': [
417 'USE_GNOME_KEYRING',
418 ],
419 'conditions': [
420 ['linux_link_gnome_keyring==0', {
421 'defines': ['DLOPEN_GNOME_KEYRING'],
422 }],
423 ],
424 },
425 'conditions': [
426 ['linux_link_gnome_keyring!=0', {
427 'link_settings': {
428 'ldflags': [
429 '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
430 ],
431 'libraries': [
432 '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
433 ],
434 },
435 }, {
436 'conditions': [
437 ['OS=="linux"', {
438 'link_settings': {
439 'libraries': [
440 '-ldl',
441 ],
442 },
443 }],
444 ],
445 }],
446 ],
447 }],
448 ],
449 },
450 {
451 # The unit tests use a few convenience functions from the GNOME
452 # Keyring library directly. We ignore linux_link_gnome_keyring and
453 # link directly in this version of the target to allow this.
454 # *** Do not use this target in the main binary! ***
455 'target_name': 'gnome_keyring_direct',
456 'type': 'none',
457 'conditions': [
458 ['use_gnome_keyring==1', {
459 'direct_dependent_settings': {
460 'cflags': [
461 '<!@(<(pkg-config) --cflags gnome-keyring-1)',
462 ],
463 'defines': [
464 'USE_GNOME_KEYRING',
465 ],
466 'conditions': [
467 ['linux_link_gnome_keyring==0', {
468 'defines': ['DLOPEN_GNOME_KEYRING'],
469 }],
470 ],
471 },
472 'link_settings': {
473 'ldflags': [
474 '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
475 ],
476 'libraries': [
477 '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
478 ],
479 },
480 }],
481 ],
482 },
483 {
484 'target_name': 'dbus',
485 'type': 'none',
486 'direct_dependent_settings': {
487 'cflags': [
488 '<!@(<(pkg-config) --cflags dbus-1)',
489 ],
490 },
491 'link_settings': {
492 'ldflags': [
493 '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-1)',
494 ],
495 'libraries': [
496 '<!@(<(pkg-config) --libs-only-l dbus-1)',
497 ],
498 },
499 },
500 {
501 'target_name': 'glib',
502 'type': 'none',
503 'toolsets': ['host', 'target'],
504 'variables': {
505 'glib_packages': 'glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0',
506 },
507 'conditions': [
508 ['_toolset=="target"', {
509 'direct_dependent_settings': {
510 'cflags': [
511 '<!@(<(pkg-config) --cflags <(glib_packages))',
512 ],
513 },
514 'link_settings': {
515 'ldflags': [
516 '<!@(<(pkg-config) --libs-only-L --libs-only-other <(glib_packages))',
517 ],
518 'libraries': [
519 '<!@(<(pkg-config) --libs-only-l <(glib_packages))',
520 ],
521 },
522 }, {
523 'direct_dependent_settings': {
524 'cflags': [
525 '<!@(pkg-config --cflags <(glib_packages))',
526 ],
527 },
528 'link_settings': {
529 'ldflags': [
530 '<!@(pkg-config --libs-only-L --libs-only-other <(glib_packages))',
531 ],
532 'libraries': [
533 '<!@(pkg-config --libs-only-l <(glib_packages))',
534 ],
535 },
536 }],
537 ['chromeos==1', {
538 'link_settings': {
539 'libraries': [ '-lXtst' ]
540 }
541 }],
542 ],
543 },
544 {
545 'target_name': 'pangocairo',
546 'type': 'none',
547 'toolsets': ['host', 'target'],
548 'conditions': [
549 ['_toolset=="target"', {
550 'direct_dependent_settings': {
551 'cflags': [
552 '<!@(<(pkg-config) --cflags pangocairo)',
553 ],
554 },
555 'link_settings': {
556 'ldflags': [
557 '<!@(<(pkg-config) --libs-only-L --libs-only-other pangocairo)',
558 ],
559 'libraries': [
560 '<!@(<(pkg-config) --libs-only-l pangocairo)',
561 ],
562 },
563 }, {
564 'direct_dependent_settings': {
565 'cflags': [
566 '<!@(pkg-config --cflags pangocairo)',
567 ],
568 },
569 'link_settings': {
570 'ldflags': [
571 '<!@(pkg-config --libs-only-L --libs-only-other pangocairo)',
572 ],
573 'libraries': [
574 '<!@(pkg-config --libs-only-l pangocairo)',
575 ],
576 },
577 }],
578 ],
579 },
580 {
581 'target_name': 'libresolv',
582 'type': 'none',
583 'link_settings': {
584 'libraries': [
585 '-lresolv',
586 ],
587 },
588 },
589 {
590 'target_name': 'ibus',
591 'type': 'none',
592 'conditions': [
593 ['use_ibus==1', {
594 'variables': {
595 'ibus_min_version': '1.3.99.20110425',
596 },
597 'direct_dependent_settings': {
598 'defines': ['HAVE_IBUS=1'],
599 'cflags': [
600 '<!@(<(pkg-config) --cflags "ibus-1.0 >= <(ibus_min_version)")',
601 ],
602 },
603 'link_settings': {
604 'ldflags': [
605 '<!@(<(pkg-config) --libs-only-L --libs-only-other "ibus-1.0 >= <(ibus_min_version)")',
606 ],
607 'libraries': [
608 '<!@(<(pkg-config) --libs-only-l "ibus-1.0 >= <(ibus_min_version)")',
609 ],
610 },
611 }],
612 ],
613 },
614 {
615 'target_name': 'udev',
616 'type': 'none',
617 'conditions': [
618 # libudev is not available on *BSD
619 ['_toolset=="target" and os_bsd!=1', {
620 'direct_dependent_settings': {
621 'cflags': [
622 '<!@(<(pkg-config) --cflags libudev)'
623 ],
624 },
625 'link_settings': {
626 'ldflags': [
627 '<!@(<(pkg-config) --libs-only-L --libs-only-other libudev)',
628 ],
629 'libraries': [
630 '<!@(<(pkg-config) --libs-only-l libudev)',
631 ],
632 },
633 }],
634 ],
635 },
636 ],
637 }