blob: 021eeb1cf8c4b7c674a4fb1af5382d99a5007da6 [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}"
5
6gio_module_cache_common() {
7if [ "x$D" != "x" ]; then
8 $INTERCEPT_DIR/postinst_intercept update_gio_module_cache ${PKG} \
9 mlprefix=${MLPREFIX} \
10 binprefix=${MLPREFIX} \
11 libdir=${libdir} \
Brad Bishop316dfdd2018-06-25 12:45:53 -040012 libexecdir=${libexecdir} \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050013 base_libdir=${base_libdir} \
14 bindir=${bindir}
15else
16 ${libexecdir}/${MLPREFIX}gio-querymodules ${libdir}/gio/modules/
17fi
18}
19
Patrick Williams213cb262021-08-07 19:21:33 -050020python populate_packages:append () {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050021 packages = d.getVar('GIO_MODULE_PACKAGES').split()
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050022
23 for pkg in packages:
24 bb.note("adding gio-module-cache postinst and postrm scripts to %s" % pkg)
25
Patrick Williams213cb262021-08-07 19:21:33 -050026 postinst = d.getVar('pkg_postinst:%s' % pkg)
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050027 if not postinst:
28 postinst = '#!/bin/sh\n'
Brad Bishop6e60e8b2018-02-01 10:27:11 -050029 postinst += d.getVar('gio_module_cache_common')
Patrick Williams213cb262021-08-07 19:21:33 -050030 d.setVar('pkg_postinst:%s' % pkg, postinst)
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050031
Patrick Williams213cb262021-08-07 19:21:33 -050032 postrm = d.getVar('pkg_postrm:%s' % pkg)
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050033 if not postrm:
34 postrm = '#!/bin/sh\n'
Brad Bishop6e60e8b2018-02-01 10:27:11 -050035 postrm += d.getVar('gio_module_cache_common')
Patrick Williams213cb262021-08-07 19:21:33 -050036 d.setVar('pkg_postrm:%s' % pkg, postrm)
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050037}
38