[oe-commits] [openembedded-core] 36/44: qemu: add environment variable wrappers to make qemu look good with gtk frontend

git at git.openembedded.org git at git.openembedded.org
Fri Jan 18 11:07:26 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 70d16131df1915bf0a519872054300a6b12e7ec5
Author: Alexander Kanavin <alex.kanavin at gmail.com>
AuthorDate: Thu Jan 17 17:40:04 2019 +0100

    qemu: add environment variable wrappers to make qemu look good with gtk frontend
    
    GTK_THEME instructs gtk to use its built-in theme. Otherwise
    gtk attempts to use the theme from the host, which may be from
    a totally mismatching gtk version.
    
    On the other hand FONTCONFIG_PATH tells it to use the host fonts,
    as providing fonts in the native sysroot and instructing the components
    to use them is a lot more tricky.
    
    GDK_PIXBUF_MODULE_FILE is set, because otherwise qemu works but
    fills stdout with error messages, which eventually fill the pipe
    they go into. That pipe is read from only when qemu exits (to
    collect any error messages) by runqemu script. The pipe fill-up
    causes the qemu process to lock up.
    
    Signed-off-by: Alexander Kanavin <alex.kanavin at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-devtools/qemu/qemu.inc | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 08ae9ec..11f658e 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -48,6 +48,28 @@ do_install () {
 	oe_runmake 'DESTDIR=${D}' install
 }
 
+do_install_append_class-native() {
+        gdk_pixbuf_module_file=`pkg-config --variable=gdk_pixbuf_cache_file gdk-pixbuf-2.0`
+
+        for tool in `ls ${D}${bindir}/qemu-system-*`; do
+                create_wrapper $tool \
+                        GDK_PIXBUF_MODULE_FILE=$gdk_pixbuf_module_file \
+                        FONTCONFIG_PATH=/etc/fonts \
+                        GTK_THEME=Adwaita
+        done
+}
+
+do_install_append_class-nativesdk() {
+        gdk_pixbuf_module_file=`pkg-config --variable=gdk_pixbuf_cache_file gdk-pixbuf-2.0`
+
+        for tool in `ls ${D}${bindir}/qemu-system-*`; do
+                create_wrapper $tool \
+                        GDK_PIXBUF_MODULE_FILE=$gdk_pixbuf_module_file \
+                        FONTCONFIG_PATH=/etc/fonts \
+                        GTK_THEME=Adwaita
+        done
+}
+
 # The following fragment will create a wrapper for qemu-mips user emulation
 # binary in order to work around a segmentation fault issue. Basically, by
 # default, the reserved virtual address space for 32-on-64 bit is set to 4GB.

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list