package/qemu: add SDL frontends
authorYann E. MORIN <yann.morin.1998@free.fr>
Tue, 7 Oct 2014 22:38:15 +0000 (00:38 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sun, 12 Oct 2014 17:14:47 +0000 (19:14 +0200)
[Peter: use BR2_PACKAGE_QEMU_HAS_EMULS, only add SDL_CONFIG once]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/qemu/Config.in
package/qemu/qemu.mk

index f29f8489aa8961bb8ee10b38b35774330e06da4e..cd7fed78988213154609540f0078dabf16aedb0f 100644 (file)
@@ -64,4 +64,21 @@ config BR2_PACKAGE_QEMU_LINUX_USER
 
 endif # BR2_PACKAGE_QEMU_CUSTOM_TARGETS == ""
 
+config BR2_PACKAGE_QEMU_HAS_EMULS
+    def_bool y
+    depends on BR2_PACKAGE_QEMU_SYSTEM || BR2_PACKAGE_QEMU_LINUX_USER || BR2_PACKAGE_QEMU_CUSTOM_TARGETS != ""
+
+if BR2_PACKAGE_QEMU_HAS_EMULS
+
+comment "Frontends"
+
+config BR2_PACKAGE_QEMU_SDL
+       bool "Enable SDL frontend"
+       select BR2_PACKAGE_SDL
+       help
+         Say 'y' to enable the SDL frontend, that is, a graphical window
+         presenting the VM's display.
+
+endif # BR2_PACKAGE_QEMU_HAS_EMULS
+
 endif # BR2_PACKAGE_QEMU
index 5d9fd48a638f80762687d3a2cad4a29989deb37a..8735b46b653041e2dca4497459132dc5488bf9c9 100644 (file)
@@ -115,6 +115,14 @@ ifneq ($(call qstrip,$(BR2_PACKAGE_QEMU_CUSTOM_TARGETS)),)
 QEMU_OPTS += --target-list="$(call qstrip,$(BR2_PACKAGE_QEMU_CUSTOM_TARGETS))"
 endif
 
+ifeq ($(BR2_PACKAGE_QEMU_SDL),y)
+QEMU_OPTS += --enable-sdl
+QEMU_DEPENDENCIES += sdl
+QEMU_VARS += SDL_CONFIG=$(BR2_STAGING_DIR)/usr/bin/sdl-config
+else
+QEMU_OPTS += --disable-sdl
+endif
+
 define QEMU_CONFIGURE_CMDS
        ( cd $(@D);                                 \
            LIBS='$(QEMU_LIBS)'                     \
@@ -132,7 +140,6 @@ define QEMU_CONFIGURE_CMDS
                --disable-bsd-user                  \
                --disable-xen                       \
                --disable-slirp                     \
-               --disable-sdl                       \
                --disable-vnc                       \
                --disable-virtfs                    \
                --disable-brlapi                    \