[meta-intel] [PATCH 5/5] mesa: make the recipe MACHINE independent
nitin.a.kamble at intel.com
nitin.a.kamble at intel.com
Wed Sep 4 20:38:24 PDT 2013
From: Nitin A Kamble <nitin.a.kamble at intel.com>
This avoids rebuilding of the recipe when a different MACHINE is
selected with the same arch.
Fixes bug:
[YOCTO #5120]
Signed-off-by: Nitin A Kamble <nitin.a.kamble at intel.com>
---
common/recipes-graphics/mesa/mesa_9.1.6.bbappend | 64 ++++++++++++++++--------
1 file changed, 44 insertions(+), 20 deletions(-)
diff --git a/common/recipes-graphics/mesa/mesa_9.1.6.bbappend b/common/recipes-graphics/mesa/mesa_9.1.6.bbappend
index b92831d..0fe5534 100644
--- a/common/recipes-graphics/mesa/mesa_9.1.6.bbappend
+++ b/common/recipes-graphics/mesa/mesa_9.1.6.bbappend
@@ -1,24 +1,48 @@
-
# 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.
+# To avoid conflict do not populate sysroot with egl, gles1, gles2 files
+# from mesa-dri if the BSP image is bundling the emgd driver.
+
+STAGING_HOLD_DIR="${WORKDIR}/staging_hold"
-python __anonymous () {
- import re
- xserver = d.getVar('XSERVER', True)
- if xserver and '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)
+FILES_SKIP_POPULATE_SYSROOT="${libdir}/libGLESv2.so.2 \
+ ${libdir}/libEGL.so.1 \
+ ${libdir}/libGLESv2.so \
+ ${libdir}/libEGL.so \
+ ${libdir}/pkgconfig/egl.pc \
+ ${libdir}/pkgconfig/glesv2.pc \
+ ${includedir}/KHR/khrplatform.h \
+ ${includedir}/GLES/glext.h \
+ ${includedir}/GLES/glplatform.h \
+ ${includedir}/GLES/gl.h \
+ ${includedir}/EGL/eglext.h \
+ ${includedir}/EGL/eglplatform.h \
+ ${includedir}/EGL/egl.h \
+ ${includedir}/GLES2/gl2.h \
+ ${includedir}/GLES2/gl2platform.h \
+ ${includedir}/GLES2/gl2ext.h \
+ "
- d.setVar('EXTRA_OECONF', ' '.join(new_extra_oeconf))
- depends = d.getVar('DEPENDS', True)
- d.setVar('DEPENDS', depends + " emgd-driver-bin")
+# move away some files before populate_sysroot
+do_pre_populate_sysroot () {
+ if [[ "${XSERVER}" =~ "emgd-driver-bin" ]]; then
+ mkdir -p ${STAGING_HOLD_DIR}
+ for i in ${FILES_SKIP_POPULATE_SYSROOT}
+ do
+ mkdir -p ${STAGING_HOLD_DIR}/`dirname ${i}`
+ mv ${D}/${i} ${STAGING_HOLD_DIR}/${i}
+ done
+ fi
}
+
+# move back the files for do_package
+do_post_populate_sysroot () {
+ if [[ "${XSERVER}" =~ "emgd-driver-bin" ]]; then
+ for i in ${FILES_SKIP_POPULATE_SYSROOT}
+ do
+ mv ${STAGING_HOLD_DIR}/${i} ${D}/${i}
+ done
+ fi
+}
+
+addtask pre_populate_sysroot after do_install before do_populate_sysroot
+addtask post_populate_sysroot after do_populate_sysroot before do_package
--
1.8.1.4
More information about the meta-intel
mailing list