gio-module-cache.bbclass 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. DEPENDS += "qemu-native"
  2. inherit qemu
  3. GIO_MODULE_PACKAGES ??= "${PN}"
  4. gio_module_cache_common() {
  5. if [ "x$D" != "x" ]; then
  6. $INTERCEPT_DIR/postinst_intercept update_gio_module_cache ${PKG} \
  7. mlprefix=${MLPREFIX} \
  8. binprefix=${MLPREFIX} \
  9. libdir=${libdir} \
  10. base_libdir=${base_libdir} \
  11. bindir=${bindir}
  12. else
  13. ${libexecdir}/${MLPREFIX}gio-querymodules ${libdir}/gio/modules/
  14. fi
  15. }
  16. python populate_packages_append () {
  17. packages = d.getVar('GIO_MODULE_PACKAGES', True).split()
  18. for pkg in packages:
  19. bb.note("adding gio-module-cache postinst and postrm scripts to %s" % pkg)
  20. postinst = d.getVar('pkg_postinst_%s' % pkg, True)
  21. if not postinst:
  22. postinst = '#!/bin/sh\n'
  23. postinst += d.getVar('gio_module_cache_common', True)
  24. d.setVar('pkg_postinst_%s' % pkg, postinst)
  25. postrm = d.getVar('pkg_postrm_%s' % pkg, True)
  26. if not postrm:
  27. postrm = '#!/bin/sh\n'
  28. postrm += d.getVar('gio_module_cache_common', True)
  29. d.setVar('pkg_postrm_%s' % pkg, postrm)
  30. }