OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/linux/pkg_config.gni") | 5 import("//build/config/linux/pkg_config.gni") |
6 import("//build/config/features.gni") | 6 import("//build/config/features.gni") |
7 import("//build/config/sysroot.gni") | 7 import("//build/config/sysroot.gni") |
8 import("//build/config/ui.gni") | 8 import("//build/config/ui.gni") |
9 import("//tools/generate_library_loader/generate_library_loader.gni") | 9 import("//tools/generate_library_loader/generate_library_loader.gni") |
10 | 10 |
| 11 gypi_values = exec_script( |
| 12 "//build/gypi_to_gn.py", |
| 13 [ rebase_path("../../linux/system.gyp") ], |
| 14 "scope", |
| 15 [ "../../linux/system.gyp" ]) |
| 16 |
11 config("sdk") { | 17 config("sdk") { |
12 if (sysroot != "") { | 18 if (sysroot != "") { |
13 cflags = [ "--sysroot=" + sysroot ] | 19 cflags = [ "--sysroot=" + sysroot ] |
14 ldflags = [ "--sysroot=" + sysroot ] | 20 ldflags = [ "--sysroot=" + sysroot ] |
15 | 21 |
16 # Need to get some linker flags out of the sysroot. | 22 # Need to get some linker flags out of the sysroot. |
17 ldflags += [ exec_script("sysroot_ld_path.py", | 23 ldflags += [ exec_script("sysroot_ld_path.py", |
18 [ rebase_path("//build/linux/sysroot_ld_path.sh", root_build_dir), | 24 [ rebase_path("//build/linux/sysroot_ld_path.sh", root_build_dir), |
19 sysroot ], | 25 sysroot ], |
20 "value") ] | 26 "value") ] |
(...skipping 19 matching lines...) Expand all Loading... |
40 } | 46 } |
41 | 47 |
42 pkg_config("pangocairo") { | 48 pkg_config("pangocairo") { |
43 packages = [ "pangocairo" ] | 49 packages = [ "pangocairo" ] |
44 } | 50 } |
45 | 51 |
46 pkg_config("pangoft2") { | 52 pkg_config("pangoft2") { |
47 packages = [ "pangoft2" ] | 53 packages = [ "pangoft2" ] |
48 } | 54 } |
49 | 55 |
50 pkg_config("udev") { | |
51 packages = [ "libudev" ] | |
52 } | |
53 | |
54 # Note: if your target also depends on //dbus, you don't need to add this | 56 # Note: if your target also depends on //dbus, you don't need to add this |
55 # config (it will get added automatically if you depend on //dbus). | 57 # config (it will get added automatically if you depend on //dbus). |
56 pkg_config("dbus") { | 58 pkg_config("dbus") { |
57 packages = [ "dbus-1" ] | 59 packages = [ "dbus-1" ] |
58 } | 60 } |
59 | 61 |
60 if (use_evdev_gestures) { | 62 if (use_evdev_gestures) { |
61 pkg_config("libevdev-cros") { | 63 pkg_config("libevdev-cros") { |
62 packages = [ "libevdev-cros" ] | 64 packages = [ "libevdev-cros" ] |
63 } | 65 } |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 } | 135 } |
134 | 136 |
135 # TODO(GYP) linux_link_brlapi support. Is this needed? | 137 # TODO(GYP) linux_link_brlapi support. Is this needed? |
136 generate_library_loader("libbrlapi") { | 138 generate_library_loader("libbrlapi") { |
137 name = "LibBrlapiLoader" | 139 name = "LibBrlapiLoader" |
138 output_h = "libbrlapi.h" | 140 output_h = "libbrlapi.h" |
139 output_cc = "libbrlapi_loader.cc" | 141 output_cc = "libbrlapi_loader.cc" |
140 header = "<brlapi.h>" | 142 header = "<brlapi.h>" |
141 config = ":brlapi_config" | 143 config = ":brlapi_config" |
142 | 144 |
143 functions = [ | 145 functions = gypi_values.libbrlapi_functions |
144 "brlapi_getHandleSize", | |
145 "brlapi_error_location", | |
146 "brlapi_strerror", | |
147 "brlapi__acceptKeys", | |
148 "brlapi__openConnection", | |
149 "brlapi__closeConnection", | |
150 "brlapi__getDisplaySize", | |
151 "brlapi__enterTtyModeWithPath", | |
152 "brlapi__leaveTtyMode", | |
153 "brlapi__writeDots", | |
154 "brlapi__readKey", | |
155 ] | |
156 } | 146 } |
157 } | 147 } |
158 | 148 |
159 pkg_config("gio_config") { | 149 pkg_config("gio_config") { |
160 packages = [ "gio-2.0" ] | 150 packages = [ "gio-2.0" ] |
161 # glib >=2.40 deprecate g_settings_list_schemas in favor of | 151 # glib >=2.40 deprecate g_settings_list_schemas in favor of |
162 # g_settings_schema_source_list_schemas. This function is not available on | 152 # g_settings_schema_source_list_schemas. This function is not available on |
163 # earlier versions that we still need to support (specifically, 2.32), so | 153 # earlier versions that we still need to support (specifically, 2.32), so |
164 # disable the warning with the GLIB_DISABLE_DEPRECATION_WARNINGS define. | 154 # disable the warning with the GLIB_DISABLE_DEPRECATION_WARNINGS define. |
165 # TODO(mgiuca): Remove this suppression when we drop support for Ubuntu 13.10 | 155 # TODO(mgiuca): Remove this suppression when we drop support for Ubuntu 13.10 |
166 # (saucy) and earlier. Update the code to use | 156 # (saucy) and earlier. Update the code to use |
167 # g_settings_schema_source_list_schemas instead. | 157 # g_settings_schema_source_list_schemas instead. |
168 defines = [ "USE_GIO", "GLIB_DISABLE_DEPRECATION_WARNINGS" ] | 158 defines = [ "USE_GIO", "GLIB_DISABLE_DEPRECATION_WARNINGS" ] |
169 | 159 |
170 # TODO(brettw) Theoretically I think ignore_libs should be set so that we | 160 # TODO(brettw) Theoretically I think ignore_libs should be set so that we |
171 # don't link directly to GIO and use the loader generated below. But the gio | 161 # don't link directly to GIO and use the loader generated below. But the gio |
172 # target in GYP doesn't make any sense to me and appears to link directly to | 162 # target in GYP doesn't make any sense to me and appears to link directly to |
173 # GIO in addition to making a loader. This this uncommented, the link in | 163 # GIO in addition to making a loader. This this uncommented, the link in |
174 # component build fails, so I think this is closer to the GYP build. | 164 # component build fails, so I think this is closer to the GYP build. |
175 #ignore_libs = true # Loader generated below. | 165 #ignore_libs = true # Loader generated below. |
176 } | 166 } |
177 | 167 |
178 # This generates a target named "gio". | 168 # This generates a target named "gio". |
179 generate_library_loader("gio") { | 169 generate_library_loader("gio") { |
180 name = "LibGioLoader" | 170 name = "LibGioLoader" |
181 output_h = "libgio.h" | 171 output_h = "libgio.h" |
182 output_cc = "libgio_loader.cc" | 172 output_cc = "libgio_loader.cc" |
183 header = "<gio/gio.h>" | 173 header = "<gio/gio.h>" |
184 config = ":gio_config" | 174 config = ":gio_config" |
185 | 175 |
186 functions = [ | 176 functions = gypi_values.libgio_functions |
187 "g_settings_new", | |
188 "g_settings_get_child", | |
189 "g_settings_get_string", | |
190 "g_settings_get_boolean", | |
191 "g_settings_get_int", | |
192 "g_settings_get_strv", | |
193 "g_settings_list_schemas", | |
194 ] | |
195 } | 177 } |
196 | 178 |
197 # This generates a target named "libpci". | 179 # This generates a target named "libpci". |
198 generate_library_loader("libpci") { | 180 generate_library_loader("libpci") { |
199 name = "LibPciLoader" | 181 name = "LibPciLoader" |
200 output_h = "libpci.h" | 182 output_h = "libpci.h" |
201 output_cc = "libpci_loader.cc" | 183 output_cc = "libpci_loader.cc" |
202 header = "<pci/pci.h>" | 184 header = "<pci/pci.h>" |
203 | 185 |
204 functions = [ | 186 functions = gypi_values.libpci_functions |
205 "pci_alloc", | |
206 "pci_init", | |
207 "pci_cleanup", | |
208 "pci_scan_bus", | |
209 "pci_fill_info", | |
210 "pci_lookup_name", | |
211 ] | |
212 } | 187 } |
213 | 188 |
214 # Looking for libspeechd? Use //third_party/speech-dispatcher | 189 # Looking for libspeechd? Use //third_party/speech-dispatcher |
| 190 |
| 191 # This generates a target named "udev0_loader". |
| 192 generate_library_loader("udev0_loader") { |
| 193 name = "LibUdev0Loader" |
| 194 output_h = "libudev0.h" |
| 195 output_cc = "libudev0_loader.cc" |
| 196 header = "\"third_party/libudev/libudev0.h\"" |
| 197 |
| 198 functions = gypi_values.libudev_functions |
| 199 } |
| 200 |
| 201 # This generates a target named "udev1_loader". |
| 202 generate_library_loader("udev1_loader") { |
| 203 name = "LibUdev1Loader" |
| 204 output_h = "libudev1.h" |
| 205 output_cc = "libudev1_loader.cc" |
| 206 header = "\"third_party/libudev/libudev1.h\"" |
| 207 |
| 208 functions = gypi_values.libudev_functions |
| 209 } |
| 210 |
| 211 group("udev") { |
| 212 deps = [ |
| 213 ":udev0_loader", |
| 214 ":udev1_loader", |
| 215 ] |
| 216 } |
OLD | NEW |