]> code.ossystems Code Review - openembedded-core.git/commitdiff
qemu_git: Ensure we have the required dependencies for a native build
authorJoshua Lock <josh@linux.intel.com>
Thu, 15 Apr 2010 14:41:44 +0000 (15:41 +0100)
committerJoshua Lock <josh@linux.intel.com>
Thu, 15 Apr 2010 16:49:49 +0000 (17:49 +0100)
qemu-native requires a libGL and the SDL development headers to build with our
GL "emulation". This patch adds a check before configure for the native package
to ensure that the sdl.pc file and GL so files exist and bombs out otherwise.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
meta/packages/qemu/qemu_git.bb

index 98fdc7c7d593d29dfbc9d92cf3839473e176eea9..e9129649a870ff4e52daf707d1e57b7870e0b4cd 100644 (file)
@@ -1,7 +1,7 @@
 LICENSE = "GPL"
 DEPENDS = "zlib"
 PV = "0.10.6+git${SRCREV}"
-PR = "r2"
+PR = "r3"
 
 FILESPATH = "${FILE_DIRNAME}/qemu-${PV}/:${FILE_DIRNAME}/qemu-git/"
 
@@ -23,6 +23,23 @@ EXTRA_OECONF = "--target-list=arm-linux-user,arm-softmmu,i386-softmmu,x86_64-sof
 
 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/pkgconfig/sdl.pc -o -e /usr/lib64/pkgconfig/sdl.pc && 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"
+       exit 1;
+    fi
+}
+
 do_configure() {
     ${S}/configure --prefix=${prefix} ${EXTRA_OECONF}
     chmod a+x ${S}/target-i386/beginend_funcs.sh