From d63298e566324cf4cc4fa457348fdce56615ecf6 Mon Sep 17 00:00:00 2001 From: Zhai Edwin Date: Tue, 29 May 2012 16:30:33 +0800 Subject: 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 Signed-off-by: Richard Purdie --- meta/recipes-devtools/qemu/qemu.inc | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'meta/recipes-devtools/qemu/qemu.inc') 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 inherit autotools -# For our gl powered QEMU you need libGL and SDL headers -do_configure_prepend_virtclass-native() { - libgl='no' - libsdl='no' - - test -e /usr/lib/libGL.so -a -e /usr/lib/libGLU.so && libgl='yes' - test -e /usr/lib64/libGL.so -a -e /usr/lib64/libGLU.so && libgl='yes' - test -e /usr/lib/*-linux-gnu/libGL.so -a -e /usr/lib/*-linux-gnu/libGLU.so && libgl='yes' - - test -e /usr/lib/pkgconfig/sdl.pc -o -e /usr/lib64/pkgconfig/sdl.pc -o -e /usr/include/SDL/SDL.h && libsdl='yes' - - - if [ "$libsdl" != 'yes' -o "$libgl" != 'yes' ]; then - 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. - Ubuntu package names are: libgl1-mesa-dev, libglu1-mesa-dev and libsdl1.2-dev. - Fedora package names are: mesa-libGL mesa-libGLU SDL-devel." - exit 1; - fi -} - do_configure() { # Handle distros such as CentOS 5 32-bit that do not have kvm support KVMOPTS="--disable-kvm" @@ -57,6 +37,9 @@ do_install () { install -m 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu } +PACKAGECONFIG ??= "gl" +PACKAGECONFIG[gl] = "--enable-gl-accel,--disable-gl-accel,," + DEPENDS_virtclass-native = "zlib-native alsa-lib-native glib-2.0-native" DEPENDS_virtclass-nativesdk = "zlib-nativesdk libsdl-nativesdk glib-2.0-nativesdk \ ${@base_contains('DISTRO_FEATURES', 'x11', 'qemugl-nativesdk', '', d)}" -- cgit v1.2.3-54-g00ecf