diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc')
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc | 62 |
1 files changed, 42 insertions, 20 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc index 25cbf631a..4f31ed255 100644 --- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc +++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc @@ -10,47 +10,64 @@ HOMEPAGE = "http://mesa3d.org" BUGTRACKER = "https://bugs.freedesktop.org" SECTION = "x11" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://docs/license.html;md5=899fbe7e42d494c7c8c159c7001693d5" +LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c4" PE = "2" -DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native" - +DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native" +EXTRANATIVEPATH += "chrpath-native" PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl virtual/mesa" -inherit autotools pkgconfig pythonnative gettext distro_features_check +inherit autotools pkgconfig gettext distro_features_check + +ANY_OF_DISTRO_FEATURES = "opengl vulkan" -REQUIRED_DISTRO_FEATURES = "opengl" +PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'drm', '', d)}" -export LLVM_CONFIG = "${STAGING_BINDIR_CROSS}/llvm-config" -EXTRA_OECONF = "--enable-shared-glapi" +export LLVM_CONFIG = "${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE}" +export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE}/llvm-config" +EXTRA_OECONF = "--enable-shared-glapi \ + --disable-opencl \ + --with-llvm-prefix=${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE} \ + --with-platforms='${PLATFORMS}'" -PACKAGECONFIG ??= "gbm egl gles dri \ - ${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)} \ - " +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \ + " + +# "gbm" requires "dri", "opengl" PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm" X11_DEPS = "xf86driproto glproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes" +# "x11" requires "opengl" PACKAGECONFIG[x11] = "--enable-glx-tls,--disable-glx,${X11_DEPS}" PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc" -PACKAGECONFIG[wayland] = ",,wayland-native wayland" +PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm" DRIDRIVERS = "swrast" DRIDRIVERS_append_x86 = ",radeon,r200,nouveau,i965,i915" DRIDRIVERS_append_x86-64 = ",radeon,r200,nouveau,i965,i915" +# "dri" requires "opengl" PACKAGECONFIG[dri] = "--enable-dri --with-dri-drivers=${DRIDRIVERS}, --disable-dri, dri2proto libdrm" PACKAGECONFIG[dri3] = "--enable-dri3, --disable-dri3, dri3proto presentproto libxshmfence" # Vulkan drivers need dri3 enabled # radeon could be enabled as well but requires gallium-llvm with llvm >= 3.9 -PACKAGECONFIG[vulkan] = "--with-vulkan-drivers=intel, --without-vulkan-drivers" +VULKAN_DRIVERS = "" +VULKAN_DRIVERS_append_x86 = ",intel" +VULKAN_DRIVERS_append_x86-64 = ",intel" +PACKAGECONFIG[vulkan] = "--with-vulkan-drivers=${VULKAN_DRIVERS}, --without-vulkan-drivers" + +PACKAGECONFIG[opengl] = "--enable-opengl, --disable-opengl" +# "gles" requires "opengl" PACKAGECONFIG[gles] = "--enable-gles1 --enable-gles2, --disable-gles1 --disable-gles2" -EGL_PLATFORMS = "drm" -EGL_PLATFORMS .="${@bb.utils.contains('PACKAGECONFIG', 'x11', ',x11', '', d)}" -EGL_PLATFORMS .="${@bb.utils.contains('PACKAGECONFIG', 'wayland', ',wayland', '', d)}" -PACKAGECONFIG[egl] = "--enable-egl --with-egl-platforms=${EGL_PLATFORMS}, --disable-egl" +# "egl" requires "dri", "opengl" +PACKAGECONFIG[egl] = "--enable-egl, --disable-egl" PACKAGECONFIG[etnaviv] = "" PACKAGECONFIG[imx] = "" @@ -65,9 +82,9 @@ GALLIUMDRIVERS_LLVM = "r300,svga,nouveau${@',${GALLIUMDRIVERS_LLVM33}' if ${GALL 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)}" # keep --with-gallium-drivers separate, because when only one of gallium versions is enabled, other 2 were adding --without-gallium-drivers -PACKAGECONFIG[gallium] = "--with-gallium-drivers=${GALLIUMDRIVERS}, --without-gallium-drivers" -MESA_LLVM_RELEASE ?= "3.3" -PACKAGECONFIG[gallium-llvm] = "--enable-gallium-llvm --enable-llvm-shared-libs, --disable-gallium-llvm, llvm${MESA_LLVM_RELEASE} \ +PACKAGECONFIG[gallium] = "--enable-texture-float --with-gallium-drivers=${GALLIUMDRIVERS}, --without-gallium-drivers" +MESA_LLVM_RELEASE ?= "5.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}" PACKAGECONFIG[xa] = "--enable-xa, --disable-xa" @@ -75,9 +92,13 @@ PACKAGECONFIG[xa] = "--enable-xa, --disable-xa" OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium-osmesa', 'osmesa', d)}" PACKAGECONFIG[osmesa] = "--enable-${OSMESA},--disable-${OSMESA}" +PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind" + # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2) FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer" +CFLAGS_append_armv5 = " -DMISSING_64BIT_ATOMICS" + # Multiple virtual/gl providers being built breaks staging EXCLUDE_FROM_WORLD = "1" @@ -106,9 +127,10 @@ do_install_append () { rm -f ${D}${libdir}/egl/*.la 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 rm -f ${D}${sysconfdir}/drirc + chrpath --delete ${D}${libdir}/dri/*_dri.so || true } # For the packages that make up the OpenGL interfaces, inject variables so that |