diff options
| author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2016-03-09 17:01:52 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-12 22:11:44 +0000 |
| commit | d1b96f159426763c5c2ebf2037e0d0bee662713f (patch) | |
| tree | 4fccacb2d15f79c3ea067f48be03456f7a5e5f5f | |
| parent | 96b5847a339d01fb90105afa63fa3848e8213266 (diff) | |
| download | poky-d1b96f159426763c5c2ebf2037e0d0bee662713f.tar.gz | |
gobject-introspection.bbclass: add a class that enables gobject introspection
(From OE-Core rev: 142cd4399a742f5482c1f83efe77bd85069bd7a7)
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/classes/gobject-introspection.bbclass | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/meta/classes/gobject-introspection.bbclass b/meta/classes/gobject-introspection.bbclass new file mode 100644 index 0000000000..ef5162974f --- /dev/null +++ b/meta/classes/gobject-introspection.bbclass | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | # Inherit this class in recipes to enable building their introspection files | ||
| 2 | |||
| 3 | # This allows disabling introspection support in recipes | ||
| 4 | # (and therefore avoiding the use of qemu) | ||
| 5 | # if gobject-introspection-data is omitted from DISTRO_FEATURES and MACHINE_FEATURES. | ||
| 6 | EXTRA_OECONF_prepend = "${@bb.utils.contains('COMBINED_FEATURES', 'gobject-introspection-data', '--enable-introspection', '--disable-introspection', d)} " | ||
| 7 | |||
| 8 | UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-introspection --disable-introspection" | ||
| 9 | |||
| 10 | # Generating introspection data depends on a combination of native and target introspection tools, | ||
| 11 | # and qemu to run the target tools. | ||
| 12 | DEPENDS_append = " gobject-introspection gobject-introspection-native qemu-native" | ||
| 13 | |||
| 14 | # This is necessary for python scripts to succeed - distutils | ||
| 15 | # failes if these are not set | ||
| 16 | export BUILD_SYS | ||
| 17 | export HOST_SYS | ||
| 18 | export STAGING_LIBDIR | ||
| 19 | export STAGING_INCDIR | ||
| 20 | |||
| 21 | # This is used by introspection tools to find .gir includes | ||
| 22 | export XDG_DATA_DIRS = "${STAGING_DATADIR}" | ||
| 23 | |||
| 24 | do_configure_prepend_class-target () { | ||
| 25 | # introspection.m4 pre-packaged with upstream tarballs does not yet | ||
| 26 | # have our fixes | ||
| 27 | mkdir -p ${S}/m4 | ||
| 28 | cp ${STAGING_DIR_TARGET}/${datadir}/aclocal/introspection.m4 ${S}/m4 | ||
| 29 | } | ||
| 30 | |||
| 31 | |||
| 32 | # .typelib files are needed at runtime and so they go to the main package | ||
| 33 | # (so they'll be together with libraries they support). | ||
| 34 | FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib" | ||
| 35 | |||
| 36 | # .gir files go to dev package, as they're needed for developing (but not for running) | ||
| 37 | # things that depends on introspection. | ||
| 38 | FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir" | ||
| 39 | |||
