mesa-dri.bbappend: avoid conflict with emgd-driver-bin

Extend the mesa-dri recipe from oecore to avoid conflict with
files generated by emgd-driver-bin recipe.

This extention is needed only when emgd-driver-bin recipe is
included in the target image, so the code is conditional to
run only on the machine with emgd graphics driver.

The emgd binary driver also provides egl, gles1, gles2 library & headers.
To avoid conflict disable egl, gles1, gles2 from meta-dri if the BSP image
is bundling the emgd driver.

This commits avoids these build warning

WARNING: The recipe is trying to install files into a shared area when those files already exist. Those files are:
   /srv/home/nitin/build-test-bsps/build-crownbay/tmp/sysroots/crownbay/usr/include/KHR/khrplatform.h
   /srv/home/nitin/build-test-bsps/build-crownbay/tmp/sysroots/crownbay/usr/include/EGL/eglplatform.h
   /srv/home/nitin/build-test-bsps/build-crownbay/tmp/sysroots/crownbay/usr/include/EGL/eglext.h
   /srv/home/nitin/build-test-bsps/build-crownbay/tmp/sysroots/crownbay/usr/include/EGL/egl.h
   /srv/home/nitin/build-test-bsps/build-crownbay/tmp/sysroots/crownbay/usr/include/GLES/glplatform.h
   /srv/home/nitin/build-test-bsps/build-crownbay/tmp/sysroots/crownbay/usr/include/GLES/gl.h
   /srv/home/nitin/build-test-bsps/build-crownbay/tmp/sysroots/crownbay/usr/include/GLES/glext.h
   /srv/home/nitin/build-test-bsps/build-crownbay/tmp/sysroots/crownbay/usr/include/GLES2/gl2ext.h
   /srv/home/nitin/build-test-bsps/build-crownbay/tmp/sysroots/crownbay/usr/include/GLES2/gl2.h
   /srv/home/nitin/build-test-bsps/build-crownbay/tmp/sysroots/crownbay/usr/include/GLES2/gl2platform.h

And revert the replacement change commited earlier to avoid these warnings.
  Revert "mesa-dri.bbappend: avoid buildtime warnings"
  This reverts commit 2408d28972.

This fixes the bug:
[YOCTO #3295]

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
This commit is contained in:
Nitin A Kamble 2012-10-30 14:38:34 -07:00 committed by Tom Zanussi
parent e215e3fb61
commit 1a5ab65544

View File

@ -1,5 +1,24 @@
# Temporary avoid warnings of duplicate files providers until
# mesa-dri & emgd-driver-bin recipes are fixed
SSTATE_DUPWHITELIST += "${STAGING_INCDIR}/KHR ${STAGING_INCDIR}/EGL \
${STAGING_INCDIR}/GLES ${STAGING_INCDIR}/GLES2"
# The emgd binary driver also provides egl, gles1, gles2 library & headers.
# To avoid conflict disable egl, gles1, gles2 from meta-dri if the BSP image
# is bundling the emgd driver.
python __anonymous () {
import re
xserver = d.getVar('XSERVER', True)
if 'emgd-driver-bin' in xserver.split(' '):
extra_oeconf = d.getVar('EXTRA_OECONF', True).split()
take_out = ["--enable-egl", "--enable-gles1", "--enable-gles2"]
put_in = ["--disable-egl", "--disable-gles1", "--disable-gles2"]
pattern = re.compile("--with-egl-platforms")
new_extra_oeconf = [ ]
for i in extra_oeconf:
if ( i not in take_out ) and ( not pattern.match(i)):
new_extra_oeconf.append(i)
for i in put_in:
new_extra_oeconf.append(i)
d.setVar('EXTRA_OECONF', ' '.join(new_extra_oeconf))
depends = d.getVar('DEPENDS', True)
d.setVar('DEPENDS', depends + " emgd-driver-bin")
}