[OE-core] [PATCH 23/29] webkitgtk: enable gobject introspection

Alexander Kanavin alexander.kanavin at linux.intel.com
Thu Nov 26 14:26:26 UTC 2015


Signed-off-by: Alexander Kanavin <alexander.kanavin at linux.intel.com>
---
 ...Introspection.cmake-prefix-variables-obta.patch | 27 +++++++++++++++
 ...ng-introspection-files-add-CMAKE_C_FLAGS-.patch | 40 ++++++++++++++++++++++
 meta/recipes-sato/webkit/webkitgtk_2.8.5.bb        |  6 ++--
 3 files changed, 71 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-sato/webkit/files/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch
 create mode 100644 meta/recipes-sato/webkit/files/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch

diff --git a/meta/recipes-sato/webkit/files/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch b/meta/recipes-sato/webkit/files/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch
new file mode 100644
index 0000000..fae3b0b
--- /dev/null
+++ b/meta/recipes-sato/webkit/files/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch
@@ -0,0 +1,27 @@
+From 317a5ac120c44987219bc03486cd2f2d1842c9b9 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin at gmail.com>
+Date: Tue, 27 Oct 2015 16:02:19 +0200
+Subject: [PATCH] FindGObjectIntrospection.cmake: prefix variables obtained
+ from pkg-config with PKG_CONFIG_SYSROOT_DIR
+
+Upstream-Status: Pending [review on oe-core list]
+Signed-off-by: Alexander Kanavin <alex.kanavin at gmail.com>
+---
+ Source/cmake/FindGObjectIntrospection.cmake | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Source/cmake/FindGObjectIntrospection.cmake b/Source/cmake/FindGObjectIntrospection.cmake
+index e1f49b4..03a4446 100644
+--- a/Source/cmake/FindGObjectIntrospection.cmake
++++ b/Source/cmake/FindGObjectIntrospection.cmake
+@@ -26,6 +26,7 @@ macro(_GIR_GET_PKGCONFIG_VAR _outvar _varname _extra_args)
+     else ()
+         string(REGEX REPLACE "[\r\n]" " " _result "${_result}")
+         string(REGEX REPLACE " +$" ""  _result "${_result}")
++        string(CONCAT _result $ENV{PKG_CONFIG_SYSROOT_DIR} "${_result}")
+         separate_arguments(_result)
+         set(${_outvar} ${_result} CACHE INTERNAL "")
+     endif ()
+-- 
+2.1.4
+
diff --git a/meta/recipes-sato/webkit/files/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch b/meta/recipes-sato/webkit/files/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch
new file mode 100644
index 0000000..c4584c6
--- /dev/null
+++ b/meta/recipes-sato/webkit/files/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch
@@ -0,0 +1,40 @@
+From f42434706e2686b28ac7c2d0362665c51d26faad Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin at gmail.com>
+Date: Wed, 28 Oct 2015 14:18:57 +0200
+Subject: [PATCH] When building introspection files, add CMAKE_C_FLAGS to the
+ compiler flags.
+
+g-ir-compiler is using a C compiler internally, so it needs to set
+the proper flags for it.
+
+Upstream-Status: Pending [review on oe-core list] 
+Signed-off-by: Alexander Kanavin <alex.kanavin at gmail.com>
+---
+ Source/WebKit2/PlatformGTK.cmake | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Source/WebKit2/PlatformGTK.cmake b/Source/WebKit2/PlatformGTK.cmake
+index 058c241..37d7412 100644
+--- a/Source/WebKit2/PlatformGTK.cmake
++++ b/Source/WebKit2/PlatformGTK.cmake
+@@ -823,7 +823,7 @@ add_custom_command(
+     OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
+     DEPENDS WebKit2
+     DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
+-    COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations LDFLAGS=
++    COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} LDFLAGS=
+         LD_LIBRARY_PATH="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
+         ${INTROSPECTION_SCANNER}
+         --quiet
+@@ -863,7 +863,7 @@ add_custom_command(
+     OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir
+     DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
+     DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
+-    COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations LDFLAGS=
++    COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} LDFLAGS=
+         LD_LIBRARY_PATH="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
+         ${INTROSPECTION_SCANNER}
+         --quiet
+-- 
+2.1.4
+
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.8.5.bb b/meta/recipes-sato/webkit/webkitgtk_2.8.5.bb
index 68634a9..2f8c277 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.8.5.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.8.5.bb
@@ -15,11 +15,13 @@ SRC_URI = "\
   file://0001-This-patch-fixes-a-command-line-that-is-too-long-ove.patch \
   file://0002-GTK-Build-failure-with-ACCELERATED_2D_CANVAS-when-ca.patch \
   file://gcc5.patch \
+  file://0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch \
+  file://0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch \
   "
 SRC_URI[md5sum] = "df79991848a5096d3a75289ebce547ae"
 SRC_URI[sha256sum] = "3d1f0c534935f43fd74df90f2648fcee672d60f1f57a30fa557a77891ae04d20"
 
-inherit cmake lib_package pkgconfig perlnative pythonnative distro_features_check
+inherit cmake lib_package pkgconfig perlnative pythonnative distro_features_check gobject-introspection
 
 # depends on libxt
 REQUIRED_DISTRO_FEATURES = "x11"
@@ -46,7 +48,7 @@ PACKAGECONFIG[libsecret] = "-DENABLE_CREDENTIAL_STORAGE=ON,-DENABLE_CREDENTIAL_S
 EXTRA_OECMAKE = " \
 		-DPORT=GTK \
 		-DCMAKE_BUILD_TYPE=Release \
-		-DENABLE_INTROSPECTION=OFF \
+		${@bb.utils.contains('DISTRO_FEATURES', 'gobject-introspection-data', '-DENABLE_INTROSPECTION=ON', '-DENABLE_INTROSPECTION=OFF', d)} \
 		-DENABLE_GTKDOC=OFF \
 		-DENABLE_MINIBROWSER=ON \
 		"
-- 
2.6.2




More information about the Openembedded-core mailing list