summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-graphics/mesa/mesa.inc
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-graphics/mesa/mesa.inc')
-rw-r--r--poky/meta/recipes-graphics/mesa/mesa.inc60
1 files changed, 38 insertions, 22 deletions
diff --git a/poky/meta/recipes-graphics/mesa/mesa.inc b/poky/meta/recipes-graphics/mesa/mesa.inc
index f47f1aa20d..ece74974b5 100644
--- a/poky/meta/recipes-graphics/mesa/mesa.inc
+++ b/poky/meta/recipes-graphics/mesa/mesa.inc
@@ -26,7 +26,9 @@ PROVIDES = " \
inherit autotools pkgconfig python3native gettext distro_features_check
-ANY_OF_DISTRO_FEATURES = "opengl vulkan"
+BBCLASSEXTEND = "native nativesdk"
+
+ANY_OF_DISTRO_FEATURES_class-target = "opengl vulkan"
PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'drm', '', d)} \
@@ -40,26 +42,31 @@ EXTRA_OECONF = "--enable-shared-glapi \
--enable-glx-read-only-text \
PYTHON2=python2 \
--with-llvm-prefix=${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE} \
- --with-platforms='${PLATFORMS}'"
+ --with-platforms='${PLATFORMS}' \
+ --enable-autotools \
+"
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri', '', d)} \
+PACKAGECONFIG_class-target ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri gallium', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \
"
+PACKAGECONFIG_class-native ?= "gbm dri egl opengl"
+PACKAGECONFIG_class-nativesdk ?= "gbm dri egl opengl"
# "gbm" requires "dri", "opengl"
PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm"
-X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes"
+X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr"
# "x11" requires "opengl"
PACKAGECONFIG[x11] = "--enable-glx-tls,--disable-glx,${X11_DEPS}"
PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc"
PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols"
-DRIDRIVERS = "swrast"
-DRIDRIVERS_append_x86 = ",radeon,r200,nouveau,i965,i915"
-DRIDRIVERS_append_x86-64 = ",radeon,r200,nouveau,i965,i915"
+DRIDRIVERS_class-native = "swrast"
+DRIDRIVERS_class-nativesdk = "swrast"
+DRIDRIVERS_append_x86_class-target = ",radeon,r200,nouveau,i965,i915"
+DRIDRIVERS_append_x86-64_class-target = ",radeon,r200,nouveau,i965,i915"
# "dri" requires "opengl"
PACKAGECONFIG[dri] = "--enable-dri --with-dri-drivers=${DRIDRIVERS}, --disable-dri, xorgproto libdrm"
PACKAGECONFIG[dri3] = "--enable-dri3, --disable-dri3, xorgproto libxshmfence"
@@ -67,8 +74,8 @@ PACKAGECONFIG[dri3] = "--enable-dri3, --disable-dri3, xorgproto libxshmfence"
# Vulkan drivers need dri3 enabled
# radeon could be enabled as well but requires gallium-llvm with llvm >= 3.9
VULKAN_DRIVERS = ""
-VULKAN_DRIVERS_append_x86 = ",intel"
-VULKAN_DRIVERS_append_x86-64 = ",intel"
+VULKAN_DRIVERS_append_x86_class-target = ",intel"
+VULKAN_DRIVERS_append_x86-64_class-target = ",intel"
PACKAGECONFIG[vulkan] = "--with-vulkan-drivers=${VULKAN_DRIVERS}, --without-vulkan-drivers, python3-mako-native"
PACKAGECONFIG[opengl] = "--enable-opengl, --disable-opengl"
@@ -85,17 +92,21 @@ PACKAGECONFIG[imx] = ""
GALLIUMDRIVERS = "swrast"
GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'imx', ',imx', '', d)}"
-GALLIUMDRIVERS_LLVM33 = "${@bb.utils.contains('PACKAGECONFIG', 'r600', 'radeonsi,r600', '', d)}"
-PACKAGECONFIG[r600] = ""
+
+# radeonsi requires LLVM
+GALLIUMDRIVERS_LLVM33 = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}"
GALLIUMDRIVERS_LLVM33_ENABLED = "${@oe.utils.version_less_or_equal('MESA_LLVM_RELEASE', '3.2', False, len('${GALLIUMDRIVERS_LLVM33}') > 0, d)}"
GALLIUMDRIVERS_LLVM = "r300,svga,nouveau${@',${GALLIUMDRIVERS_LLVM33}' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
-GALLIUMDRIVERS_append_x86 = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
-GALLIUMDRIVERS_append_x86-64 = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
-GALLIUMDRIVERS_append_x86 = ",virgl"
-GALLIUMDRIVERS_append_x86-64 = ",virgl"
+
+PACKAGECONFIG[r600] = ""
+
+GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
+GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600', '', d)}"
+GALLIUMDRIVERS_append = ",virgl"
+
# keep --with-gallium-drivers separate, because when only one of gallium versions is enabled, other 2 were adding --without-gallium-drivers
-PACKAGECONFIG[gallium] = "--enable-texture-float --with-gallium-drivers=${GALLIUMDRIVERS}, --without-gallium-drivers"
-MESA_LLVM_RELEASE ?= "6.0"
+PACKAGECONFIG[gallium] = "--with-gallium-drivers=${GALLIUMDRIVERS}, --without-gallium-drivers"
+MESA_LLVM_RELEASE ?= "8.0.0"
PACKAGECONFIG[gallium-llvm] = "--enable-llvm --enable-llvm-shared-libs, --disable-llvm, llvm${MESA_LLVM_RELEASE} llvm-native \
${@'elfutils' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}"
@@ -141,6 +152,7 @@ do_install_append () {
rm -f ${D}${libdir}/gallium-pipe/*.la
rm -f ${D}${libdir}/gbm/*.la
+ # it was packaged in libdricore9.1.3-1 and preventing upgrades when debian.bbclass was used
chrpath --delete ${D}${libdir}/dri/*_dri.so || true
# libwayland-egl has been moved to wayland 1.15+
@@ -192,7 +204,7 @@ python mesa_populate_packages() {
dri_pkgs = os.listdir(dri_drivers_root)
lib_name = d.expand("${MLPREFIX}mesa-megadriver")
for p in dri_pkgs:
- m = re.match('^(.*)_dri\.so$', p)
+ m = re.match(r'^(.*)_dri\.so$', p)
if m:
pkg_name = " ${MLPREFIX}mesa-driver-%s" % legitimize_package_name(m.group(1))
d.appendVar("RPROVIDES_%s" % lib_name, pkg_name)
@@ -200,15 +212,14 @@ python mesa_populate_packages() {
d.appendVar("RREPLACES_%s" % lib_name, pkg_name)
pipe_drivers_root = os.path.join(d.getVar('libdir'), "gallium-pipe")
- do_split_packages(d, pipe_drivers_root, '^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='')
+ do_split_packages(d, pipe_drivers_root, r'^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='')
}
PACKAGESPLITFUNCS_prepend = "mesa_populate_packages "
PACKAGES_DYNAMIC += "^mesa-driver-.*"
-FILES_${PN} = ""
-FILES_mesa-megadriver = "${libdir}/dri/* ${sysconfdir}"
+FILES_mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d/00-mesa-defaults.conf"
FILES_mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${datadir}/vulkan"
FILES_libegl-mesa = "${libdir}/libEGL.so.*"
FILES_libgbm = "${libdir}/libgbm.so.*"
@@ -231,3 +242,8 @@ FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}
FILES_libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \
${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \
${libdir}/pkgconfig/xatracker.pc"
+
+# Fix upgrade path from mesa to mesa-megadriver
+RREPLACES_mesa-megadriver = "mesa"
+RCONFLICTS_mesa-megadriver = "mesa"
+RPROVIDES_mesa-megadriver = "mesa"