Skip to contentSkip to conversation

mesa: add virtual/mesa provider

PATCH New Ross Burton 1 participant 4 messages Sep 16, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/4 mesa: add virtual/mesa provider

As there are two alternative mesa recipes (mesa and mesa-gl), there needs to be a virtual provider that recipes that explicitly need Mesa (such as xserver-xorg) can depend on.

---
 meta/conf/distro/include/default-providers.inc |    1 +
 meta/recipes-graphics/mesa/mesa.inc            |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
meta/conf/distro/include/default-providers.inc +1 -0
index a804089..d4b9db0 100644
@@ -9,6 +9,7 @@ PREFERRED_PROVIDER_virtual/egl ?= "mesa"
 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
 PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
 PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
+PREFERRED_PROVIDER_virtual/mesa ?= "mesa"
 PREFERRED_PROVIDER_virtual/update-alternatives ?= "opkg"
 PREFERRED_PROVIDER_virtual/update-alternatives-native ?= "opkg-native"
 PREFERRED_PROVIDER_virtual/libx11 ?= "libx11"
meta/recipes-graphics/mesa/mesa.inc +1 -1
index 79605fa..afc795c 100644
@@ -17,7 +17,7 @@ PE = "2"
 
 DEPENDS = "expat makedepend-native flex-native bison-native"
 
-PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl"
+PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl virtual/mesa"
 
 inherit autotools pkgconfig pythonnative gettext distro_features_check
 
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v2 2/4 mesa-gl: add GL-only Mesa recipe

Some machines have hardware-specific GL drivers that do EGL and GLES (many ARM boards). Others have their own EGL/GLES drivers and provide a Mesa DRI driver (EMGD). Previously adding Mesa, for software GL/GLX rendering in the first case and hardware GLX in the second, involved bbappends and changing Mesa to be machine-specific.

By adding a just-GL Mesa the machine definition can combine it with the hardware drivers cleanly.

---
 meta/conf/distro/include/security_flags.inc   |    1 +
 meta/conf/distro/include/seperatebuilddir.inc |    1 +
 meta/recipes-graphics/mesa/mesa-gl_9.1.6.bb   |   11 +++++++++++
 3 files changed, 13 insertions(+)
 create mode 100644 meta/recipes-graphics/mesa/mesa-gl_9.1.6.bb
meta/conf/distro/include/security_flags.inc +1 -0
index 2858e46..e313be6 100644
@@ -28,6 +28,7 @@ SECURITY_CFLAGS_pn-libgcc = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-libglu = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-libpcre = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-mesa = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-mesa-gl = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-opensp = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-ppp = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python = "${SECURITY_NO_PIE_CFLAGS}"
meta/conf/distro/include/seperatebuilddir.inc +1 -0
index 5bd0ab4..21d828f 100644
@@ -442,6 +442,7 @@ B_pn-menu-cache = "${SEPB}"
 B_pn-mesa-demos = "${SEPB}"
 # src/mapi/mapi/stub.c:51:39: error: 'MAPI_TABLE_NUM_DYNAMIC' undeclared here (not in a function)
 B_pn-mesa = "${SEPB}"
+B_pn-mesa-gl = "${SEPB}"
 B_pn-minicom = "${SEPB}"
 # Not automake, no external tree support
 #B_pn-mkelfimage = "${SEPB}"
meta/recipes-graphics/mesa/mesa-gl_9.1.6.bb new file +11 -0
new file mode 100644
index 0000000..0e9dbb5
@@ -0,0 +1,11 @@
+require mesa_${PV}.bb
+
+SUMMARY += " (OpenGL only, no EGL/GLES)"
+
+FILESPATH = "${FILE_DIRNAME}/mesa-${PV}:${FILE_DIRNAME}/mesa"
+
+PROVIDES = "virtual/libgl virtual/mesa"
+
+PACKAGECONFIG ??= "dri ${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+
+EXCLUDE_FROM_WORLD = "1"
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH v2 3/4 xserver-xorg: change mesa dependency to virtual/mesa

In reply to Ross Burton
---
 meta/recipes-graphics/xorg-xserver/xserver-xorg.inc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/xorg-xserver/xserver-xorg.inc +1 -1
index ab8171c..969b84e 100644
@@ -124,7 +124,7 @@ EXTRA_OECONF += "--with-fop=no \
 
 PACKAGECONFIG ??= "udev ${@base_contains('DISTRO_FEATURES', 'opengl', 'dri dri2 glx', '', d)}"
 PACKAGECONFIG[udev] = "--enable-config-udev,--disable-config-udev,udev"
-PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,glproto mesa xf86driproto"
+PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,glproto virtual/mesa xf86driproto"
 PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2,dri2proto"
 PACKAGECONFIG[glx] = "--enable-glx --enable-glx-tls,--disable-glx,glproto virtual/libgl virtual/libx11"
 
Signature · 1 line
1.7.10.4
#3 lore raw

PATCH v2 4/4 weston: change mesa dependency to virtual/mesa

In reply to Ross Burton
---
 meta/recipes-graphics/wayland/weston_1.1.0.bb |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/wayland/weston_1.1.0.bb +1 -1
index b765f65..8280bf2 100644
@@ -18,7 +18,7 @@ SRC_URI[sha256sum] = "e7715d2c731f77a729c994a599ffdaebac1307b2dd9336136706869fa5
 inherit autotools pkgconfig useradd
 
 DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
-DEPENDS += "wayland mesa virtual/egl pango"
+DEPENDS += "wayland virtual/mesa virtual/egl pango"
 
 EXTRA_OECONF = "--disable-android-compositor \
                 --enable-setuid-install \
Signature · 1 line
1.7.10.4