summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/mesa.inc
diff options
context:
space:
mode:
authorFabio Berton <fabio.berton@ossystems.com.br>2019-05-15 18:22:43 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-16 09:16:50 +0100
commite47715708729fe3fed2c5bcafa06f5f1c84f302f (patch)
tree708f428a746a6be67482f0b0bb2640a8b40d5b3a /meta/recipes-graphics/mesa/mesa.inc
parent9095dc153a760a4336260419aa2298fad8d7d031 (diff)
downloadpoky-e47715708729fe3fed2c5bcafa06f5f1c84f302f.tar.gz
mesa: Convert recipe to use meson build system
- Remove all non related meson patches - Change radeon driver to r100 - Add python3-mako-native gettext-native to DEPENDS Based on https://patchwork.openembedded.org/patch/158748/ Alex: added a patch to restore glx-tls option, which addresses the musl runtime issue. (From OE-Core rev: c72b6d46d392bfbcf54154f43663a7a8ada8c567) Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/mesa/mesa.inc')
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc64
1 files changed, 31 insertions, 33 deletions
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index ece74974b5..c52adbbb21 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c
14 14
15PE = "2" 15PE = "2"
16 16
17DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native" 17DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native"
18EXTRANATIVEPATH += "chrpath-native" 18EXTRANATIVEPATH += "chrpath-native"
19PROVIDES = " \ 19PROVIDES = " \
20 ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \ 20 ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \
@@ -24,7 +24,7 @@ PROVIDES = " \
24 virtual/mesa \ 24 virtual/mesa \
25 " 25 "
26 26
27inherit autotools pkgconfig python3native gettext distro_features_check 27inherit meson pkgconfig python3native gettext distro_features_check
28 28
29BBCLASSEXTEND = "native nativesdk" 29BBCLASSEXTEND = "native nativesdk"
30 30
@@ -34,57 +34,59 @@ PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)} \
34 ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'drm', '', d)} \ 34 ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'drm', '', d)} \
35 surfaceless" 35 surfaceless"
36 36
37export LLVM_CONFIG = "${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE}"
38export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE}/llvm-config" 37export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE}/llvm-config"
39export YOCTO_ALTERNATE_MULTILIB_NAME = "${base_libdir}" 38export YOCTO_ALTERNATE_MULTILIB_NAME = "${base_libdir}"
40EXTRA_OECONF = "--enable-shared-glapi \ 39
41 --disable-opencl \ 40EXTRA_OEMESON = " \
42 --enable-glx-read-only-text \ 41 -Dshared-glapi=true \
43 PYTHON2=python2 \ 42 -Dgallium-opencl=disabled \
44 --with-llvm-prefix=${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE} \ 43 -Dglx-read-only-text=true \
45 --with-platforms='${PLATFORMS}' \ 44 -Dplatforms='${@",".join("${PLATFORMS}".split())}' \
46 --enable-autotools \
47" 45"
48 46
49PACKAGECONFIG_class-target ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \ 47PACKAGECONFIG_class-target ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \
50 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri gallium', '', d)} \ 48 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri gallium', '', d)} \
51 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} \ 49 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} \
52 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \ 50 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \
51 glx-tls \
53 " 52 "
54PACKAGECONFIG_class-native ?= "gbm dri egl opengl" 53PACKAGECONFIG_class-native ?= "gbm dri egl opengl"
55PACKAGECONFIG_class-nativesdk ?= "gbm dri egl opengl" 54PACKAGECONFIG_class-nativesdk ?= "gbm dri egl opengl"
56 55
56PACKAGECONFIG_remove_libc-musl = "glx-tls"
57
57# "gbm" requires "dri", "opengl" 58# "gbm" requires "dri", "opengl"
58PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm" 59PACKAGECONFIG[gbm] = "-Dgbm=true,-Dgbm=false"
59 60
60X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr" 61X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr"
61# "x11" requires "opengl" 62# "x11" requires "opengl"
62PACKAGECONFIG[x11] = "--enable-glx-tls,--disable-glx,${X11_DEPS}" 63PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}"
63PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc" 64PACKAGECONFIG[glx-tls] = "-Dglx-tls=true, -Dglx-tls=false"
65PACKAGECONFIG[xvmc] = "-Dgallium-xvmc=true,-Dgallium-xvmc=false,libxvmc"
64PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols" 66PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols"
65 67
66DRIDRIVERS_class-native = "swrast" 68DRIDRIVERS_class-native = "swrast"
67DRIDRIVERS_class-nativesdk = "swrast" 69DRIDRIVERS_class-nativesdk = "swrast"
68DRIDRIVERS_append_x86_class-target = ",radeon,r200,nouveau,i965,i915" 70DRIDRIVERS_append_x86_class-target = ",r100,r200,nouveau,i965,i915"
69DRIDRIVERS_append_x86-64_class-target = ",radeon,r200,nouveau,i965,i915" 71DRIDRIVERS_append_x86-64_class-target = ",r100,r200,nouveau,i965,i915"
70# "dri" requires "opengl" 72# "dri" requires "opengl"
71PACKAGECONFIG[dri] = "--enable-dri --with-dri-drivers=${DRIDRIVERS}, --disable-dri, xorgproto libdrm" 73PACKAGECONFIG[dri] = "-Ddri-drivers=${DRIDRIVERS}, -Ddri-drivers='', xorgproto libdrm"
72PACKAGECONFIG[dri3] = "--enable-dri3, --disable-dri3, xorgproto libxshmfence" 74PACKAGECONFIG[dri3] = "-Ddri3=true, -Ddri3=false, xorgproto libxshmfence"
73 75
74# Vulkan drivers need dri3 enabled 76# Vulkan drivers need dri3 enabled
75# radeon could be enabled as well but requires gallium-llvm with llvm >= 3.9 77# radeon could be enabled as well but requires gallium-llvm with llvm >= 3.9
76VULKAN_DRIVERS = "" 78VULKAN_DRIVERS = ""
77VULKAN_DRIVERS_append_x86_class-target = ",intel" 79VULKAN_DRIVERS_append_x86_class-target = ",intel"
78VULKAN_DRIVERS_append_x86-64_class-target = ",intel" 80VULKAN_DRIVERS_append_x86-64_class-target = ",intel"
79PACKAGECONFIG[vulkan] = "--with-vulkan-drivers=${VULKAN_DRIVERS}, --without-vulkan-drivers, python3-mako-native" 81PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${VULKAN_DRIVERS}, -Dvulkan-drivers='',"
80 82
81PACKAGECONFIG[opengl] = "--enable-opengl, --disable-opengl" 83PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false"
82 84
83# "gles" requires "opengl" 85# "gles" requires "opengl"
84PACKAGECONFIG[gles] = "--enable-gles1 --enable-gles2, --disable-gles1 --disable-gles2" 86PACKAGECONFIG[gles] = "-Dgles1=true -Dgles2=true, -Dgles1=false -Dgles2=false"
85 87
86# "egl" requires "dri", "opengl" 88# "egl" requires "dri", "opengl"
87PACKAGECONFIG[egl] = "--enable-egl, --disable-egl" 89PACKAGECONFIG[egl] = "-Degl=true, -Degl=false"
88 90
89PACKAGECONFIG[etnaviv] = "" 91PACKAGECONFIG[etnaviv] = ""
90PACKAGECONFIG[imx] = "" 92PACKAGECONFIG[imx] = ""
@@ -104,28 +106,25 @@ GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', '
104GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600', '', d)}" 106GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600', '', d)}"
105GALLIUMDRIVERS_append = ",virgl" 107GALLIUMDRIVERS_append = ",virgl"
106 108
107# keep --with-gallium-drivers separate, because when only one of gallium versions is enabled, other 2 were adding --without-gallium-drivers 109PACKAGECONFIG[gallium] = "-Dgallium-drivers=${GALLIUMDRIVERS}, -Dgallium-drivers=''"
108PACKAGECONFIG[gallium] = "--with-gallium-drivers=${GALLIUMDRIVERS}, --without-gallium-drivers"
109MESA_LLVM_RELEASE ?= "8.0.0" 110MESA_LLVM_RELEASE ?= "8.0.0"
110PACKAGECONFIG[gallium-llvm] = "--enable-llvm --enable-llvm-shared-libs, --disable-llvm, llvm${MESA_LLVM_RELEASE} llvm-native \ 111PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true, -Dllvm=false, llvm${MESA_LLVM_RELEASE} llvm-native \
111 ${@'elfutils' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}" 112 ${@'elfutils' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
112export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}" 113export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}"
113PACKAGECONFIG[xa] = "--enable-xa, --disable-xa" 114PACKAGECONFIG[xa] = "-Dgallium-xa=true, -Dgallium-xa=false"
114 115
115OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium-osmesa', 'osmesa', d)}" 116OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium', 'classic', d)}"
116PACKAGECONFIG[osmesa] = "--enable-${OSMESA},--disable-${OSMESA}" 117PACKAGECONFIG[osmesa] = "-Dosmesa=${OSMESA},-Dosmesa=none"
117 118
118PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind" 119PACKAGECONFIG[unwind] = "-Dlibunwind=true,-Dlibunwind=false,libunwind"
119 120
120EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls" 121# mesa tries to run cross-built gen_matypes on build machine to get struct size information
121EXTRA_OECONF_append_libc-musl = " --disable-glx-tls" 122EXTRA_OEMESON_append = " -Dasm=false"
122EXTRA_OECONF_append_libc-musl_x86 = " --disable-asm"
123 123
124# llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2) 124# llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
125FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer" 125FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"
126 126
127CFLAGS_append_armv5 = " -DMISSING_64BIT_ATOMICS" 127CFLAGS_append_armv5 = " -DMISSING_64BIT_ATOMICS"
128EXTRA_OEMAKE += "WAYLAND_PROTOCOLS_DATADIR=${STAGING_DATADIR}/wayland-protocols"
129 128
130# Remove the mesa dependency on mesa-dev, as mesa is empty 129# Remove the mesa dependency on mesa-dev, as mesa is empty
131RDEPENDS_${PN}-dev = "" 130RDEPENDS_${PN}-dev = ""
@@ -158,7 +157,6 @@ do_install_append () {
158 # libwayland-egl has been moved to wayland 1.15+ 157 # libwayland-egl has been moved to wayland 1.15+
159 rm -f ${D}${libdir}/libwayland-egl* 158 rm -f ${D}${libdir}/libwayland-egl*
160 rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc 159 rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc
161 rmdir --ignore-fail-on-non-empty ${D}${libdir}/pkgconfig
162} 160}
163 161
164# For the packages that make up the OpenGL interfaces, inject variables so that 162# For the packages that make up the OpenGL interfaces, inject variables so that