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