aboutsummaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3/recipes-graphics/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'meta-rcar-gen3/recipes-graphics/mesa')
-rw-r--r--meta-rcar-gen3/recipes-graphics/mesa/mesa-dummy.inc0
-rw-r--r--meta-rcar-gen3/recipes-graphics/mesa/mesa-wayland.inc36
-rw-r--r--meta-rcar-gen3/recipes-graphics/mesa/mesa_11.%.bbappend10
3 files changed, 46 insertions, 0 deletions
diff --git a/meta-rcar-gen3/recipes-graphics/mesa/mesa-dummy.inc b/meta-rcar-gen3/recipes-graphics/mesa/mesa-dummy.inc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/meta-rcar-gen3/recipes-graphics/mesa/mesa-dummy.inc
diff --git a/meta-rcar-gen3/recipes-graphics/mesa/mesa-wayland.inc b/meta-rcar-gen3/recipes-graphics/mesa/mesa-wayland.inc
new file mode 100644
index 0000000..660cde3
--- /dev/null
+++ b/meta-rcar-gen3/recipes-graphics/mesa/mesa-wayland.inc
@@ -0,0 +1,36 @@
+# FIXME: can not override PACKAGECONFIG.
+PACKAGECONFIG[gles] = "--enable-gles1 --disable-gles2"
+PACKAGECONFIG[egl] = "--enable-egl --with-egl-platforms=wayland"
+
+# Disable the gbm modules of mesa
+PACKAGECONFIG_remove = "gbm"
+
+# Remove the gbm and egl packages. These are provided in other recipes.
+PACKAGES_remove = " \
+ libgbm-dev libgbm \
+ libegl-mesa-dev libegl-mesa \
+ libegl-dev libegl \
+ libgles2-mesa libgles2-mesa-dev \
+"
+INSTALLED_HEADER = "src/egl/wayland/wayland-egl/wayland-egl-priv.h"
+
+do_install_append() {
+ # Remove libegl-mesa modules and headers
+ rm -f ${D}/${libdir}/libEGL.la
+ rm -f ${D}/${libdir}/libEGL.so*
+ rm -f ${D}/${libdir}/pkgconfig/egl.pc
+ rm -rf ${D}/${includedir}/EGL
+ rm -rf ${D}/${includedir}/KHR
+
+ # For Qt environment
+ install -Dm 644 ${S}/include/EGL/eglmesaext.h ${D}/${includedir}/EGL/eglmesaext.h
+
+ # install required header for wayland
+ install -d ${D}/usr/include
+ install -m 644 ${S}/${INSTALLED_HEADER} ${D}/usr/include/
+}
+
+FILES_libwayland-egl-dev += " \
+ /usr/include \
+ /usr/include/*.h \
+"
diff --git a/meta-rcar-gen3/recipes-graphics/mesa/mesa_11.%.bbappend b/meta-rcar-gen3/recipes-graphics/mesa/mesa_11.%.bbappend
new file mode 100644
index 0000000..e1b7ad2
--- /dev/null
+++ b/meta-rcar-gen3/recipes-graphics/mesa/mesa_11.%.bbappend
@@ -0,0 +1,10 @@
+require include/gles-control.inc
+
+def map_libs(d):
+ if base_conditional('USE_GLES_WAYLAND', "1", "1", "0", d) == "1":
+ return "wayland"
+
+ return "dummy"
+
+MESATARGET := "${@map_libs(d)}"
+include mesa-${MESATARGET}.inc