Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / build / linux / system.gyp
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.
4
5 {
6   'variables': {
7     'conditions': [
8       ['sysroot!=""', {
9         'pkg-config': '<(chroot_cmd) ./pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
10       }, {
11         'pkg-config': 'pkg-config'
12       }],
13     ],
14
15     'linux_link_libgps%': 0,
16     'linux_link_libpci%': 0,
17     'linux_link_libspeechd%': 0,
18     'linux_link_libbrlapi%': 0,
19   },
20   'conditions': [
21     [ 'chromeos==0', {
22       # Hide GTK and related dependencies for Chrome OS, so they won't get
23       # added back to Chrome OS. Don't try to use GTK on Chrome OS.
24       'targets': [
25         {
26           'target_name': 'gdk',
27           'type': 'none',
28           'conditions': [
29             ['_toolset=="target"', {
30               'direct_dependent_settings': {
31                 'cflags': [
32                   '<!@(<(pkg-config) --cflags gdk-2.0)',
33                 ],
34               },
35               'link_settings': {
36                 'ldflags': [
37                   '<!@(<(pkg-config) --libs-only-L --libs-only-other gdk-2.0)',
38                 ],
39                 'libraries': [
40                   '<!@(<(pkg-config) --libs-only-l gdk-2.0)',
41                 ],
42               },
43             }],
44           ],
45         },
46         {
47           'target_name': 'gtk',
48           'type': 'none',
49           'toolsets': ['host', 'target'],
50           'variables': {
51             # gtk requires gmodule, but it does not list it as a dependency
52             # in some misconfigured systems.
53             'gtk_packages': 'gmodule-2.0 gtk+-2.0 gthread-2.0',
54           },
55           'conditions': [
56             ['_toolset=="target"', {
57               'all_dependent_settings': {
58                 'cflags': [
59                   '<!@(<(pkg-config) --cflags <(gtk_packages))',
60                 ],
61               },
62               'link_settings': {
63                 'ldflags': [
64                   '<!@(<(pkg-config) --libs-only-L --libs-only-other <(gtk_packages))',
65                 ],
66                 'libraries': [
67                   '<!@(<(pkg-config) --libs-only-l <(gtk_packages))',
68                 ],
69               },
70             }, {
71               'all_dependent_settings': {
72                 'cflags': [
73                   '<!@(pkg-config --cflags <(gtk_packages))',
74                 ],
75               },
76               'link_settings': {
77                 'ldflags': [
78                   '<!@(pkg-config --libs-only-L --libs-only-other <(gtk_packages))',
79                 ],
80                 'libraries': [
81                   '<!@(pkg-config --libs-only-l <(gtk_packages))',
82                 ],
83               },
84             }],
85           ],
86         },
87         {
88           'target_name': 'gtkprint',
89           'type': 'none',
90           'conditions': [
91             ['_toolset=="target"', {
92               'direct_dependent_settings': {
93                 'cflags': [
94                   '<!@(<(pkg-config) --cflags gtk+-unix-print-2.0)',
95                 ],
96               },
97               'link_settings': {
98                 'ldflags': [
99                   '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-unix-print-2.0)',
100                 ],
101                 'libraries': [
102                   '<!@(<(pkg-config) --libs-only-l gtk+-unix-print-2.0)',
103                 ],
104               },
105             }],
106           ],
107         },
108       ],  # targets
109     }],
110     [ 'use_x11==1', {
111       # Hide X11 and related dependencies when use_x11=0
112       'targets': [
113           {
114             'target_name': 'x11',
115             'type': 'none',
116             'toolsets': ['host', 'target'],
117             'conditions': [
118               ['_toolset=="target"', {
119                 'direct_dependent_settings': {
120                   'cflags': [
121                     '<!@(<(pkg-config) --cflags x11)',
122                   ],
123                 },
124                 'link_settings': {
125                   'ldflags': [
126                     '<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)',
127                   ],
128                   'libraries': [
129                     '<!@(<(pkg-config) --libs-only-l x11 xi)',
130                   ],
131                 },
132               }, {
133                 'direct_dependent_settings': {
134                   'cflags': [
135                     '<!@(pkg-config --cflags x11)',
136                   ],
137                 },
138                 'link_settings': {
139                   'ldflags': [
140                     '<!@(pkg-config --libs-only-L --libs-only-other x11 xi)',
141                   ],
142                   'libraries': [
143                     '<!@(pkg-config --libs-only-l x11 xi)',
144                   ],
145                 },
146               }],
147             ],
148           },
149           {
150             'target_name': 'xcursor',
151             'type': 'none',
152             'direct_dependent_settings': {
153               'cflags': [
154                 '<!@(<(pkg-config) --cflags xcursor)',
155               ],
156             },
157             'link_settings': {
158               'ldflags': [
159                 '<!@(<(pkg-config) --libs-only-L --libs-only-other xcursor)',
160               ],
161               'libraries': [
162                 '<!@(<(pkg-config) --libs-only-l xcursor)',
163               ],
164             },
165           },
166           {
167             'target_name': 'xcomposite',
168             'type': 'none',
169             'direct_dependent_settings': {
170               'cflags': [
171                 '<!@(<(pkg-config) --cflags xcomposite)',
172               ],
173             },
174             'link_settings': {
175               'ldflags': [
176                 '<!@(<(pkg-config) --libs-only-L --libs-only-other xcomposite)',
177               ],
178               'libraries': [
179                 '<!@(<(pkg-config) --libs-only-l xcomposite)',
180               ],
181             },
182           },
183           {
184             'target_name': 'xdamage',
185             'type': 'none',
186             'direct_dependent_settings': {
187               'cflags': [
188                 '<!@(<(pkg-config) --cflags xdamage)',
189               ],
190             },
191             'link_settings': {
192               'ldflags': [
193                 '<!@(<(pkg-config) --libs-only-L --libs-only-other xdamage)',
194               ],
195               'libraries': [
196                 '<!@(<(pkg-config) --libs-only-l xdamage)',
197               ],
198             },
199           },
200           {
201             'target_name': 'xext',
202             'type': 'none',
203             'direct_dependent_settings': {
204               'cflags': [
205                 '<!@(<(pkg-config) --cflags xext)',
206               ],
207             },
208             'link_settings': {
209               'ldflags': [
210                 '<!@(<(pkg-config) --libs-only-L --libs-only-other xext)',
211               ],
212               'libraries': [
213                 '<!@(<(pkg-config) --libs-only-l xext)',
214               ],
215             },
216           },
217           {
218             'target_name': 'xfixes',
219             'type': 'none',
220             'direct_dependent_settings': {
221               'cflags': [
222                 '<!@(<(pkg-config) --cflags xfixes)',
223               ],
224             },
225             'link_settings': {
226               'ldflags': [
227                 '<!@(<(pkg-config) --libs-only-L --libs-only-other xfixes)',
228               ],
229               'libraries': [
230                 '<!@(<(pkg-config) --libs-only-l xfixes)',
231               ],
232             },
233           },
234           {
235             'target_name': 'xi',
236             'type': 'none',
237             'direct_dependent_settings': {
238               'cflags': [
239                 '<!@(<(pkg-config) --cflags xi)',
240               ],
241             },
242             'link_settings': {
243               'ldflags': [
244                 '<!@(<(pkg-config) --libs-only-L --libs-only-other xi)',
245               ],
246               'libraries': [
247                 '<!@(<(pkg-config) --libs-only-l xi)',
248               ],
249             },
250           },
251           {
252             'target_name': 'xrandr',
253             'type': 'none',
254             'toolsets': ['host', 'target'],
255             'conditions': [
256               ['_toolset=="target"', {
257                 'direct_dependent_settings': {
258                   'cflags': [
259                     '<!@(<(pkg-config) --cflags xrandr)',
260                   ],
261                 },
262                 'link_settings': {
263                   'ldflags': [
264                     '<!@(<(pkg-config) --libs-only-L --libs-only-other xrandr)',
265                   ],
266                   'libraries': [
267                     '<!@(<(pkg-config) --libs-only-l xrandr)',
268                   ],
269                 },
270               }, {
271                 'direct_dependent_settings': {
272                   'cflags': [
273                     '<!@(pkg-config --cflags xrandr)',
274                   ],
275                 },
276                 'link_settings': {
277                   'ldflags': [
278                     '<!@(pkg-config --libs-only-L --libs-only-other xrandr)',
279                   ],
280                   'libraries': [
281                     '<!@(pkg-config --libs-only-l xrandr)',
282                   ],
283                 },
284               }],
285             ],
286           },
287           {
288             'target_name': 'xrender',
289             'type': 'none',
290             'direct_dependent_settings': {
291               'cflags': [
292                 '<!@(<(pkg-config) --cflags xrender)',
293               ],
294             },
295             'link_settings': {
296               'ldflags': [
297                 '<!@(<(pkg-config) --libs-only-L --libs-only-other xrender)',
298               ],
299               'libraries': [
300                 '<!@(<(pkg-config) --libs-only-l xrender)',
301               ],
302             },
303           },
304           {
305             'target_name': 'xscrnsaver',
306             'type': 'none',
307             'direct_dependent_settings': {
308               'cflags': [
309                 '<!@(<(pkg-config) --cflags xscrnsaver)',
310               ],
311             },
312             'link_settings': {
313               'ldflags': [
314                 '<!@(<(pkg-config) --libs-only-L --libs-only-other xscrnsaver)',
315               ],
316               'libraries': [
317                 '<!@(<(pkg-config) --libs-only-l xscrnsaver)',
318               ],
319             },
320           },
321           {
322             'target_name': 'xtst',
323             'type': 'none',
324             'toolsets': ['host', 'target'],
325             'conditions': [
326               ['_toolset=="target"', {
327                 'direct_dependent_settings': {
328                   'cflags': [
329                     '<!@(<(pkg-config) --cflags xtst)',
330                   ],
331                 },
332                 'link_settings': {
333                   'ldflags': [
334                     '<!@(<(pkg-config) --libs-only-L --libs-only-other xtst)',
335                   ],
336                   'libraries': [
337                     '<!@(<(pkg-config) --libs-only-l xtst)',
338                   ],
339                 },
340               }, {
341                 'direct_dependent_settings': {
342                   'cflags': [
343                     '<!@(pkg-config --cflags xtst)',
344                   ],
345                 },
346                 'link_settings': {
347                   'ldflags': [
348                     '<!@(pkg-config --libs-only-L --libs-only-other xtst)',
349                   ],
350                   'libraries': [
351                     '<!@(pkg-config --libs-only-l xtst)',
352                   ],
353                 },
354               }]
355             ]
356           }
357       ],  # targets
358     }],
359   ],  # conditions
360   'targets': [
361     {
362       'target_name': 'dbus',
363       'type': 'none',
364       'direct_dependent_settings': {
365         'cflags': [
366           '<!@(<(pkg-config) --cflags dbus-1)',
367         ],
368       },
369       'link_settings': {
370         'ldflags': [
371           '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-1)',
372         ],
373         'libraries': [
374           '<!@(<(pkg-config) --libs-only-l dbus-1)',
375         ],
376       },
377     },
378     {
379       'target_name': 'dridrm',
380       'type': 'none',
381       'direct_dependent_settings': {
382         'cflags': [
383           '<!@(<(pkg-config) --cflags libdrm)',
384         ],
385       },
386       'link_settings': {
387         'libraries': [
388           '<!@(<(pkg-config) --libs-only-l libdrm)',
389         ],
390       },
391     },
392     {
393       'target_name': 'fontconfig',
394       'type': 'none',
395       'conditions': [
396         ['_toolset=="target"', {
397           'conditions': [
398             ['use_system_fontconfig==1', {
399               'direct_dependent_settings': {
400                 'cflags': [
401                   '<!@(<(pkg-config) --cflags fontconfig)',
402                 ],
403               },
404               'link_settings': {
405                 'ldflags': [
406                   '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)',
407                 ],
408                 'libraries': [
409                   '<!@(<(pkg-config) --libs-only-l fontconfig)',
410                 ],
411               },
412             }, {  # use_system_fontconfig==0
413               'dependencies': [
414                 '../../third_party/fontconfig/fontconfig.gyp:fontconfig',
415               ],
416               'export_dependent_settings' : [
417                 '../../third_party/fontconfig/fontconfig.gyp:fontconfig',
418               ],
419             }],
420           ],
421         }],
422       ],
423     },
424     {
425       'target_name': 'freetype2',
426       'type': 'none',
427       'conditions': [
428         ['_toolset=="target"', {
429           'direct_dependent_settings': {
430             'cflags': [
431               '<!@(<(pkg-config) --cflags freetype2)',
432             ],
433           },
434           'link_settings': {
435             'ldflags': [
436               '<!@(<(pkg-config) --libs-only-L --libs-only-other freetype2)',
437             ],
438             'libraries': [
439               '<!@(<(pkg-config) --libs-only-l freetype2)',
440             ],
441           },
442         }],
443       ],
444     },
445     {
446       'target_name': 'gconf',
447       'type': 'none',
448       'conditions': [
449         ['use_gconf==1 and _toolset=="target"', {
450           'direct_dependent_settings': {
451             'cflags': [
452               '<!@(<(pkg-config) --cflags gconf-2.0)',
453             ],
454             'defines': [
455               'USE_GCONF',
456             ],
457           },
458           'link_settings': {
459             'ldflags': [
460               '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)',
461             ],
462             'libraries': [
463               '<!@(<(pkg-config) --libs-only-l gconf-2.0)',
464             ],
465           },
466         }],
467       ],
468     },
469     {
470       'target_name': 'gio',
471       'type': 'static_library',
472       'conditions': [
473         ['use_gio==1 and _toolset=="target"', {
474           'cflags': [
475             '<!@(<(pkg-config) --cflags gio-2.0)',
476           ],
477           'direct_dependent_settings': {
478             'cflags': [
479               '<!@(<(pkg-config) --cflags gio-2.0)',
480             ],
481             'defines': [
482               'USE_GIO',
483             ],
484             'include_dirs': [
485               '<(SHARED_INTERMEDIATE_DIR)',
486             ],
487           },
488           'include_dirs': [
489             '../..',
490           ],
491           'link_settings': {
492             'ldflags': [
493               '<!@(<(pkg-config) --libs-only-L --libs-only-other gio-2.0)',
494             ],
495             'libraries': [
496               '<!@(<(pkg-config) --libs-only-l gio-2.0)',
497             ],
498             'conditions': [
499               ['linux_link_gsettings==0 and OS=="linux"', {
500                 'libraries': [
501                   '-ldl',
502                 ],
503               }],
504             ],
505           },
506           'hard_dependency': 1,
507           'actions': [
508             {
509               'variables': {
510                 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libgio.h',
511                 'output_cc': '<(INTERMEDIATE_DIR)/libgio_loader.cc',
512                 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
513               },
514               'action_name': 'generate_libgio_loader',
515               'inputs': [
516                 '<(generator)',
517               ],
518               'outputs': [
519                 '<(output_h)',
520                 '<(output_cc)',
521               ],
522               'action': ['python',
523                          '<(generator)',
524                          '--name', 'LibGioLoader',
525                          '--output-h', '<(output_h)',
526                          '--output-cc', '<(output_cc)',
527                          '--header', '<gio/gio.h>',
528                          '--link-directly=<(linux_link_gsettings)',
529                          'g_settings_new',
530                          'g_settings_get_child',
531                          'g_settings_get_string',
532                          'g_settings_get_boolean',
533                          'g_settings_get_int',
534                          'g_settings_get_strv',
535                          'g_settings_list_schemas',
536               ],
537               'message': 'Generating libgio library loader',
538               'process_outputs_as_sources': 1,
539             },
540           ],
541         }],
542       ],
543     },
544     {
545       'target_name': 'glib',
546       'type': 'none',
547       'toolsets': ['host', 'target'],
548       'variables': {
549         'glib_packages': 'glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0',
550       },
551       'conditions': [
552         ['_toolset=="target"', {
553           'direct_dependent_settings': {
554             'cflags': [
555               '<!@(<(pkg-config) --cflags <(glib_packages))',
556             ],
557           },
558           'link_settings': {
559             'ldflags': [
560               '<!@(<(pkg-config) --libs-only-L --libs-only-other <(glib_packages))',
561             ],
562             'libraries': [
563               '<!@(<(pkg-config) --libs-only-l <(glib_packages))',
564             ],
565           },
566         }, {
567           'direct_dependent_settings': {
568             'cflags': [
569               '<!@(pkg-config --cflags <(glib_packages))',
570             ],
571           },
572           'link_settings': {
573             'ldflags': [
574               '<!@(pkg-config --libs-only-L --libs-only-other <(glib_packages))',
575             ],
576             'libraries': [
577               '<!@(pkg-config --libs-only-l <(glib_packages))',
578             ],
579           },
580         }],
581       ],
582     },
583     {
584       'target_name': 'gnome_keyring',
585       'type': 'none',
586       'conditions': [
587         ['use_gnome_keyring==1', {
588           'direct_dependent_settings': {
589             'cflags': [
590               '<!@(<(pkg-config) --cflags gnome-keyring-1)',
591             ],
592             'defines': [
593               'USE_GNOME_KEYRING',
594             ],
595             'conditions': [
596               ['linux_link_gnome_keyring==0', {
597                 'defines': ['DLOPEN_GNOME_KEYRING'],
598               }],
599             ],
600           },
601           'conditions': [
602             ['linux_link_gnome_keyring!=0', {
603               'link_settings': {
604                 'ldflags': [
605                   '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
606                 ],
607                 'libraries': [
608                   '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
609                 ],
610               },
611             }, {
612               'conditions': [
613                 ['OS=="linux"', {
614                  'link_settings': {
615                    'libraries': [
616                      '-ldl',
617                    ],
618                  },
619                 }],
620               ],
621             }],
622           ],
623         }],
624       ],
625     },
626     {
627       # The unit tests use a few convenience functions from the GNOME
628       # Keyring library directly. We ignore linux_link_gnome_keyring and
629       # link directly in this version of the target to allow this.
630       # *** Do not use this target in the main binary! ***
631       'target_name': 'gnome_keyring_direct',
632       'type': 'none',
633       'conditions': [
634         ['use_gnome_keyring==1', {
635           'direct_dependent_settings': {
636             'cflags': [
637               '<!@(<(pkg-config) --cflags gnome-keyring-1)',
638             ],
639             'defines': [
640               'USE_GNOME_KEYRING',
641             ],
642             'conditions': [
643               ['linux_link_gnome_keyring==0', {
644                 'defines': ['DLOPEN_GNOME_KEYRING'],
645               }],
646             ],
647           },
648           'link_settings': {
649             'ldflags': [
650               '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
651             ],
652             'libraries': [
653               '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
654             ],
655           },
656         }],
657       ],
658     },
659     {
660       'target_name': 'libbrlapi',
661       'type': 'static_library',
662       'all_dependent_settings': {
663         'include_dirs': [
664           '<(SHARED_INTERMEDIATE_DIR)',
665         ],
666         'defines': [
667           'USE_BRLAPI',
668         ],
669         'conditions': [
670           ['linux_link_libbrlapi==1', {
671             'link_settings': {
672               'libraries': [
673                 '-lbrlapi',
674               ],
675             }
676           }],
677         ],
678       },
679       'include_dirs': [
680         '../..',
681       ],
682       'hard_dependency': 1,
683       'actions': [
684         {
685           'variables': {
686             'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libbrlapi.h',
687             'output_cc': '<(INTERMEDIATE_DIR)/libbrlapi_loader.cc',
688             'generator': '../../tools/generate_library_loader/generate_library_loader.py',
689           },
690           'action_name': 'generate_brlapi_loader',
691           'inputs': [
692             '<(generator)',
693           ],
694           'outputs': [
695             '<(output_h)',
696             '<(output_cc)',
697           ],
698           'action': ['python',
699                      '<(generator)',
700                      '--name', 'LibBrlapiLoader',
701                      '--output-h', '<(output_h)',
702                      '--output-cc', '<(output_cc)',
703                      '--header', '<brlapi.h>',
704                      '--link-directly=<(linux_link_libbrlapi)',
705                      'brlapi_getHandleSize',
706                      'brlapi_error_location',
707                      'brlapi_expandKeyCode',
708                      'brlapi_strerror',
709                      'brlapi__acceptKeys',
710                      'brlapi__openConnection',
711                      'brlapi__closeConnection',
712                      'brlapi__getDisplaySize',
713                      'brlapi__enterTtyModeWithPath',
714                      'brlapi__leaveTtyMode',
715                      'brlapi__writeDots',
716                      'brlapi__readKey',
717           ],
718           'message': 'Generating libbrlapi library loader',
719           'process_outputs_as_sources': 1,
720         },
721       ],
722     },
723     {
724       'target_name': 'libcap',
725       'type': 'none',
726       'link_settings': {
727         'libraries': [
728           '-lcap',
729         ],
730       },
731     },
732     {
733       'target_name': 'libgcrypt',
734       'type': 'none',
735       'conditions': [
736         ['_toolset=="target" and use_cups==1', {
737           'direct_dependent_settings': {
738             'cflags': [
739               '<!@(libgcrypt-config --cflags)',
740             ],
741           },
742           'link_settings': {
743             'libraries': [
744               '<!@(libgcrypt-config --libs)',
745             ],
746           },
747         }],
748       ],
749     },
750     {
751       'target_name': 'libpci',
752       'type': 'static_library',
753       'cflags': [
754         '<!@(<(pkg-config) --cflags libpci)',
755       ],
756       'direct_dependent_settings': {
757         'include_dirs': [
758           '<(SHARED_INTERMEDIATE_DIR)',
759         ],
760         'conditions': [
761           ['linux_link_libpci==1', {
762             'link_settings': {
763               'ldflags': [
764                 '<!@(<(pkg-config) --libs-only-L --libs-only-other libpci)',
765               ],
766               'libraries': [
767                 '<!@(<(pkg-config) --libs-only-l libpci)',
768               ],
769             }
770           }],
771         ],
772       },
773       'include_dirs': [
774         '../..',
775       ],
776       'hard_dependency': 1,
777       'actions': [
778         {
779           'variables': {
780             'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libpci.h',
781             'output_cc': '<(INTERMEDIATE_DIR)/libpci_loader.cc',
782             'generator': '../../tools/generate_library_loader/generate_library_loader.py',
783           },
784           'action_name': 'generate_libpci_loader',
785           'inputs': [
786             '<(generator)',
787           ],
788           'outputs': [
789             '<(output_h)',
790             '<(output_cc)',
791           ],
792           'action': ['python',
793                      '<(generator)',
794                      '--name', 'LibPciLoader',
795                      '--output-h', '<(output_h)',
796                      '--output-cc', '<(output_cc)',
797                      '--header', '<pci/pci.h>',
798                      # TODO(phajdan.jr): Report problem to pciutils project
799                      # and get it fixed so that we don't need --use-extern-c.
800                      '--use-extern-c',
801                      '--link-directly=<(linux_link_libpci)',
802                      'pci_alloc',
803                      'pci_init',
804                      'pci_cleanup',
805                      'pci_scan_bus',
806                      'pci_fill_info',
807                      'pci_lookup_name',
808           ],
809           'message': 'Generating libpci library loader',
810           'process_outputs_as_sources': 1,
811         },
812       ],
813     },
814     {
815       'target_name': 'libresolv',
816       'type': 'none',
817       'link_settings': {
818         'libraries': [
819           '-lresolv',
820         ],
821       },
822     },
823     {
824       'target_name': 'libspeechd',
825       'type': 'static_library',
826       'direct_dependent_settings': {
827         'include_dirs': [
828           '<(SHARED_INTERMEDIATE_DIR)',
829         ],
830         'conditions': [
831           ['linux_link_libspeechd==1', {
832             'link_settings': {
833               'libraries': [
834                 '-lspeechd',
835               ],
836             }
837           }],
838         ],
839       },
840       'include_dirs': [
841         '../..',
842       ],
843       'hard_dependency': 1,
844       'actions': [
845         {
846           'variables': {
847             'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libspeechd.h',
848             'output_cc': '<(INTERMEDIATE_DIR)/libspeechd_loader.cc',
849             'generator': '../../tools/generate_library_loader/generate_library_loader.py',
850
851             # speech-dispatcher >= 0.8 installs libspeechd.h into
852             # speech-dispatcher/libspeechd.h, whereas speech-dispatcher < 0.8
853             # puts libspeechd.h in the top-level include directory.
854             # Since we need to support both cases for now, we ship a copy of
855             # libspeechd.h in third_party/speech-dispatcher. If the user
856             # prefers to link against the speech-dispatcher directly, the
857             # `libspeechd_h_prefix' variable can be passed to gyp with a value
858             # such as "speech-dispatcher/" that will be prepended to
859             # "libspeechd.h" in the #include directive.
860             # TODO(phaldan.jr): Once we do not need to support
861             # speech-dispatcher < 0.8 we can get rid of all this (including
862             # third_party/speech-dispatcher) and just include
863             # speech-dispatcher/libspeechd.h unconditionally.
864             'libspeechd_h_prefix%': '',
865           },
866           'action_name': 'generate_libspeechd_loader',
867           'inputs': [
868             '<(generator)',
869           ],
870           'outputs': [
871             '<(output_h)',
872             '<(output_cc)',
873           ],
874           'action': ['python',
875                      '<(generator)',
876                      '--name', 'LibSpeechdLoader',
877                      '--output-h', '<(output_h)',
878                      '--output-cc', '<(output_cc)',
879                      '--header', '<<(libspeechd_h_prefix)libspeechd.h>',
880                      '--bundled-header',
881                      '"third_party/speech-dispatcher/libspeechd.h"',
882                      '--link-directly=<(linux_link_libspeechd)',
883                      'spd_open',
884                      'spd_say',
885                      'spd_stop',
886                      'spd_close',
887                      'spd_pause',
888                      'spd_resume',
889                      'spd_set_notification_on',
890                      'spd_set_voice_rate',
891                      'spd_set_voice_pitch',
892                      'spd_list_synthesis_voices',
893                      'spd_set_synthesis_voice',
894                      'spd_list_modules',
895                      'spd_set_output_module',
896           ],
897           'message': 'Generating libspeechd library loader',
898           'process_outputs_as_sources': 1,
899         },
900       ],
901     },
902     {
903       'target_name': 'pangocairo',
904       'type': 'none',
905       'toolsets': ['host', 'target'],
906       'conditions': [
907         ['_toolset=="target"', {
908           'direct_dependent_settings': {
909             'cflags': [
910               '<!@(<(pkg-config) --cflags pangocairo pangoft2)',
911             ],
912           },
913           'link_settings': {
914             'ldflags': [
915               '<!@(<(pkg-config) --libs-only-L --libs-only-other pangocairo pangoft2)',
916             ],
917             'libraries': [
918               '<!@(<(pkg-config) --libs-only-l pangocairo pangoft2)',
919             ],
920           },
921         }, {
922           'direct_dependent_settings': {
923             'cflags': [
924               '<!@(pkg-config --cflags pangocairo pangoft2)',
925             ],
926           },
927           'link_settings': {
928             'ldflags': [
929               '<!@(pkg-config --libs-only-L --libs-only-other pangocairo pangoft2)',
930             ],
931             'libraries': [
932               '<!@(pkg-config --libs-only-l pangocairo pangoft2)',
933             ],
934           },
935         }],
936       ],
937     },
938     {
939       'target_name': 'ssl',
940       'type': 'none',
941       'conditions': [
942         ['_toolset=="target"', {
943           'conditions': [
944             ['use_openssl==1', {
945               'dependencies': [
946                 '../../third_party/openssl/openssl.gyp:openssl',
947               ],
948             }],
949             ['use_openssl==0', {
950               'dependencies': [
951                 '../../net/third_party/nss/ssl.gyp:libssl',
952               ],
953               'direct_dependent_settings': {
954                 'include_dirs+': [
955                   # We need for our local copies of the libssl3 headers to come
956                   # before other includes, as we are shadowing system headers.
957                   '<(DEPTH)/net/third_party/nss/ssl',
958                 ],
959                 'cflags': [
960                   '<!@(<(pkg-config) --cflags nss)',
961                 ],
962               },
963               'link_settings': {
964                 'ldflags': [
965                   '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
966                 ],
967                 'libraries': [
968                   '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
969                 ],
970               },
971             }],
972             ['use_openssl==0 and clang==1', {
973               'direct_dependent_settings': {
974                 'cflags': [
975                   # There is a broken header guard in /usr/include/nss/secmod.h:
976                   # https://bugzilla.mozilla.org/show_bug.cgi?id=884072
977                   '-Wno-header-guard',
978                 ],
979               },
980             }],
981           ]
982         }],
983       ],
984     },
985     {
986       'target_name': 'udev',
987       'type': 'none',
988       'conditions': [
989         # libudev is not available on *BSD
990         ['_toolset=="target" and os_bsd!=1', {
991           'direct_dependent_settings': {
992             'cflags': [
993               '<!@(<(pkg-config) --cflags libudev)'
994             ],
995           },
996           'link_settings': {
997             'ldflags': [
998               '<!@(<(pkg-config) --libs-only-L --libs-only-other libudev)',
999             ],
1000             'libraries': [
1001               '<!@(<(pkg-config) --libs-only-l libudev)',
1002             ],
1003           },
1004         }],
1005       ],
1006     },
1007   ],
1008 }