diff options
author | Zhai Edwin <edwin.zhai@intel.com> | 2012-05-29 16:30:33 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-30 12:04:48 +0100 |
commit | d63298e566324cf4cc4fa457348fdce56615ecf6 (patch) | |
tree | f30baf14775837eb2d2c3113c3fc5d9793fa1de7 /meta/recipes-devtools/qemu/qemu.inc | |
parent | 7a619c235f17a2e55b25d7e12984bfb61ec964fb (diff) | |
download | poky-d63298e566324cf4cc4fa457348fdce56615ecf6.tar.gz |
qemu: Add an option to remove host sdl/gl checking
Add an PACKAGECONFIG in qemu to disable GL acceleration:
* By default configure try best to enable GL acceleration and fail when missing
host dependency(libSDL and libGL).
* End user can also choose to turn off GL capability, thus remove the host
dependence in building.
[YOCTO #2407] got fixed.
(From OE-Core rev: cfa93553e17057a1ea9d81e3a415fc8260c54067)
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu.inc')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu.inc | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index 2038651cb7..e618c1d6e1 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc | |||
@@ -19,26 +19,6 @@ EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --di | |||
19 | 19 | ||
20 | inherit autotools | 20 | inherit autotools |
21 | 21 | ||
22 | # For our gl powered QEMU you need libGL and SDL headers | ||
23 | do_configure_prepend_virtclass-native() { | ||
24 | libgl='no' | ||
25 | libsdl='no' | ||
26 | |||
27 | test -e /usr/lib/libGL.so -a -e /usr/lib/libGLU.so && libgl='yes' | ||
28 | test -e /usr/lib64/libGL.so -a -e /usr/lib64/libGLU.so && libgl='yes' | ||
29 | test -e /usr/lib/*-linux-gnu/libGL.so -a -e /usr/lib/*-linux-gnu/libGLU.so && libgl='yes' | ||
30 | |||
31 | test -e /usr/lib/pkgconfig/sdl.pc -o -e /usr/lib64/pkgconfig/sdl.pc -o -e /usr/include/SDL/SDL.h && libsdl='yes' | ||
32 | |||
33 | |||
34 | if [ "$libsdl" != 'yes' -o "$libgl" != 'yes' ]; then | ||
35 | echo "You need libGL.so and libGLU.so to exist in your library path and the development headers for SDL installed to build qemu-native. | ||
36 | Ubuntu package names are: libgl1-mesa-dev, libglu1-mesa-dev and libsdl1.2-dev. | ||
37 | Fedora package names are: mesa-libGL mesa-libGLU SDL-devel." | ||
38 | exit 1; | ||
39 | fi | ||
40 | } | ||
41 | |||
42 | do_configure() { | 22 | do_configure() { |
43 | # Handle distros such as CentOS 5 32-bit that do not have kvm support | 23 | # Handle distros such as CentOS 5 32-bit that do not have kvm support |
44 | KVMOPTS="--disable-kvm" | 24 | KVMOPTS="--disable-kvm" |
@@ -57,6 +37,9 @@ do_install () { | |||
57 | install -m 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu | 37 | install -m 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu |
58 | } | 38 | } |
59 | 39 | ||
40 | PACKAGECONFIG ??= "gl" | ||
41 | PACKAGECONFIG[gl] = "--enable-gl-accel,--disable-gl-accel,," | ||
42 | |||
60 | DEPENDS_virtclass-native = "zlib-native alsa-lib-native glib-2.0-native" | 43 | DEPENDS_virtclass-native = "zlib-native alsa-lib-native glib-2.0-native" |
61 | DEPENDS_virtclass-nativesdk = "zlib-nativesdk libsdl-nativesdk glib-2.0-nativesdk \ | 44 | DEPENDS_virtclass-nativesdk = "zlib-nativesdk libsdl-nativesdk glib-2.0-nativesdk \ |
62 | ${@base_contains('DISTRO_FEATURES', 'x11', 'qemugl-nativesdk', '', d)}" | 45 | ${@base_contains('DISTRO_FEATURES', 'x11', 'qemugl-nativesdk', '', d)}" |