Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / build / config / linux / BUILD.gn
index f26b510..3ca2b73 100644 (file)
@@ -19,6 +19,12 @@ config("sdk") {
           sysroot ],
         "value") ]
   }
+
+  # Set here because OS_CHROMEOS cannot be autodetected in build_config.h like
+  # OS_LINUX and the like.
+  if (is_chromeos) {
+    defines = [ "OS_CHROMEOS" ]
+  }
 }
 
 config("fontconfig") {
@@ -33,12 +39,6 @@ pkg_config("glib") {
   packages = [ "glib-2.0", "gmodule-2.0", "gobject-2.0", "gthread-2.0" ]
 }
 
-pkg_config("gtk") {
-  # Gtk requires gmodule, but it does not list it as a dependency in some
-  # misconfigured systems.
-  packages = [ "gmodule-2.0", "gtk+-2.0", "gthread-2.0" ]
-}
-
 pkg_config("pangocairo") {
   packages = [ "pangocairo" ]
 }
@@ -57,10 +57,6 @@ pkg_config("dbus") {
   packages = [ "dbus-1" ]
 }
 
-pkg_config("gnome_keyring") {
-  packages = [ "gnome-keyring-1" ]
-}
-
 if (use_evdev_gestures) {
   pkg_config("libevdev-cros") {
     packages = [ "libevdev-cros" ]
@@ -120,9 +116,26 @@ config("libresolv") {
   libs = [ "resolv" ]
 }
 
-pkg_config("gconf") {
-  packages = [ "gconf-2.0" ]
-  defines = [ "USE_GCONF" ]
+# CrOS doesn't install GTK, gconf or any gnome packages.
+if (!is_chromeos) {
+  pkg_config("gtk") {
+    # Gtk requires gmodule, but it does not list it as a dependency in some
+    # misconfigured systems.
+    packages = [ "gmodule-2.0", "gtk+-2.0", "gthread-2.0" ]
+  }
+
+  pkg_config("gtkprint") {
+    packages = [ "gtk+-unix-print-2.0" ]
+  }
+
+  pkg_config("gnome_keyring") {
+    packages = [ "gnome-keyring-1" ]
+  }
+
+  pkg_config("gconf") {
+    packages = [ "gconf-2.0" ]
+    defines = [ "USE_GCONF" ]
+  }
 }
 
 # If brlapi isn't needed, don't require it to be installed.
@@ -138,13 +151,40 @@ if (use_brlapi) {
     output_cc = "libbrlapi_loader.cc"
     header = "<brlapi.h>"
     config = ":brlapi_config"
+
+    functions = [
+      "brlapi_getHandleSize",
+      "brlapi_error_location",
+      "brlapi_strerror",
+      "brlapi__acceptKeys",
+      "brlapi__openConnection",
+      "brlapi__closeConnection",
+      "brlapi__getDisplaySize",
+      "brlapi__enterTtyModeWithPath",
+      "brlapi__leaveTtyMode",
+      "brlapi__writeDots",
+      "brlapi__readKey",
+    ]
   }
 }
 
 pkg_config("gio_config") {
   packages = [ "gio-2.0" ]
-  defines = [ "USE_GIO" ]
-  ignore_libs = true  # Loader generated below.
+  # glib >=2.40 deprecate g_settings_list_schemas in favor of
+  # g_settings_schema_source_list_schemas. This function is not available on
+  # earlier versions that we still need to support (specifically, 2.32), so
+  # disable the warning with the GLIB_DISABLE_DEPRECATION_WARNINGS define.
+  # TODO(mgiuca): Remove this suppression when we drop support for Ubuntu 13.10
+  # (saucy) and earlier. Update the code to use
+  # g_settings_schema_source_list_schemas instead.
+  defines = [ "USE_GIO", "GLIB_DISABLE_DEPRECATION_WARNINGS" ]
+  # TODO(brettw) Theoretically I think ignore_libs should be set so that we
+  # don't link directly to GIO and use the loader generated below. But the gio
+  # target in GYP doesn't make any sense to me and appears to link directly to
+  # GIO in addition to making a loader. This this uncommented, the link in
+  # component build fails, so I think this is closer to the GYP build.
+  #ignore_libs = true  # Loader generated below.
 }
 
 # This generates a target named "gio".