summaryrefslogtreecommitdiffstats
path: root/meta/classes/gtk-immodules-cache.bbclass
diff options
context:
space:
mode:
authorMaxin B. John <maxin.john@intel.com>2016-02-02 13:04:10 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-02 14:44:16 +0000
commit333dce483fc056512443a7a318f55abace7ca98a (patch)
tree62d3676aab9dc5e2f0ed94c1a463d0777ca7542a /meta/classes/gtk-immodules-cache.bbclass
parentb1e41f4fbff4bff1be3c060a3610ba475dc9c432 (diff)
downloadpoky-333dce483fc056512443a7a318f55abace7ca98a.tar.gz
gtk-immodules-cache.bbclass: fix immodules-cache path
This commit in gtk+ moved the cache files below <libdir> " commit c8849046860a9b17fa943247d85ddadb29262b48 Author: Matthias Clasen <mclasen@redhat.com> Date: Thu Jul 4 09:27:17 2013 -0400 Move the module cache files below libdir These files contain architecture-dependent paths, and thus placing them into sysconfdir causes unnecessary hassle. Now the immodule cache file is looked for in libdir/gtk-2.0/2.10.0/immodules.cache. Belated backport of a change that was done in the run-up to 3.0.". Update gtk-immodules-cache.bbclass to use that path. The environment variable "GTK_IM_MODULE_FILE" can also be set to point GTK+ at the file to fix this problem. However, it causes problems for gtk3 apps. [YOCTO #6774] [YOCTO #8957] (From OE-Core rev: fff4303a18ac8100e5a96da7facb42d8751e1eae) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/gtk-immodules-cache.bbclass')
-rw-r--r--meta/classes/gtk-immodules-cache.bbclass48
1 files changed, 26 insertions, 22 deletions
diff --git a/meta/classes/gtk-immodules-cache.bbclass b/meta/classes/gtk-immodules-cache.bbclass
index 0a6316da47..c099cd38e4 100644
--- a/meta/classes/gtk-immodules-cache.bbclass
+++ b/meta/classes/gtk-immodules-cache.bbclass
@@ -10,47 +10,51 @@ GTKIMMODULES_PACKAGES ?= "${PN}"
10 10
11gtk_immodule_cache_postinst() { 11gtk_immodule_cache_postinst() {
12if [ "x$D" != "x" ]; then 12if [ "x$D" != "x" ]; then
13 for maj_ver in 2 3; do 13 if [ -x $D${bindir}/gtk-query-immodules-2.0 ]; then
14 if [ -x $D${bindir}/gtk-query-immodules-$maj_ver.0 ]; then 14 IMFILES=$(ls $D${libdir}/gtk-2.0/*/immodules/*.so)
15 IMFILES=$(ls $D${libdir}/gtk-$maj_ver.0/*/immodules/*.so) 15 ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-2.0')} \
16 ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-$maj_ver.0')} \ 16 $IMFILES > $D${libdir}/gtk-2.0/2.10.0/immodules.cache 2>/dev/null &&
17 $IMFILES > $D/etc/gtk-$maj_ver.0/gtk.immodules 2>/dev/null && 17 sed -i -e "s:$D::" $D${libdir}/gtk-2.0/2.10.0/immodules.cache
18 sed -i -e "s:$D::" $D/etc/gtk-$maj_ver.0/gtk.immodules 18 elif [ -x $D${bindir}/gtk-query-immodules-3.0 ]; then
19 19 IMFILES=$(ls $D${libdir}/gtk-3.0/*/immodules/*.so)
20 [ $? -ne 0 ] && exit 1 20 ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-3.0')} \
21 $IMFILES > $D${libdir}/gtk-3.0/3.0.0/immodules.cache 2>/dev/null &&
22 sed -i -e "s:$D::" $D${libdir}/gtk-3.0/3.0.0/immodules.cache
21 fi 23 fi
22 done
23 24
25 [ $? -ne 0 ] && exit 1
24 exit 0 26 exit 0
25fi 27fi
26if [ ! -z `which gtk-query-immodules-2.0` ]; then 28if [ ! -z `which gtk-query-immodules-2.0` ]; then
27 gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules 29 gtk-query-immodules-2.0 > ${libdir}/gtk-2.0/2.10.0/immodules.cache
28fi 30fi
29if [ ! -z `which gtk-query-immodules-3.0` ]; then 31if [ ! -z `which gtk-query-immodules-3.0` ]; then
30 gtk-query-immodules-3.0 > /etc/gtk-3.0/gtk.immodules 32 gtk-query-immodules-3.0 > ${libdir}/gtk-3.0/3.0.0/immodules.cache
31fi 33fi
32} 34}
33 35
34gtk_immodule_cache_postrm() { 36gtk_immodule_cache_postrm() {
35if [ "x$D" != "x" ]; then 37if [ "x$D" != "x" ]; then
36 for maj_ver in 2 3; do 38 if [ -x $D${bindir}/gtk-query-immodules-2.0 ]; then
37 if [ -x $D${bindir}/gtk-query-immodules-$maj_ver.0 ]; then 39 IMFILES=$(ls $D${libdir}/gtk-2.0/*/immodules/*.so)
38 IMFILES=$(ls $D${libdir}/gtk-$maj_ver.0/*/immodules/*.so) 40 ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-2.0')} \
39 ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-$maj_ver.0')} \ 41 $IMFILES > $D${libdir}/gtk-2.0/2.10.0/immodules.cache 2>/dev/null &&
40 $IMFILES > $D/etc/gtk-$maj_ver.0/gtk.immodules 2>/dev/null && 42 sed -i -e "s:$D::" $D${libdir}/gtk-2.0/2.10.0/immodules.cache
41 sed -i -e "s:$D::" $D/etc/gtk-$maj_ver.0/gtk.immodules 43 elif [ -x $D${bindir}/gtk-query-immodules-3.0 ]; then
42 44 IMFILES=$(ls $D${libdir}/gtk-3.0/*/immodules/*.so)
43 [ $? -ne 0 ] && exit 1 45 ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-3.0')} \
46 $IMFILES > $D${libdir}/gtk-3.0/3.0.0/immodules.cache 2>/dev/null &&
47 sed -i -e "s:$D::" $D${libdir}/gtk-3.0/3.0.0/immodules.cache
44 fi 48 fi
45 done
46 49
50 [ $? -ne 0 ] && exit 1
47 exit 0 51 exit 0
48fi 52fi
49if [ ! -z `which gtk-query-immodules-2.0` ]; then 53if [ ! -z `which gtk-query-immodules-2.0` ]; then
50 gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules 54 gtk-query-immodules-2.0 > ${libdir}/gtk-2.0/2.10.0/immodules.cache
51fi 55fi
52if [ ! -z `which gtk-query-immodules-3.0` ]; then 56if [ ! -z `which gtk-query-immodules-3.0` ]; then
53 gtk-query-immodules-3.0 > /etc/gtk-3.0/gtk.immodules 57 gtk-query-immodules-3.0 > ${libdir}/gtk-3.0/3.0.0/immodules.cache
54fi 58fi
55} 59}
56 60