Patchwork [08/12] mesa: enable EGL, with DRM and X11 platforms

login
register
mail settings
Submitter Ross Burton
Date Aug. 1, 2012, 12:31 p.m.
Message ID <1ceaab96512e3c370e4fe089b7217b46b914ba16.1343823907.git.ross.burton@intel.com>
Download mbox | patch
Permalink /patch/33513/
State New
Headers show

Comments

Ross Burton - Aug. 1, 2012, 12:31 p.m.
Patch originally by Damien Lespiau <damien.lespiau@intel.com>.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-graphics/mesa/mesa-common.inc |    6 +++---
 meta/recipes-graphics/mesa/mesa-dri.inc    |    5 ++++-
 2 files changed, 7 insertions(+), 4 deletions(-)

Patch

diff --git a/meta/recipes-graphics/mesa/mesa-common.inc b/meta/recipes-graphics/mesa/mesa-common.inc
index d9758b9..7963896 100644
--- a/meta/recipes-graphics/mesa/mesa-common.inc
+++ b/meta/recipes-graphics/mesa/mesa-common.inc
@@ -12,7 +12,7 @@  SECTION = "x11"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://docs/license.html;md5=03ccdc4c379c4289aecfb8892c546f67"
 
-INC_PR = "r1"
+INC_PR = "r2"
 PE = "2"
 
 
@@ -21,7 +21,7 @@  LIB_DEPS = "virtual/libx11 libxext libxxf86vm libxdamage libxfixes libxml2-nativ
 
 DEPENDS = "makedepend-native python-native flex-native bison-native ${PROTO_DEPS} ${LIB_DEPS}"
 
-PROVIDES = "virtual/libgl virtual/libgles2"
+PROVIDES = "virtual/libgl virtual/libgles2 virtual/egl"
 
 # for mesa-dri and mesa-xlib
 FILESEXTRAPATHS_append := "${THISDIR}/mesa:"
@@ -57,7 +57,7 @@  FILES_libglapi = "${libdir}/libglapi.so.*"
 FILES_libglu = "${libdir}/libGLU.so.*"
 FILES_libosmesa = "${libdir}/libOSMesa.so.*"
 
-FILES_libegl-dev = "${libdir}/libEGL.* ${includedir}/EGL"
+FILES_libegl-dev = "${libdir}/libEGL.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc"
 FILES_libgbm-dev = "${libdir}/libgbm* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h"
 FILES_libgl-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc"
 FILES_libglapi-dev = "${libdir}/libglapi.*"
diff --git a/meta/recipes-graphics/mesa/mesa-dri.inc b/meta/recipes-graphics/mesa/mesa-dri.inc
index 1d325eb..0c5682c 100644
--- a/meta/recipes-graphics/mesa/mesa-dri.inc
+++ b/meta/recipes-graphics/mesa/mesa-dri.inc
@@ -8,10 +8,13 @@  DRIDRIVERS = "swrast"
 DRIDRIVERS_append_x86 = ",i915,i965"
 DRIDRIVERS_append_x86-64 = ",i915,i965"
 
+EGL_PLATFORMS  = "drm,x11"
+
 EXTRA_OECONF += "--disable-gallium --without-gallium-drivers"
 EXTRA_OECONF += "--enable-dri --with-dri-drivers=${DRIDRIVERS}"
 EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'opengles2', '--enable-gles2', '', d)}"
-EXTRA_OECONF += "--disable-egl --enable-gbm"
+EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'egl', '--enable-egl --with-egl-platforms=${EGL_PLATFORMS}', '', d)}"
+EXTRA_OECONF += "--enable-gbm"
 
 python populate_packages_prepend() {
     dri_drivers_root = os.path.join(d.getVar('libdir', True), "dri")