diff options
Diffstat (limited to 'meta/classes-recipe/gtk-immodules-cache.bbclass')
| -rw-r--r-- | meta/classes-recipe/gtk-immodules-cache.bbclass | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/meta/classes-recipe/gtk-immodules-cache.bbclass b/meta/classes-recipe/gtk-immodules-cache.bbclass deleted file mode 100644 index 585838c105..0000000000 --- a/meta/classes-recipe/gtk-immodules-cache.bbclass +++ /dev/null | |||
| @@ -1,80 +0,0 @@ | |||
| 1 | # | ||
| 2 | # Copyright OpenEmbedded Contributors | ||
| 3 | # | ||
| 4 | # SPDX-License-Identifier: MIT | ||
| 5 | # | ||
| 6 | |||
| 7 | # This class will update the inputmethod module cache for virtual keyboards | ||
| 8 | # | ||
| 9 | # Usage: Set GTKIMMODULES_PACKAGES to the packages that needs to update the inputmethod modules | ||
| 10 | |||
| 11 | PACKAGE_WRITE_DEPS += "qemuwrapper-cross" | ||
| 12 | |||
| 13 | GTKIMMODULES_PACKAGES ?= "${PN}" | ||
| 14 | |||
| 15 | gtk_immodule_cache_postinst() { | ||
| 16 | if [ "x$D" != "x" ]; then | ||
| 17 | $INTERCEPT_DIR/postinst_intercept update_gtk_immodules_cache ${PKG} \ | ||
| 18 | mlprefix=${MLPREFIX} \ | ||
| 19 | binprefix=${MLPREFIX} \ | ||
| 20 | libdir=${libdir} \ | ||
| 21 | libexecdir=${libexecdir} \ | ||
| 22 | base_libdir=${base_libdir} \ | ||
| 23 | bindir=${bindir} | ||
| 24 | else | ||
| 25 | if [ ! -z `which gtk-query-immodules-2.0` ]; then | ||
| 26 | gtk-query-immodules-2.0 > ${libdir}/gtk-2.0/2.10.0/immodules.cache | ||
| 27 | fi | ||
| 28 | if [ ! -z `which gtk-query-immodules-3.0` ]; then | ||
| 29 | mkdir -p ${libdir}/gtk-3.0/3.0.0 | ||
| 30 | gtk-query-immodules-3.0 > ${libdir}/gtk-3.0/3.0.0/immodules.cache | ||
| 31 | fi | ||
| 32 | fi | ||
| 33 | } | ||
| 34 | |||
| 35 | gtk_immodule_cache_postrm() { | ||
| 36 | if [ "x$D" != "x" ]; then | ||
| 37 | $INTERCEPT_DIR/postinst_intercept update_gtk_immodules_cache ${PKG} \ | ||
| 38 | mlprefix=${MLPREFIX} \ | ||
| 39 | binprefix=${MLPREFIX} \ | ||
| 40 | libdir=${libdir} \ | ||
| 41 | libexecdir=${libexecdir} \ | ||
| 42 | base_libdir=${base_libdir} \ | ||
| 43 | bindir=${bindir} | ||
| 44 | else | ||
| 45 | if [ ! -z `which gtk-query-immodules-2.0` ]; then | ||
| 46 | gtk-query-immodules-2.0 > ${libdir}/gtk-2.0/2.10.0/immodules.cache | ||
| 47 | fi | ||
| 48 | if [ ! -z `which gtk-query-immodules-3.0` ]; then | ||
| 49 | gtk-query-immodules-3.0 > ${libdir}/gtk-3.0/3.0.0/immodules.cache | ||
| 50 | fi | ||
| 51 | fi | ||
| 52 | } | ||
| 53 | |||
| 54 | python populate_packages:append () { | ||
| 55 | gtkimmodules_pkgs = d.getVar('GTKIMMODULES_PACKAGES').split() | ||
| 56 | |||
| 57 | for pkg in gtkimmodules_pkgs: | ||
| 58 | bb.note("adding gtk-immodule-cache postinst and postrm scripts to %s" % pkg) | ||
| 59 | |||
| 60 | postinst = d.getVar('pkg_postinst:%s' % pkg) | ||
| 61 | if not postinst: | ||
| 62 | postinst = '#!/bin/sh\n' | ||
| 63 | postinst += d.getVar('gtk_immodule_cache_postinst') | ||
| 64 | d.setVar('pkg_postinst:%s' % pkg, postinst) | ||
| 65 | |||
| 66 | postrm = d.getVar('pkg_postrm:%s' % pkg) | ||
| 67 | if not postrm: | ||
| 68 | postrm = '#!/bin/sh\n' | ||
| 69 | postrm += d.getVar('gtk_immodule_cache_postrm') | ||
| 70 | d.setVar('pkg_postrm:%s' % pkg, postrm) | ||
| 71 | } | ||
| 72 | |||
| 73 | python __anonymous() { | ||
| 74 | if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d): | ||
| 75 | gtkimmodules_check = d.getVar('GTKIMMODULES_PACKAGES', False) | ||
| 76 | if not gtkimmodules_check: | ||
| 77 | bb_filename = d.getVar('FILE', False) | ||
| 78 | bb.fatal("ERROR: %s inherits gtk-immodules-cache but doesn't set GTKIMMODULES_PACKAGES" % bb_filename) | ||
| 79 | } | ||
| 80 | |||
