diff --git a/meta/recipes-graphics/mesa/mesa_9.1.6.bb b/meta/recipes-graphics/mesa/mesa_9.1.6.bb index 6e9cd826f0..388cfd785c 100644 --- a/meta/recipes-graphics/mesa/mesa_9.1.6.bb +++ b/meta/recipes-graphics/mesa/mesa_9.1.6.bb @@ -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 diff --git a/meta/recipes-graphics/mesa/mesa_git.bb b/meta/recipes-graphics/mesa/mesa_git.bb index 1babcc05a9..714911f81f 100644 --- a/meta/recipes-graphics/mesa/mesa_git.bb +++ b/meta/recipes-graphics/mesa/mesa_git.bb @@ -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 }