Mark two tests in ImeTest.java as flaky
[chromium-blink-merge.git] / build / config / linux / BUILD.gn
blobe132116d243f6666d3e01818ef4ee2907ba6b70e
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/linux/pkg_config.gni")
6 import("//build/config/features.gni")
7 import("//build/config/sysroot.gni")
8 import("//build/config/ui.gni")
9 import("//tools/generate_library_loader/generate_library_loader.gni")
11 gypi_values = exec_script("//build/gypi_to_gn.py",
12                           [ rebase_path("../../linux/system.gyp") ],
13                           "scope",
14                           [ "../../linux/system.gyp" ])
16 config("sdk") {
17   if (sysroot != "") {
18     cflags = [ "--sysroot=" + sysroot ]
19     ldflags = [ "--sysroot=" + sysroot ]
21     # Need to get some linker flags out of the sysroot.
22     ldflags += [ exec_script("sysroot_ld_path.py",
23                              [
24                                rebase_path("//build/linux/sysroot_ld_path.sh",
25                                            root_build_dir),
26                                sysroot,
27                              ],
28                              "value") ]
29   }
31   # Set here because OS_CHROMEOS cannot be autodetected in build_config.h like
32   # OS_LINUX and the like.
33   if (is_chromeos) {
34     defines = [ "OS_CHROMEOS" ]
35   }
38 config("fontconfig") {
39   libs = [ "fontconfig" ]
42 pkg_config("freetype2") {
43   packages = [ "freetype2" ]
46 pkg_config("glib") {
47   packages = [
48     "glib-2.0",
49     "gmodule-2.0",
50     "gobject-2.0",
51     "gthread-2.0",
52   ]
55 pkg_config("pangocairo") {
56   packages = [ "pangocairo" ]
59 pkg_config("pangoft2") {
60   packages = [ "pangoft2" ]
63 # Note: if your target also depends on //dbus, you don't need to add this
64 # config (it will get added automatically if you depend on //dbus).
65 pkg_config("dbus") {
66   packages = [ "dbus-1" ]
69 if (use_evdev_gestures) {
70   pkg_config("libevdev-cros") {
71     packages = [ "libevdev-cros" ]
72   }
74   pkg_config("libgestures") {
75     packages = [ "libgestures" ]
76   }
79 config("x11") {
80   libs = [
81     "X11",
82     "Xcomposite",
83     "Xcursor",
84     "Xdamage",
85     "Xext",
86     "Xfixes",
87     "Xi",
88     "Xrender",
89     "Xtst",
90   ]
93 config("xcomposite") {
94   libs = [ "Xcomposite" ]
97 config("xext") {
98   libs = [ "Xext" ]
101 config("xrandr") {
102   libs = [ "Xrandr" ]
105 config("xscrnsaver") {
106   libs = [ "Xss" ]
109 config("xfixes") {
110   libs = [ "Xfixes" ]
113 config("libcap") {
114   libs = [ "cap" ]
117 config("xi") {
118   libs = [ "Xi" ]
121 config("libresolv") {
122   libs = [ "resolv" ]
125 # CrOS doesn't install GTK, gconf or any gnome packages.
126 if (!is_chromeos) {
127   # These packages should _only_ be expected when building for a target.
128   # If these extra checks are not run, gconf is required when building host
129   # tools for a CrOS build.
130   if (current_toolchain == default_toolchain) {
131     pkg_config("gconf") {
132       packages = [ "gconf-2.0" ]
133       defines = [ "USE_GCONF" ]
134     }
135   }
138 # If brlapi isn't needed, don't require it to be installed.
139 if (use_brlapi) {
140   config("brlapi_config") {
141     defines = [ "USE_BRLAPI" ]
142   }
144   # TODO(GYP) linux_link_brlapi support. Is this needed?
145   generate_library_loader("libbrlapi") {
146     name = "LibBrlapiLoader"
147     output_h = "libbrlapi.h"
148     output_cc = "libbrlapi_loader.cc"
149     header = "<brlapi.h>"
150     config = ":brlapi_config"
152     functions = gypi_values.libbrlapi_functions
153   }
156 pkg_config("gio_config") {
157   packages = [ "gio-2.0" ]
159   # glib >=2.40 deprecate g_settings_list_schemas in favor of
160   # g_settings_schema_source_list_schemas. This function is not available on
161   # earlier versions that we still need to support (specifically, 2.32), so
162   # disable the warning with the GLIB_DISABLE_DEPRECATION_WARNINGS define.
163   # TODO(mgiuca): Remove this suppression when we drop support for Ubuntu 13.10
164   # (saucy) and earlier. Update the code to use
165   # g_settings_schema_source_list_schemas instead.
166   defines = [
167     "USE_GIO",
168     "GLIB_DISABLE_DEPRECATION_WARNINGS",
169   ]
171   # TODO(brettw) Theoretically I think ignore_libs should be set so that we
172   # don't link directly to GIO and use the loader generated below. But the gio
173   # target in GYP doesn't make any sense to me and appears to link directly to
174   # GIO in addition to making a loader. This this uncommented, the link in
175   # component build fails, so I think this is closer to the GYP build.
176   #ignore_libs = true  # Loader generated below.
179 # This generates a target named "gio".
180 generate_library_loader("gio") {
181   name = "LibGioLoader"
182   output_h = "libgio.h"
183   output_cc = "libgio_loader.cc"
184   header = "<gio/gio.h>"
185   config = ":gio_config"
187   functions = gypi_values.libgio_functions
190 # This generates a target named "libpci".
191 generate_library_loader("libpci") {
192   name = "LibPciLoader"
193   output_h = "libpci.h"
194   output_cc = "libpci_loader.cc"
195   header = "<pci/pci.h>"
197   functions = gypi_values.libpci_functions
200 # Looking for libspeechd? Use //third_party/speech-dispatcher
202 # This generates a target named "udev0_loader".
203 generate_library_loader("udev0_loader") {
204   name = "LibUdev0Loader"
205   output_h = "libudev0.h"
206   output_cc = "libudev0_loader.cc"
207   header = "\"third_party/libudev/libudev0.h\""
209   functions = gypi_values.libudev_functions
212 # This generates a target named "udev1_loader".
213 generate_library_loader("udev1_loader") {
214   name = "LibUdev1Loader"
215   output_h = "libudev1.h"
216   output_cc = "libudev1_loader.cc"
217   header = "\"third_party/libudev/libudev1.h\""
219   functions = gypi_values.libudev_functions
222 group("udev") {
223   deps = [
224     ":udev0_loader",
225     ":udev1_loader",
226   ]