mesa: double check for eglplatform.h
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. (From OE-Core rev: 97bc1bce9a226cc02db8a5afc2c0d4f4f70034a6) Signed-off-by: Valentin Popa <valentin.popa@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
99f46fd25c
commit
c65c136746
|
@ -19,6 +19,8 @@ S = "${WORKDIR}/Mesa-${PV}"
|
||||||
#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
|
#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
|
||||||
do_install_append() {
|
do_install_append() {
|
||||||
if ${@base_contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
|
if ${@base_contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
|
||||||
|
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
|
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
|
||||||
|
fi
|
||||||
}
|
}
|
|
@ -23,6 +23,8 @@ S = "${WORKDIR}/git"
|
||||||
#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
|
#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
|
||||||
do_install_append() {
|
do_install_append() {
|
||||||
if ${@base_contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
|
if ${@base_contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
|
||||||
|
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
|
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
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue