Upstream version 9.38.198.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)" "<(system_libdir)"',
10       }, {
11         'pkg-config': 'pkg-config',
12       }],
13     ],
14
15     # If any of the linux_link_FOO below are set to 1, then the corresponding
16     # target will be linked against the FOO library (either dynamically or
17     # statically, depending on the pkg-config files), as opposed to loading the
18     # FOO library dynamically with dlopen.
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 or ozone_platform_ozonex==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': 'xtst',
310           'type': 'none',
311           'toolsets': ['host', 'target'],
312           'conditions': [
313             ['_toolset=="target"', {
314               'direct_dependent_settings': {
315                 'cflags': [
316                   '<!@(<(pkg-config) --cflags xtst)',
317                 ],
318               },
319               'link_settings': {
320                 'ldflags': [
321                   '<!@(<(pkg-config) --libs-only-L --libs-only-other xtst)',
322                 ],
323                 'libraries': [
324                   '<!@(<(pkg-config) --libs-only-l xtst)',
325                 ],
326               },
327             }, {
328               'direct_dependent_settings': {
329                 'cflags': [
330                   '<!@(pkg-config --cflags xtst)',
331                 ],
332               },
333               'link_settings': {
334                 'ldflags': [
335                   '<!@(pkg-config --libs-only-L --libs-only-other xtst)',
336                 ],
337                 'libraries': [
338                   '<!@(pkg-config --libs-only-l xtst)',
339                 ],
340               },
341             }]
342           ]
343         }
344       ],  # targets
345     }],
346     ['use_x11==1 and chromeos==0', {
347       'targets': [
348         {
349           'target_name': 'xscrnsaver',
350           'type': 'none',
351           'direct_dependent_settings': {
352             'cflags': [
353               '<!@(<(pkg-config) --cflags xscrnsaver)',
354             ],
355           },
356           'link_settings': {
357             'ldflags': [
358               '<!@(<(pkg-config) --libs-only-L --libs-only-other xscrnsaver)',
359             ],
360             'libraries': [
361               '<!@(<(pkg-config) --libs-only-l xscrnsaver)',
362             ],
363           },
364         },
365       ],  # targets
366     }],
367     ['use_evdev_gestures==1', {
368       'targets': [
369         {
370           'target_name': 'libevdev-cros',
371           'type': 'none',
372           'direct_dependent_settings': {
373             'cflags': [
374               '<!@(<(pkg-config) --cflags libevdev-cros)'
375             ],
376           },
377           'link_settings': {
378             'ldflags': [
379               '<!@(<(pkg-config) --libs-only-L --libs-only-other libevdev-cros)',
380             ],
381             'libraries': [
382               '<!@(<(pkg-config) --libs-only-l libevdev-cros)',
383             ],
384           },
385         },
386         {
387           'target_name': 'libgestures',
388           'type': 'none',
389           'direct_dependent_settings': {
390             'cflags': [
391               '<!@(<(pkg-config) --cflags libgestures)'
392             ],
393           },
394           'link_settings': {
395             'ldflags': [
396               '<!@(<(pkg-config) --libs-only-L --libs-only-other libgestures)',
397             ],
398             'libraries': [
399               '<!@(<(pkg-config) --libs-only-l libgestures)',
400             ],
401           },
402         },
403       ],
404     }],
405     ['ozone_platform_gbm==1', {
406       'targets': [
407         {
408           'target_name': 'gbm',
409           'type': 'none',
410           'direct_dependent_settings': {
411             'cflags': [
412               '<!@(<(pkg-config) --cflags gbm)',
413             ],
414           },
415           'link_settings': {
416             'libraries': [
417               '<!@(<(pkg-config) --libs-only-l gbm)',
418             ],
419           },
420         },
421       ],
422     }],
423     ['ozone_platform_dri==1 or ozone_platform_gbm==1', {
424       'targets': [
425         {
426           'target_name': 'libdrm',
427           'type': 'none',
428           'direct_dependent_settings': {
429             'cflags': [
430               '<!@(<(pkg-config) --cflags libdrm)',
431             ],
432           },
433           'link_settings': {
434             'libraries': [
435               '<!@(<(pkg-config) --libs-only-l libdrm)',
436             ],
437           },
438         },
439       ],
440     }],
441   ],  # conditions
442   'targets': [
443     {
444       'target_name': 'dbus',
445       'type': 'none',
446       'direct_dependent_settings': {
447         'cflags': [
448           '<!@(<(pkg-config) --cflags dbus-1)',
449         ],
450       },
451       'link_settings': {
452         'ldflags': [
453           '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-1)',
454         ],
455         'libraries': [
456           '<!@(<(pkg-config) --libs-only-l dbus-1)',
457         ],
458       },
459     },
460     {
461       'target_name': 'fontconfig',
462       'type': 'none',
463       'conditions': [
464         ['_toolset=="target"', {
465           'conditions': [
466             ['use_system_fontconfig==1', {
467               'direct_dependent_settings': {
468                 'cflags': [
469                   '<!@(<(pkg-config) --cflags fontconfig)',
470                 ],
471               },
472               'link_settings': {
473                 'ldflags': [
474                   '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)',
475                 ],
476                 'libraries': [
477                   '<!@(<(pkg-config) --libs-only-l fontconfig)',
478                 ],
479               },
480             }, {  # use_system_fontconfig==0
481               'dependencies': [
482                 '../../third_party/fontconfig/fontconfig.gyp:fontconfig',
483               ],
484               'export_dependent_settings' : [
485                 '../../third_party/fontconfig/fontconfig.gyp:fontconfig',
486               ],
487             }],
488           ],
489         }],
490       ],
491     },
492     {
493       'target_name': 'freetype2',
494       'type': 'none',
495       'conditions': [
496         ['_toolset=="target"', {
497           'direct_dependent_settings': {
498             'cflags': [
499               '<!@(<(pkg-config) --cflags freetype2)',
500             ],
501           },
502           'link_settings': {
503             'ldflags': [
504               '<!@(<(pkg-config) --libs-only-L --libs-only-other freetype2)',
505             ],
506             'libraries': [
507               '<!@(<(pkg-config) --libs-only-l freetype2)',
508             ],
509           },
510         }],
511       ],
512     },
513     {
514       'target_name': 'gconf',
515       'type': 'none',
516       'conditions': [
517         ['use_gconf==1 and _toolset=="target"', {
518           'direct_dependent_settings': {
519             'cflags': [
520               '<!@(<(pkg-config) --cflags gconf-2.0)',
521             ],
522             'defines': [
523               'USE_GCONF',
524             ],
525           },
526           'link_settings': {
527             'ldflags': [
528               '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)',
529             ],
530             'libraries': [
531               '<!@(<(pkg-config) --libs-only-l gconf-2.0)',
532             ],
533           },
534         }],
535       ],
536     },
537     {
538       'target_name': 'gio',
539       'type': 'static_library',
540       'conditions': [
541         ['use_gio==1 and _toolset=="target"', {
542           'cflags': [
543             '<!@(<(pkg-config) --cflags gio-2.0)',
544           ],
545           'direct_dependent_settings': {
546             'cflags': [
547               '<!@(<(pkg-config) --cflags gio-2.0)',
548             ],
549             'defines': [
550               'USE_GIO',
551             ],
552             'include_dirs': [
553               '<(SHARED_INTERMEDIATE_DIR)',
554             ],
555           },
556           'include_dirs': [
557             '../..',
558           ],
559           'link_settings': {
560             'ldflags': [
561               '<!@(<(pkg-config) --libs-only-L --libs-only-other gio-2.0)',
562             ],
563             'libraries': [
564               '<!@(<(pkg-config) --libs-only-l gio-2.0)',
565             ],
566             'conditions': [
567               ['linux_link_gsettings==0 and OS=="linux"', {
568                 'libraries': [
569                   '-ldl',
570                 ],
571               }],
572             ],
573           },
574           'hard_dependency': 1,
575           'actions': [
576             {
577               'variables': {
578                 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libgio.h',
579                 'output_cc': '<(INTERMEDIATE_DIR)/libgio_loader.cc',
580                 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
581               },
582               'action_name': 'generate_libgio_loader',
583               'inputs': [
584                 '<(generator)',
585               ],
586               'outputs': [
587                 '<(output_h)',
588                 '<(output_cc)',
589               ],
590               'action': ['python',
591                          '<(generator)',
592                          '--name', 'LibGioLoader',
593                          '--output-h', '<(output_h)',
594                          '--output-cc', '<(output_cc)',
595                          '--header', '<gio/gio.h>',
596                          '--link-directly=<(linux_link_gsettings)',
597                          'g_settings_new',
598                          'g_settings_get_child',
599                          'g_settings_get_string',
600                          'g_settings_get_boolean',
601                          'g_settings_get_int',
602                          'g_settings_get_strv',
603                          'g_settings_list_schemas',
604               ],
605               'message': 'Generating libgio library loader',
606               'process_outputs_as_sources': 1,
607             },
608           ],
609         }],
610       ],
611     },
612     {
613       'target_name': 'glib',
614       'type': 'none',
615       'toolsets': ['host', 'target'],
616       'variables': {
617         'glib_packages': 'glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0',
618       },
619       'conditions': [
620         ['_toolset=="target"', {
621           'direct_dependent_settings': {
622             'cflags': [
623               '<!@(<(pkg-config) --cflags <(glib_packages))',
624             ],
625           },
626           'link_settings': {
627             'ldflags': [
628               '<!@(<(pkg-config) --libs-only-L --libs-only-other <(glib_packages))',
629             ],
630             'libraries': [
631               '<!@(<(pkg-config) --libs-only-l <(glib_packages))',
632             ],
633           },
634         }, {
635           'direct_dependent_settings': {
636             'cflags': [
637               '<!@(pkg-config --cflags <(glib_packages))',
638             ],
639           },
640           'link_settings': {
641             'ldflags': [
642               '<!@(pkg-config --libs-only-L --libs-only-other <(glib_packages))',
643             ],
644             'libraries': [
645               '<!@(pkg-config --libs-only-l <(glib_packages))',
646             ],
647           },
648         }],
649       ],
650     },
651     {
652       'target_name': 'gnome_keyring',
653       'type': 'none',
654       'conditions': [
655         ['use_gnome_keyring==1', {
656           'direct_dependent_settings': {
657             'cflags': [
658               '<!@(<(pkg-config) --cflags gnome-keyring-1)',
659             ],
660             'defines': [
661               'USE_GNOME_KEYRING',
662             ],
663             'conditions': [
664               ['linux_link_gnome_keyring==0', {
665                 'defines': ['DLOPEN_GNOME_KEYRING'],
666               }],
667             ],
668           },
669           'conditions': [
670             ['linux_link_gnome_keyring!=0', {
671               'link_settings': {
672                 'ldflags': [
673                   '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
674                 ],
675                 'libraries': [
676                   '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
677                 ],
678               },
679             }, {
680               'conditions': [
681                 ['OS=="linux"', {
682                  'link_settings': {
683                    'libraries': [
684                      '-ldl',
685                    ],
686                  },
687                 }],
688               ],
689             }],
690           ],
691         }],
692       ],
693     },
694     {
695       # The unit tests use a few convenience functions from the GNOME
696       # Keyring library directly. We ignore linux_link_gnome_keyring and
697       # link directly in this version of the target to allow this.
698       # *** Do not use this target in the main binary! ***
699       'target_name': 'gnome_keyring_direct',
700       'type': 'none',
701       'conditions': [
702         ['use_gnome_keyring==1', {
703           'direct_dependent_settings': {
704             'cflags': [
705               '<!@(<(pkg-config) --cflags gnome-keyring-1)',
706             ],
707             'defines': [
708               'USE_GNOME_KEYRING',
709             ],
710             'conditions': [
711               ['linux_link_gnome_keyring==0', {
712                 'defines': ['DLOPEN_GNOME_KEYRING'],
713               }],
714             ],
715           },
716           'link_settings': {
717             'ldflags': [
718               '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
719             ],
720             'libraries': [
721               '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
722             ],
723           },
724         }],
725       ],
726     },
727     {
728       'target_name': 'libbrlapi',
729       'type': 'static_library',
730       'all_dependent_settings': {
731         'include_dirs': [
732           '<(SHARED_INTERMEDIATE_DIR)',
733         ],
734         'defines': [
735           'USE_BRLAPI',
736         ],
737         'conditions': [
738           ['linux_link_libbrlapi==1', {
739             'link_settings': {
740               'libraries': [
741                 '-lbrlapi',
742               ],
743             }
744           }],
745         ],
746       },
747       'include_dirs': [
748         '../..',
749       ],
750       'hard_dependency': 1,
751       'actions': [
752         {
753           'variables': {
754             'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libbrlapi.h',
755             'output_cc': '<(INTERMEDIATE_DIR)/libbrlapi_loader.cc',
756             'generator': '../../tools/generate_library_loader/generate_library_loader.py',
757           },
758           'action_name': 'generate_brlapi_loader',
759           'inputs': [
760             '<(generator)',
761           ],
762           'outputs': [
763             '<(output_h)',
764             '<(output_cc)',
765           ],
766           'action': ['python',
767                      '<(generator)',
768                      '--name', 'LibBrlapiLoader',
769                      '--output-h', '<(output_h)',
770                      '--output-cc', '<(output_cc)',
771                      '--header', '<brlapi.h>',
772                      '--link-directly=<(linux_link_libbrlapi)',
773                      'brlapi_getHandleSize',
774                      'brlapi_error_location',
775                      'brlapi_strerror',
776                      'brlapi__acceptKeys',
777                      'brlapi__openConnection',
778                      'brlapi__closeConnection',
779                      'brlapi__getDisplaySize',
780                      'brlapi__enterTtyModeWithPath',
781                      'brlapi__leaveTtyMode',
782                      'brlapi__writeDots',
783                      'brlapi__readKey',
784           ],
785           'message': 'Generating libbrlapi library loader',
786           'process_outputs_as_sources': 1,
787         },
788       ],
789     },
790     {
791       'target_name': 'libcap',
792       'type': 'none',
793       'link_settings': {
794         'libraries': [
795           '-lcap',
796         ],
797       },
798     },
799     {
800       'target_name': 'libpci',
801       'type': 'static_library',
802       'cflags': [
803         '<!@(<(pkg-config) --cflags libpci)',
804       ],
805       'direct_dependent_settings': {
806         'include_dirs': [
807           '<(SHARED_INTERMEDIATE_DIR)',
808         ],
809         'conditions': [
810           ['linux_link_libpci==1', {
811             'link_settings': {
812               'ldflags': [
813                 '<!@(<(pkg-config) --libs-only-L --libs-only-other libpci)',
814               ],
815               'libraries': [
816                 '<!@(<(pkg-config) --libs-only-l libpci)',
817               ],
818             }
819           }],
820         ],
821       },
822       'include_dirs': [
823         '../..',
824       ],
825       'hard_dependency': 1,
826       'actions': [
827         {
828           'variables': {
829             'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libpci.h',
830             'output_cc': '<(INTERMEDIATE_DIR)/libpci_loader.cc',
831             'generator': '../../tools/generate_library_loader/generate_library_loader.py',
832           },
833           'action_name': 'generate_libpci_loader',
834           'inputs': [
835             '<(generator)',
836           ],
837           'outputs': [
838             '<(output_h)',
839             '<(output_cc)',
840           ],
841           'action': ['python',
842                      '<(generator)',
843                      '--name', 'LibPciLoader',
844                      '--output-h', '<(output_h)',
845                      '--output-cc', '<(output_cc)',
846                      '--header', '<pci/pci.h>',
847                      # TODO(phajdan.jr): Report problem to pciutils project
848                      # and get it fixed so that we don't need --use-extern-c.
849                      '--use-extern-c',
850                      '--link-directly=<(linux_link_libpci)',
851                      'pci_alloc',
852                      'pci_init',
853                      'pci_cleanup',
854                      'pci_scan_bus',
855                      'pci_fill_info',
856                      'pci_lookup_name',
857           ],
858           'message': 'Generating libpci library loader',
859           'process_outputs_as_sources': 1,
860         },
861       ],
862     },
863     {
864       'target_name': 'libresolv',
865       'type': 'none',
866       'link_settings': {
867         'libraries': [
868           '-lresolv',
869         ],
870       },
871     },
872     {
873       # GN version: //third_party/speech-dispatcher
874       'target_name': 'libspeechd',
875       'type': 'static_library',
876       'direct_dependent_settings': {
877         'include_dirs': [
878           '<(SHARED_INTERMEDIATE_DIR)',
879         ],
880         'conditions': [
881           ['linux_link_libspeechd==1', {
882             'link_settings': {
883               'libraries': [
884                 '-lspeechd',
885               ],
886             }
887           }],
888         ],
889       },
890       'include_dirs': [
891         '../..',
892       ],
893       'hard_dependency': 1,
894       'actions': [
895         {
896           'variables': {
897             'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libspeechd.h',
898             'output_cc': '<(INTERMEDIATE_DIR)/libspeechd_loader.cc',
899             'generator': '../../tools/generate_library_loader/generate_library_loader.py',
900
901             # speech-dispatcher >= 0.8 installs libspeechd.h into
902             # speech-dispatcher/libspeechd.h, whereas speech-dispatcher < 0.8
903             # puts libspeechd.h in the top-level include directory.
904             # Since we need to support both cases for now, we ship a copy of
905             # libspeechd.h in third_party/speech-dispatcher. If the user
906             # prefers to link against the speech-dispatcher directly, the
907             # `libspeechd_h_prefix' variable can be passed to gyp with a value
908             # such as "speech-dispatcher/" that will be prepended to
909             # "libspeechd.h" in the #include directive.
910             # TODO(phaldan.jr): Once we do not need to support
911             # speech-dispatcher < 0.8 we can get rid of all this (including
912             # third_party/speech-dispatcher) and just include
913             # speech-dispatcher/libspeechd.h unconditionally.
914             'libspeechd_h_prefix%': '',
915           },
916           'action_name': 'generate_libspeechd_loader',
917           'inputs': [
918             '<(generator)',
919           ],
920           'outputs': [
921             '<(output_h)',
922             '<(output_cc)',
923           ],
924           'action': ['python',
925                      '<(generator)',
926                      '--name', 'LibSpeechdLoader',
927                      '--output-h', '<(output_h)',
928                      '--output-cc', '<(output_cc)',
929                      '--header', '<<(libspeechd_h_prefix)libspeechd.h>',
930                      '--bundled-header',
931                      '"third_party/speech-dispatcher/libspeechd.h"',
932                      '--link-directly=<(linux_link_libspeechd)',
933                      'spd_open',
934                      'spd_say',
935                      'spd_stop',
936                      'spd_close',
937                      'spd_pause',
938                      'spd_resume',
939                      'spd_set_notification_on',
940                      'spd_set_voice_rate',
941                      'spd_set_voice_pitch',
942                      'spd_list_synthesis_voices',
943                      'spd_set_synthesis_voice',
944                      'spd_list_modules',
945                      'spd_set_output_module',
946           ],
947           'message': 'Generating libspeechd library loader',
948           'process_outputs_as_sources': 1,
949         },
950       ],
951     },
952     {
953       'target_name': 'pangocairo',
954       'type': 'none',
955       'toolsets': ['host', 'target'],
956       'conditions': [
957         ['_toolset=="target"', {
958           'direct_dependent_settings': {
959             'cflags': [
960               '<!@(<(pkg-config) --cflags pangocairo pangoft2)',
961             ],
962           },
963           'link_settings': {
964             'ldflags': [
965               '<!@(<(pkg-config) --libs-only-L --libs-only-other pangocairo pangoft2)',
966             ],
967             'libraries': [
968               '<!@(<(pkg-config) --libs-only-l pangocairo pangoft2)',
969             ],
970           },
971         }, {
972           'direct_dependent_settings': {
973             'cflags': [
974               '<!@(pkg-config --cflags pangocairo pangoft2)',
975             ],
976           },
977           'link_settings': {
978             'ldflags': [
979               '<!@(pkg-config --libs-only-L --libs-only-other pangocairo pangoft2)',
980             ],
981             'libraries': [
982               '<!@(pkg-config --libs-only-l pangocairo pangoft2)',
983             ],
984           },
985         }],
986       ],
987     },
988     {
989       'target_name': 'ssl',
990       'type': 'none',
991       'conditions': [
992         ['_toolset=="target"', {
993           'conditions': [
994             ['use_openssl==1', {
995               'dependencies': [
996                 '../../third_party/boringssl/boringssl.gyp:boringssl',
997               ],
998             }],
999             ['use_openssl==0', {
1000               'dependencies': [
1001                 '../../net/third_party/nss/ssl.gyp:libssl',
1002               ],
1003               'direct_dependent_settings': {
1004                 'include_dirs+': [
1005                   # We need for our local copies of the libssl3 headers to come
1006                   # before other includes, as we are shadowing system headers.
1007                   '<(DEPTH)/net/third_party/nss/ssl',
1008                 ],
1009                 'cflags': [
1010                   '<!@(<(pkg-config) --cflags nss)',
1011                 ],
1012               },
1013               'link_settings': {
1014                 'ldflags': [
1015                   '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
1016                 ],
1017                 'libraries': [
1018                   '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
1019                 ],
1020               },
1021             }],
1022             ['use_openssl==0 and clang==1', {
1023               'direct_dependent_settings': {
1024                 'cflags': [
1025                   # There is a broken header guard in /usr/include/nss/secmod.h:
1026                   # https://bugzilla.mozilla.org/show_bug.cgi?id=884072
1027                   '-Wno-header-guard',
1028                 ],
1029               },
1030             }],
1031           ]
1032         }],
1033       ],
1034     },
1035     {
1036       'target_name': 'udev',
1037       'type': 'none',
1038       'conditions': [
1039         # libudev is not available on *BSD
1040         ['_toolset=="target" and os_bsd!=1', {
1041           'direct_dependent_settings': {
1042             'cflags': [
1043               '<!@(<(pkg-config) --cflags libudev)'
1044             ],
1045           },
1046           'link_settings': {
1047             'ldflags': [
1048               '<!@(<(pkg-config) --libs-only-L --libs-only-other libudev)',
1049             ],
1050             'libraries': [
1051               '<!@(<(pkg-config) --libs-only-l libudev)',
1052             ],
1053           },
1054         }],
1055       ],
1056     },
1057   ],
1058 }