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}" |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 5 | GIO_MODULE_PACKAGES_class-nativesdk = "" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 6 | |
| 7 | gio_module_cache_common() { |
| 8 | if [ "x$D" != "x" ]; then |
| 9 | $INTERCEPT_DIR/postinst_intercept update_gio_module_cache ${PKG} \ |
| 10 | mlprefix=${MLPREFIX} \ |
| 11 | binprefix=${MLPREFIX} \ |
| 12 | libdir=${libdir} \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 13 | libexecdir=${libexecdir} \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 14 | base_libdir=${base_libdir} \ |
| 15 | bindir=${bindir} |
| 16 | else |
| 17 | ${libexecdir}/${MLPREFIX}gio-querymodules ${libdir}/gio/modules/ |
| 18 | fi |
| 19 | } |
| 20 | |
| 21 | python populate_packages_append () { |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 22 | packages = d.getVar('GIO_MODULE_PACKAGES').split() |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 23 | |
| 24 | for pkg in packages: |
| 25 | bb.note("adding gio-module-cache postinst and postrm scripts to %s" % pkg) |
| 26 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 27 | postinst = d.getVar('pkg_postinst_%s' % pkg) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 28 | if not postinst: |
| 29 | postinst = '#!/bin/sh\n' |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 30 | postinst += d.getVar('gio_module_cache_common') |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 31 | d.setVar('pkg_postinst_%s' % pkg, postinst) |
| 32 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 33 | postrm = d.getVar('pkg_postrm_%s' % pkg) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 34 | if not postrm: |
| 35 | postrm = '#!/bin/sh\n' |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 36 | postrm += d.getVar('gio_module_cache_common') |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 37 | d.setVar('pkg_postrm_%s' % pkg, postrm) |
| 38 | } |
| 39 | |