]> code.ossystems Code Review - openembedded-core.git/commitdiff
mesa: double check for eglplatform.h
authorValentin Popa <valentin.popa@intel.com>
Mon, 14 Apr 2014 14:51:25 +0000 (17:51 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 19 Apr 2014 09:24:36 +0000 (10:24 +0100)
Even if 'egl' is in PACKAGECONFIG, mesa egl support
can be disabled explicitly (changing configure flags
using a .bbappend, for example).
On dora, meta-fsl-arm is an example of this kind.
On master there are no known cases, and we should
encourge package configuration through PACKAGECONFIG.

This patch adds another check for the existence
of eglplatform.h before 'sed' can alter it.

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-graphics/mesa/mesa_9.1.6.bb
meta/recipes-graphics/mesa/mesa_git.bb

index 6e9cd826f01be608b2ddbec1be643b9aa147eee8..388cfd785cc88e70bb05d7c239e2bc75360644ea 100644 (file)
@@ -19,6 +19,8 @@ S = "${WORKDIR}/Mesa-${PV}"
 #make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
 do_install_append() {
     if ${@base_contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
-        sed -i -e 's/^#ifdef MESA_EGL_NO_X11_HEADERS/#if ${@base_contains('DISTRO_FEATURES', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
+        if [ -e "${D}${includedir}/EGL/eglplatform.h" ]; then
+            sed -i -e 's/^#ifdef MESA_EGL_NO_X11_HEADERS/#if ${@base_contains('DISTRO_FEATURES', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
+        fi
     fi
 }
\ No newline at end of file
index 1babcc05a9f80cb883d4b46c8fd8bfb2547e74fe..714911f81f953f7926e303e1bfef84127655eba4 100644 (file)
@@ -23,6 +23,8 @@ S = "${WORKDIR}/git"
 #make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
 do_install_append() {
     if ${@base_contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
-        sed -i -e 's/^#ifdef MESA_EGL_NO_X11_HEADERS/#if ${@base_contains('DISTRO_FEATURES', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
+        if [ -e "${D}${includedir}/EGL/eglplatform.h" ]; then
+            sed -i -e 's/^#ifdef MESA_EGL_NO_X11_HEADERS/#if ${@base_contains('DISTRO_FEATURES', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
+        fi
     fi
 }