blob: 0520c2257f210a2217006105111e3656c516e699 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001PACKAGE_WRITE_DEPS += "qemu-native"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05002inherit qemu
3
4GIO_MODULE_PACKAGES ??= "${PN}"
Brad Bishopd5ae7d92018-06-14 09:52:03 -07005GIO_MODULE_PACKAGES_class-nativesdk = ""
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05006
7gio_module_cache_common() {
8if [ "x$D" != "x" ]; then
9 $INTERCEPT_DIR/postinst_intercept update_gio_module_cache ${PKG} \
10 mlprefix=${MLPREFIX} \
11 binprefix=${MLPREFIX} \
12 libdir=${libdir} \
Brad Bishop316dfdd2018-06-25 12:45:53 -040013 libexecdir=${libexecdir} \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050014 base_libdir=${base_libdir} \
15 bindir=${bindir}
16else
17 ${libexecdir}/${MLPREFIX}gio-querymodules ${libdir}/gio/modules/
18fi
19}
20
21python populate_packages_append () {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050022 packages = d.getVar('GIO_MODULE_PACKAGES').split()
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050023
24 for pkg in packages:
25 bb.note("adding gio-module-cache postinst and postrm scripts to %s" % pkg)
26
Brad Bishop6e60e8b2018-02-01 10:27:11 -050027 postinst = d.getVar('pkg_postinst_%s' % pkg)
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050028 if not postinst:
29 postinst = '#!/bin/sh\n'
Brad Bishop6e60e8b2018-02-01 10:27:11 -050030 postinst += d.getVar('gio_module_cache_common')
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050031 d.setVar('pkg_postinst_%s' % pkg, postinst)
32
Brad Bishop6e60e8b2018-02-01 10:27:11 -050033 postrm = d.getVar('pkg_postrm_%s' % pkg)
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050034 if not postrm:
35 postrm = '#!/bin/sh\n'
Brad Bishop6e60e8b2018-02-01 10:27:11 -050036 postrm += d.getVar('gio_module_cache_common')
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050037 d.setVar('pkg_postrm_%s' % pkg, postrm)
38}
39