[oe-commits] [openembedded-core] 04/44: gobject-introspection.bbclass: add a class that enables gobject introspection

git at git.openembedded.org git at git.openembedded.org
Mon Mar 7 17:18:24 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 75eedf432b16f17d34d29a16020da8763b57e7ce
Author: Alexander Kanavin <alexander.kanavin at linux.intel.com>
AuthorDate: Thu Oct 29 15:16:56 2015 +0200

    gobject-introspection.bbclass: add a class that enables gobject introspection
    
    Signed-off-by: Alexander Kanavin <alexander.kanavin at linux.intel.com>
---
 meta/classes/gobject-introspection.bbclass | 34 ++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/meta/classes/gobject-introspection.bbclass b/meta/classes/gobject-introspection.bbclass
new file mode 100644
index 0000000..e98956b
--- /dev/null
+++ b/meta/classes/gobject-introspection.bbclass
@@ -0,0 +1,34 @@
+# Inherit this class in recipes to enable building their introspection files
+
+EXTRA_OECONF_prepend = "${@bb.utils.contains('COMBINED_FEATURES', 'gobject-introspection-data', '--enable-introspection', '--disable-introspection', d)} "
+
+UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-introspection --disable-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
+export STAGING_LIBDIR
+export STAGING_INCDIR
+
+# 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
+}
+
+
+# .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"
+

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list