[OE-core] [PATCH 05/29] gobject-introspection.bbclass: add a class that enables gobject introspection

Alexander Kanavin alexander.kanavin at linux.intel.com
Mon Nov 9 14:50:27 UTC 2015


Signed-off-by: Alexander Kanavin <alexander.kanavin at linux.intel.com>
---
 meta/classes/gobject-introspection.bbclass | 36 ++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 meta/classes/gobject-introspection.bbclass

diff --git a/meta/classes/gobject-introspection.bbclass b/meta/classes/gobject-introspection.bbclass
new file mode 100644
index 0000000..be4f5d4
--- /dev/null
+++ b/meta/classes/gobject-introspection.bbclass
@@ -0,0 +1,36 @@
+# Inherit this class in recipes to enable building their introspection files
+
+EXTRA_OECONF_append = " --enable-introspection"
+UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-introspection"
+
+DEPENDS_append = " gobject-introspection"
+
+# This is necessary for python scripts to succeed - distutils
+# failes if these are not set
+export BUILD_SYS
+export HOST_SYS
+
+# This is used by introspection tools to find .gir includes
+export XDG_DATA_DIRS = "${STAGING_DATADIR}"
+
+do_configure_prepend_class-target () {
+    # introspection.m4 pre-packaged with upstream tarballs does not yet
+    # have our fixes
+    mkdir -p ${S}/m4
+    cp ${STAGING_DIR_TARGET}/${datadir}/aclocal/introspection.m4 ${S}/m4
+
+    # Sometimes tarballs package it in common/ instead of m4/,
+    # remove that too.
+    rm -f ${S}/common/introspection.m4
+    rm -f ${S}/common/m4/introspection.m4
+}
+
+
+# .typelib files are needed at runtime and so they go to the main package
+# (so they'll be together with libraries they support).
+FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib" 
+    
+# .gir files go to dev package, as they're needed for developing (but not for running)
+# things that depends on introspection.
+FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir"
+
-- 
2.1.4




More information about the Openembedded-core mailing list