Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | PACKAGE_WRITE_DEPS += "qemu-native" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 2 | inherit qemu |
| 3 | |
| 4 | GIO_MODULE_PACKAGES ??= "${PN}" |
| 5 | |
| 6 | gio_module_cache_common() { |
| 7 | if [ "x$D" != "x" ]; then |
| 8 | $INTERCEPT_DIR/postinst_intercept update_gio_module_cache ${PKG} \ |
| 9 | mlprefix=${MLPREFIX} \ |
| 10 | binprefix=${MLPREFIX} \ |
| 11 | libdir=${libdir} \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 12 | libexecdir=${libexecdir} \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 13 | base_libdir=${base_libdir} \ |
| 14 | bindir=${bindir} |
| 15 | else |
| 16 | ${libexecdir}/${MLPREFIX}gio-querymodules ${libdir}/gio/modules/ |
| 17 | fi |
| 18 | } |
| 19 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 20 | python populate_packages:append () { |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 21 | packages = d.getVar('GIO_MODULE_PACKAGES').split() |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 22 | |
| 23 | for pkg in packages: |
| 24 | bb.note("adding gio-module-cache postinst and postrm scripts to %s" % pkg) |
| 25 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 26 | postinst = d.getVar('pkg_postinst:%s' % pkg) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 27 | if not postinst: |
| 28 | postinst = '#!/bin/sh\n' |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 29 | postinst += d.getVar('gio_module_cache_common') |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 30 | d.setVar('pkg_postinst:%s' % pkg, postinst) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 31 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 32 | postrm = d.getVar('pkg_postrm:%s' % pkg) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 33 | if not postrm: |
| 34 | postrm = '#!/bin/sh\n' |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 35 | postrm += d.getVar('gio_module_cache_common') |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 36 | d.setVar('pkg_postrm:%s' % pkg, postrm) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 37 | } |
| 38 | |