blob: 2d73e402ce9af8b91b34a868f142ffad86e5c81c [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001# Inherit this class in recipes to enable building their introspection files
2
3# This sets up autoconf-based recipes to build introspection data (or not),
4# depending on distro and machine features (see gobject-introspection-data class).
5inherit gobject-introspection-data
6EXTRA_OECONF_prepend = "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection', '--disable-introspection', d)} "
7
8UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-introspection --disable-introspection"
9
10# Generating introspection data depends on a combination of native and target
11# introspection tools, and qemu to run the target tools.
12DEPENDS_append = " gobject-introspection gobject-introspection-native qemu-native"
13
14# This is necessary for python scripts to succeed - distutils fails if these
15# are not set
16export BUILD_SYS
17export HOST_SYS
18export STAGING_INCDIR
19export STAGING_LIBDIR
20
21# This is used by introspection tools to find .gir includes
22export XDG_DATA_DIRS = "${STAGING_DATADIR}"
23
24do_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# .typelib files are needed at runtime and so they go to the main package (so
32# they'll be together with libraries they support).
33FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib"
34
35# .gir files go to dev package, as they're needed for developing (but not for
36# running) things that depends on introspection.
37FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir"