| Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | # 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). | 
 | 5 | inherit gobject-introspection-data | 
 | 6 | EXTRA_OECONF_prepend = "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--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 | 
 | 11 | # introspection tools, 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 fails if these | 
 | 15 | # are not set | 
 | 16 | export BUILD_SYS | 
 | 17 | export HOST_SYS | 
 | 18 | export STAGING_INCDIR | 
 | 19 | export STAGING_LIBDIR | 
 | 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 | # .typelib files are needed at runtime and so they go to the main package (so | 
 | 32 | # they'll be together with libraries they support). | 
 | 33 | FILES_${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. | 
 | 37 | FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir" |