summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu-0.15.1/opengl-disable-option.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu-0.15.1/opengl-disable-option.patch')
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.15.1/opengl-disable-option.patch137
1 files changed, 0 insertions, 137 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-0.15.1/opengl-disable-option.patch b/meta/recipes-devtools/qemu/qemu-0.15.1/opengl-disable-option.patch
deleted file mode 100644
index 8dc272a926..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.15.1/opengl-disable-option.patch
+++ /dev/null
@@ -1,137 +0,0 @@
1Add an option gl-accel to disable GL acceleration:
2* When enabled, configure try best to enable GL acceleration and fail when
3 missing host dependency(libSDL and libGL), which is the default.
4* When disabled, end user choose to turn off GL capability, thus remove the
5 host dependence in building.
6
7Upstream-Status: Inappropriate [other] - depends on GL patch
8
9Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
10
11Index: qemu-0.15.1/Makefile.target
12===================================================================
13--- qemu-0.15.1.orig/Makefile.target 2012-05-29 11:20:04.000000000 +0800
14+++ qemu-0.15.1/Makefile.target 2012-05-29 11:20:04.000000000 +0800
15@@ -80,13 +80,16 @@
16 endif
17 libobj-$(CONFIG_NEED_MMU) += mmu.o
18 ifndef CONFIG_LINUX_USER
19+ifdef CONFIG_GL_ACCEL
20 libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
21 libobj-$(TARGET_X86_64) += helper_opengl.o opengl_exec.o
22 else
23-ifdef CONFIG_SDL
24 libobj-$(TARGET_I386) += dummygl.o
25 libobj-$(TARGET_X86_64) += dummygl.o
26-endif
27+endif #CONFIG_GL_ACCEL
28+else
29+libobj-$(TARGET_I386) += dummygl.o
30+libobj-$(TARGET_X86_64) += dummygl.o
31 endif #CONFIG_LINUX_USER
32 libobj-$(TARGET_ARM) += dummygl.o
33 libobj-$(TARGET_MIPS) += dummygl.o
34@@ -262,8 +265,10 @@
35 obj-i386-$(CONFIG_SPICE) += qxl.o qxl-logger.o qxl-render.o
36
37 ifeq ($(TARGET_BASE_ARCH), i386)
38+ifdef CONFIG_GL_ACCEL
39 QEMU_CFLAGS += -DTARGET_OPENGL_OK
40 endif
41+endif
42
43 # shared objects
44 obj-ppc-y = ppc.o
45@@ -409,8 +414,6 @@
46
47 monitor.o: hmp-commands.h qmp-commands.h
48
49-LIBS += -lGL -lGLU
50-
51 $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
52
53 obj-y += $(addprefix ../, $(common-obj-y))
54Index: qemu-0.15.1/configure
55===================================================================
56--- qemu-0.15.1.orig/configure 2012-05-29 11:20:03.000000000 +0800
57+++ qemu-0.15.1/configure 2012-05-29 11:20:04.000000000 +0800
58@@ -2021,6 +2021,39 @@
59 fi
60 fi
61
62+#####################################################
63+# GL acceleration probe depending on gl, glu and sdl
64+if test "$gl_accel" != "no" ; then
65+ if test "$sdl" = "no" ; then
66+ gl_accel=no
67+ echo "libSDL and header no found to build opengl acceleration for qemu-native.
68+ Ubuntu package names are: libsdl1.2-dev.
69+ Fedora package names are: SDL-devel."
70+ exit 1;
71+ fi
72+
73+ gl_accel_libs="-lGL -lGLU"
74+ cat > $TMPC << EOF
75+#include <X11/Xlib.h>
76+#include <GL/gl.h>
77+#include <GL/glx.h>
78+#include <GL/glu.h>
79+int main(void) { GL_VERSION; return 0; }
80+EOF
81+ if compile_prog "" "-lGL -lGLU" ; then
82+ gl_accel=yes
83+ libs_softmmu="$gl_accel_libs $libs_softmmu"
84+ else
85+ feature_not_found "gl_accel"
86+ gl_accel=no
87+ gl_accel_libs=
88+ echo "libGL.so and libGLU.so not found to build opengl acceleration for qemu-native.
89+ Ubuntu package names are: libgl1-mesa-dev, libglu1-mesa-dev and libsdl1.2-dev.
90+ Fedora package names are: mesa-libGL mesa-libGLU SDL-devel."
91+ exit 1;
92+ fi
93+fi
94+
95 #
96 # Check for xxxat() functions when we are building linux-user
97 # emulator. This is done because older glibc versions don't
98@@ -2722,6 +2755,7 @@
99 echo "nss used $smartcard_nss"
100 echo "usb net redir $usb_redir"
101 echo "OpenGL support $opengl"
102+echo "GL acceleration support $gl_accel"
103 echo "build guest agent $guest_agent"
104
105 if test $sdl_too_old = "yes"; then
106@@ -3025,6 +3059,10 @@
107 echo "CONFIG_OPENGL=y" >> $config_host_mak
108 fi
109
110+if test "$gl_accel" = "yes" ; then
111+ echo "CONFIG_GL_ACCEL=y" >> $config_host_mak
112+fi
113+
114 # XXX: suppress that
115 if [ "$bsd" = "yes" ] ; then
116 echo "CONFIG_BSD=y" >> $config_host_mak
117Index: qemu-0.15.1/qemu-char.c
118===================================================================
119--- qemu-0.15.1.orig/qemu-char.c 2012-05-29 11:20:03.000000000 +0800
120+++ qemu-0.15.1/qemu-char.c 2012-05-29 11:20:04.000000000 +0800
121@@ -2387,7 +2387,6 @@
122 return d->outbuf_size;
123 }
124
125-#define TARGET_OPENGL_OK
126 #if defined(TARGET_OPENGL_OK)
127 static uint8_t buffer[32];
128 static int buffer_len;
129@@ -2447,7 +2446,7 @@
130 return chr;
131 }
132 #else
133-#define qemu_chr_open_opengl() 0
134+#define qemu_chr_open_opengl NULL
135 #endif
136
137 QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)