diff options
Diffstat (limited to 'meta/classes/gtk-immodules-cache.bbclass')
-rw-r--r-- | meta/classes/gtk-immodules-cache.bbclass | 48 |
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 | ||
11 | gtk_immodule_cache_postinst() { | 11 | gtk_immodule_cache_postinst() { |
12 | if [ "x$D" != "x" ]; then | 12 | if [ "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 |
25 | fi | 27 | fi |
26 | if [ ! -z `which gtk-query-immodules-2.0` ]; then | 28 | if [ ! -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 |
28 | fi | 30 | fi |
29 | if [ ! -z `which gtk-query-immodules-3.0` ]; then | 31 | if [ ! -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 |
31 | fi | 33 | fi |
32 | } | 34 | } |
33 | 35 | ||
34 | gtk_immodule_cache_postrm() { | 36 | gtk_immodule_cache_postrm() { |
35 | if [ "x$D" != "x" ]; then | 37 | if [ "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 |
48 | fi | 52 | fi |
49 | if [ ! -z `which gtk-query-immodules-2.0` ]; then | 53 | if [ ! -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 |
51 | fi | 55 | fi |
52 | if [ ! -z `which gtk-query-immodules-3.0` ]; then | 56 | if [ ! -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 |
54 | fi | 58 | fi |
55 | } | 59 | } |
56 | 60 | ||