Patchwork [05/29] package/qemu: add SDL frontends

login
register
mail settings
Submitter Yann E. MORIN
Date Jan. 29, 2013, 10:43 p.m.
Message ID <849174b967595153f7b59c87d3bdf0fc56b83a09.1359498903.git.yann.morin.1998@free.fr>
Download mbox | patch
Permalink /patch/216690/
State Changes Requested
Headers show

Comments

Yann E. MORIN - Jan. 29, 2013, 10:43 p.m.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/qemu/Config.in |    9 +++++++++
 package/qemu/qemu.mk   |   10 +++++++++-
 2 files changed, 18 insertions(+), 1 deletions(-)

Patch

diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index 4f1576b..ad934ae 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -76,4 +76,13 @@  config BR2_PACKAGE_QEMU_LINUX_USER
 
 endif # BR2_PACKAGE_QEMU_CUSTOM_TARGETS == ""
 
+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
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index c91c79b..1dd0c98 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -96,6 +96,7 @@  QEMU_OPTS =
 QEMU_VARS =                                                                         \
     PYTHON=$(HOST_DIR)/usr/bin/python                                               \
     PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages    \
+    SDL_CONFIG=$(STAGING_DIR)/usr/bin/sdl-config                                    \
 
 ifeq ($(BR2_PACKAGE_QEMU_SYSTEM),y)
 QEMU_OPTS += --enable-system
@@ -113,6 +114,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
+
 # Note: although QEMU uses a ./configure script, it is not compatible with
 #       the traditional autotools options (eg. --target et al.), so we have
 #       to override the default provided by the autotools-package infra, and
@@ -137,7 +146,6 @@  define QEMU_CONFIGURE_CMDS
 	        --disable-bsd-user                  \
 	        --disable-xen                       \
 	        --disable-slirp                     \
-	        --disable-sdl                       \
 	        --disable-vnc                       \
 	        --disable-virtfs                    \
 	        --disable-brlapi                    \