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