diff options
author | Fabio Berton <fabio.berton@ossystems.com.br> | 2019-05-15 18:22:43 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-05-16 09:16:50 +0100 |
commit | e47715708729fe3fed2c5bcafa06f5f1c84f302f (patch) | |
tree | 708f428a746a6be67482f0b0bb2640a8b40d5b3a /meta/recipes-graphics/mesa | |
parent | 9095dc153a760a4336260419aa2298fad8d7d031 (diff) | |
download | poky-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')
8 files changed, 129 insertions, 200 deletions
diff --git a/meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch b/meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch deleted file mode 100644 index d065e2285c..0000000000 --- a/meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | From e53837ad7b01364f34a533b95f4817c1795789de Mon Sep 17 00:00:00 2001 | ||
2 | From: Fabio Berton <fabio.berton@ossystems.com.br> | ||
3 | Date: Wed, 20 Feb 2019 16:17:00 -0300 | ||
4 | Subject: [PATCH 1/4] Simplify wayland-scanner lookup | ||
5 | Organization: O.S. Systems Software LTDA. | ||
6 | |||
7 | Don't use pkg-config to lookup the path of a binary that's in the path. | ||
8 | |||
9 | Alternatively we'd have to prefix the path returned by pkg-config with | ||
10 | PKG_CONFIG_SYSROOT_DIR. | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
14 | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> | ||
15 | Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> | ||
16 | --- | ||
17 | configure.ac | 7 +------ | ||
18 | 1 file changed, 1 insertion(+), 6 deletions(-) | ||
19 | |||
20 | diff --git a/configure.ac b/configure.ac | ||
21 | index 1ef68fe68e6..1816a4cd475 100644 | ||
22 | --- a/configure.ac | ||
23 | +++ b/configure.ac | ||
24 | @@ -1854,16 +1854,11 @@ for plat in $platforms; do | ||
25 | fi | ||
26 | WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols` | ||
27 | |||
28 | - PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner], | ||
29 | - WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`, | ||
30 | - WAYLAND_SCANNER='') | ||
31 | PKG_CHECK_EXISTS([wayland-scanner >= 1.15], | ||
32 | AC_SUBST(SCANNER_ARG, 'private-code'), | ||
33 | AC_SUBST(SCANNER_ARG, 'code')) | ||
34 | |||
35 | - if test "x$WAYLAND_SCANNER" = x; then | ||
36 | - AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:]) | ||
37 | - fi | ||
38 | + AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:]) | ||
39 | |||
40 | if test "x$WAYLAND_SCANNER" = "x:"; then | ||
41 | AC_MSG_ERROR([wayland-scanner is needed to compile the wayland platform]) | ||
42 | -- | ||
43 | 2.21.0 | ||
44 | |||
diff --git a/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch b/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch new file mode 100644 index 0000000000..61e24c6e9f --- /dev/null +++ b/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From 498f230c9446fc7a1b4dc77ff6b84ee1a3b53bf4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Fabio Berton <fabio.berton@ossystems.com.br> | ||
3 | Date: Wed, 24 Apr 2019 17:01:24 -0300 | ||
4 | Subject: [PATCH] meson.build: check for all linux host_os combinations | ||
5 | Organization: O.S. Systems Software LTDA. | ||
6 | |||
7 | Make sure that we are also looking for our host_os combinations like | ||
8 | linux-musl etc. when assuming support for DRM/KMS. | ||
9 | |||
10 | Also delete a duplicate line. | ||
11 | |||
12 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
13 | Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> | ||
14 | --- | ||
15 | meson.build | 6 +++--- | ||
16 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
17 | |||
18 | diff --git a/meson.build b/meson.build | ||
19 | index 53d02e31097..c41f6b4e402 100644 | ||
20 | --- a/meson.build | ||
21 | +++ b/meson.build | ||
22 | @@ -34,6 +34,8 @@ cpp = meson.get_compiler('cpp') | ||
23 | |||
24 | null_dep = dependency('', required : false) | ||
25 | |||
26 | +system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly'].contains(host_machine.system()) or host_machine.system().startswith('linux') | ||
27 | + | ||
28 | # Arguments for the preprocessor, put these in a separate array from the C and | ||
29 | # C++ (cpp in meson terminology) arguments since they need to be added to the | ||
30 | # default arguments for both C and C++. | ||
31 | @@ -89,8 +91,6 @@ if (with_gles1 or with_gles2) and not with_opengl | ||
32 | error('building OpenGL ES without OpenGL is not supported.') | ||
33 | endif | ||
34 | |||
35 | -system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly', 'linux'].contains(host_machine.system()) | ||
36 | - | ||
37 | _drivers = get_option('dri-drivers') | ||
38 | if _drivers.contains('auto') | ||
39 | if system_has_kms_drm | ||
40 | @@ -792,7 +792,7 @@ if cc.compiles('int foo(void) __attribute__((__noreturn__));', | ||
41 | endif | ||
42 | |||
43 | # TODO: this is very incomplete | ||
44 | -if ['linux', 'cygwin', 'gnu'].contains(host_machine.system()) | ||
45 | +if ['cygwin', 'gnu'].contains(host_machine.system()) or host_machine.system().startswith('linux') | ||
46 | pre_args += '-D_GNU_SOURCE' | ||
47 | endif | ||
48 | |||
49 | -- | ||
50 | 2.21.0 | ||
51 | |||
diff --git a/meta/recipes-graphics/mesa/files/0001-meson.build-make-TLS-GLX-optional-again.patch b/meta/recipes-graphics/mesa/files/0001-meson.build-make-TLS-GLX-optional-again.patch new file mode 100644 index 0000000000..8fabafcb35 --- /dev/null +++ b/meta/recipes-graphics/mesa/files/0001-meson.build-make-TLS-GLX-optional-again.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 48318f1a5c9042a8e1bb4456c2584362b25c4a59 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Wed, 15 May 2019 17:21:51 +0200 | ||
4 | Subject: [PATCH] meson.build: make TLS GLX optional again | ||
5 | |||
6 | This was optional with autotools, and needs to be disabled | ||
7 | when using musl C library, for instance. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
11 | --- | ||
12 | meson.build | 4 +++- | ||
13 | meson_options.txt | 6 ++++++ | ||
14 | 2 files changed, 9 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/meson.build b/meson.build | ||
17 | index c41f6b4..8843f3c 100644 | ||
18 | --- a/meson.build | ||
19 | +++ b/meson.build | ||
20 | @@ -336,7 +336,9 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless) | ||
21 | endif | ||
22 | endif | ||
23 | |||
24 | -pre_args += '-DGLX_USE_TLS' | ||
25 | +if get_option('glx-tls') | ||
26 | + pre_args += '-DGLX_USE_TLS' | ||
27 | +endif | ||
28 | if with_glx != 'disabled' | ||
29 | if not (with_platform_x11 and with_any_opengl) | ||
30 | error('Cannot build GLX support without X11 platform support and at least one OpenGL API') | ||
31 | diff --git a/meson_options.txt b/meson_options.txt | ||
32 | index ccf7065..0f1e800 100644 | ||
33 | --- a/meson_options.txt | ||
34 | +++ b/meson_options.txt | ||
35 | @@ -324,3 +324,9 @@ option( | ||
36 | value : true, | ||
37 | description : 'Enable direct rendering in GLX and EGL for DRI', | ||
38 | ) | ||
39 | +option( | ||
40 | + 'glx-tls', | ||
41 | + type : 'boolean', | ||
42 | + value : true, | ||
43 | + description : 'Enable TLS support in GLX', | ||
44 | +) | ||
diff --git a/meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch b/meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch deleted file mode 100644 index aaeb0f11ba..0000000000 --- a/meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From f212b6bed4bf265aec069c21cdc4b7c2d9cb32df Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 16 Aug 2017 18:58:20 -0700 | ||
4 | Subject: [PATCH 2/4] winsys/svga/drm: Include sys/types.h | ||
5 | Organization: O.S. Systems Software LTDA. | ||
6 | |||
7 | vmw_screen.h uses dev_t which is defines in sys/types.h | ||
8 | this header is required to be included for getting dev_t | ||
9 | definition. This issue happens on musl C library, it is hidden | ||
10 | on glibc since sys/types.h is included through another | ||
11 | system headers | ||
12 | |||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | Upstream-Status: Backport [7dfdfbf8c37e52e7b9b09f7d1d434edad3ebc864] | ||
15 | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> | ||
16 | Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> | ||
17 | --- | ||
18 | src/gallium/winsys/svga/drm/vmw_screen.h | 1 + | ||
19 | 1 file changed, 1 insertion(+) | ||
20 | |||
21 | diff --git a/src/gallium/winsys/svga/drm/vmw_screen.h b/src/gallium/winsys/svga/drm/vmw_screen.h | ||
22 | index a87c087d9c5..cb34fec48e7 100644 | ||
23 | --- a/src/gallium/winsys/svga/drm/vmw_screen.h | ||
24 | +++ b/src/gallium/winsys/svga/drm/vmw_screen.h | ||
25 | @@ -41,6 +41,7 @@ | ||
26 | #include "svga_winsys.h" | ||
27 | #include "pipebuffer/pb_buffer_fenced.h" | ||
28 | #include <os/os_thread.h> | ||
29 | +#include <sys/types.h> | ||
30 | |||
31 | #define VMW_GMR_POOL_SIZE (16*1024*1024) | ||
32 | #define VMW_QUERY_POOL_SIZE (8192) | ||
33 | -- | ||
34 | 2.21.0 | ||
35 | |||
diff --git a/meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch b/meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch deleted file mode 100644 index 96edc2172b..0000000000 --- a/meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | From ce7b9ff6517fda089f296b2af2c1c49604872514 Mon Sep 17 00:00:00 2001 | ||
2 | From: Otavio Salvador <otavio@ossystems.com.br> | ||
3 | Date: Tue, 5 Jun 2018 11:11:10 -0300 | ||
4 | Subject: [PATCH 3/4] Properly get LLVM version when using LLVM Git releases | ||
5 | Organization: O.S. Systems Software LTDA. | ||
6 | |||
7 | $ llvm-config-host --version | ||
8 | 5.0.0git-9a5c333388c | ||
9 | |||
10 | We need to ignore everything after 5.0.0 which is what the cut cmd is | ||
11 | doing | ||
12 | |||
13 | Upstream-Status: Pending | ||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> | ||
16 | Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> | ||
17 | --- | ||
18 | configure.ac | 4 ++-- | ||
19 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/configure.ac b/configure.ac | ||
22 | index 1816a4cd475..13fed9daf59 100644 | ||
23 | --- a/configure.ac | ||
24 | +++ b/configure.ac | ||
25 | @@ -1124,7 +1124,7 @@ strip_unwanted_llvm_flags() { | ||
26 | |||
27 | llvm_set_environment_variables() { | ||
28 | if test "x$LLVM_CONFIG" != xno; then | ||
29 | - LLVM_VERSION=`$LLVM_CONFIG --version | egrep -o '^[[0-9.]]+'` | ||
30 | + LLVM_VERSION=`$LLVM_CONFIG --version | cut -c1-5` | ||
31 | LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"` | ||
32 | LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir` | ||
33 | LLVM_LIBDIR=`$LLVM_CONFIG --libdir` | ||
34 | @@ -2870,7 +2870,7 @@ detect_old_buggy_llvm() { | ||
35 | dnl ourselves. | ||
36 | dnl (See https://llvm.org/bugs/show_bug.cgi?id=6823) | ||
37 | dnl We can't use $LLVM_VERSION because it has 'svn' stripped out, | ||
38 | - LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version` | ||
39 | + LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version | cut -c1-5` | ||
40 | AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.$IMP_LIB_EXT"], [llvm_have_one_so=yes]) | ||
41 | |||
42 | if test "x$llvm_have_one_so" = xyes; then | ||
43 | -- | ||
44 | 2.21.0 | ||
45 | |||
diff --git a/meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch b/meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch deleted file mode 100644 index 45bcd466a3..0000000000 --- a/meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | From 5489e1d22e18740a1924628c5c97096d48dcfbf8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Fabio Berton <fabio.berton@ossystems.com.br> | ||
3 | Date: Fri, 15 Feb 2019 10:57:06 -0200 | ||
4 | Subject: [PATCH 4/4] use PKG_CHECK_VAR for defining WAYLAND_PROTOCOLS_DATADIR | ||
5 | Organization: O.S. Systems Software LTDA. | ||
6 | |||
7 | This allows to override the wayland-protocols pkgdatadir with the | ||
8 | WAYLAND_PROTOCOLS_DATADIR from environment. | ||
9 | |||
10 | pkgconfig would return an absolute path in | ||
11 | /usr/share/wayland-protocols | ||
12 | for the pkgdatadir value, which is not suitable for cross-compiling. | ||
13 | |||
14 | Upstream-Status: Pending | ||
15 | |||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> | ||
18 | Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> | ||
19 | --- | ||
20 | configure.ac | 2 +- | ||
21 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
22 | |||
23 | diff --git a/configure.ac b/configure.ac | ||
24 | index 13fed9daf59..6cff8afb7cf 100644 | ||
25 | --- a/configure.ac | ||
26 | +++ b/configure.ac | ||
27 | @@ -1852,7 +1852,7 @@ for plat in $platforms; do | ||
28 | if test "x$enable_egl" = xyes; then | ||
29 | PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl-backend >= $WAYLAND_EGL_BACKEND_REQUIRED]) | ||
30 | fi | ||
31 | - WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols` | ||
32 | + PKG_CHECK_VAR([WAYLAND_PROTOCOLS_DATADIR], [wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED], pkgdatadir) | ||
33 | |||
34 | PKG_CHECK_EXISTS([wayland-scanner >= 1.15], | ||
35 | AC_SUBST(SCANNER_ARG, 'private-code'), | ||
36 | -- | ||
37 | 2.21.0 | ||
38 | |||
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 | ||
15 | PE = "2" | 15 | PE = "2" |
16 | 16 | ||
17 | DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native" | 17 | DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native" |
18 | EXTRANATIVEPATH += "chrpath-native" | 18 | EXTRANATIVEPATH += "chrpath-native" |
19 | PROVIDES = " \ | 19 | PROVIDES = " \ |
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 | ||
27 | inherit autotools pkgconfig python3native gettext distro_features_check | 27 | inherit meson pkgconfig python3native gettext distro_features_check |
28 | 28 | ||
29 | BBCLASSEXTEND = "native nativesdk" | 29 | BBCLASSEXTEND = "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 | ||
37 | export LLVM_CONFIG = "${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE}" | ||
38 | export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE}/llvm-config" | 37 | export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE}/llvm-config" |
39 | export YOCTO_ALTERNATE_MULTILIB_NAME = "${base_libdir}" | 38 | export YOCTO_ALTERNATE_MULTILIB_NAME = "${base_libdir}" |
40 | EXTRA_OECONF = "--enable-shared-glapi \ | 39 | |
41 | --disable-opencl \ | 40 | EXTRA_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 | ||
49 | PACKAGECONFIG_class-target ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \ | 47 | PACKAGECONFIG_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 | " |
54 | PACKAGECONFIG_class-native ?= "gbm dri egl opengl" | 53 | PACKAGECONFIG_class-native ?= "gbm dri egl opengl" |
55 | PACKAGECONFIG_class-nativesdk ?= "gbm dri egl opengl" | 54 | PACKAGECONFIG_class-nativesdk ?= "gbm dri egl opengl" |
56 | 55 | ||
56 | PACKAGECONFIG_remove_libc-musl = "glx-tls" | ||
57 | |||
57 | # "gbm" requires "dri", "opengl" | 58 | # "gbm" requires "dri", "opengl" |
58 | PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm" | 59 | PACKAGECONFIG[gbm] = "-Dgbm=true,-Dgbm=false" |
59 | 60 | ||
60 | X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr" | 61 | X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr" |
61 | # "x11" requires "opengl" | 62 | # "x11" requires "opengl" |
62 | PACKAGECONFIG[x11] = "--enable-glx-tls,--disable-glx,${X11_DEPS}" | 63 | PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}" |
63 | PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc" | 64 | PACKAGECONFIG[glx-tls] = "-Dglx-tls=true, -Dglx-tls=false" |
65 | PACKAGECONFIG[xvmc] = "-Dgallium-xvmc=true,-Dgallium-xvmc=false,libxvmc" | ||
64 | PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols" | 66 | PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols" |
65 | 67 | ||
66 | DRIDRIVERS_class-native = "swrast" | 68 | DRIDRIVERS_class-native = "swrast" |
67 | DRIDRIVERS_class-nativesdk = "swrast" | 69 | DRIDRIVERS_class-nativesdk = "swrast" |
68 | DRIDRIVERS_append_x86_class-target = ",radeon,r200,nouveau,i965,i915" | 70 | DRIDRIVERS_append_x86_class-target = ",r100,r200,nouveau,i965,i915" |
69 | DRIDRIVERS_append_x86-64_class-target = ",radeon,r200,nouveau,i965,i915" | 71 | DRIDRIVERS_append_x86-64_class-target = ",r100,r200,nouveau,i965,i915" |
70 | # "dri" requires "opengl" | 72 | # "dri" requires "opengl" |
71 | PACKAGECONFIG[dri] = "--enable-dri --with-dri-drivers=${DRIDRIVERS}, --disable-dri, xorgproto libdrm" | 73 | PACKAGECONFIG[dri] = "-Ddri-drivers=${DRIDRIVERS}, -Ddri-drivers='', xorgproto libdrm" |
72 | PACKAGECONFIG[dri3] = "--enable-dri3, --disable-dri3, xorgproto libxshmfence" | 74 | PACKAGECONFIG[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 |
76 | VULKAN_DRIVERS = "" | 78 | VULKAN_DRIVERS = "" |
77 | VULKAN_DRIVERS_append_x86_class-target = ",intel" | 79 | VULKAN_DRIVERS_append_x86_class-target = ",intel" |
78 | VULKAN_DRIVERS_append_x86-64_class-target = ",intel" | 80 | VULKAN_DRIVERS_append_x86-64_class-target = ",intel" |
79 | PACKAGECONFIG[vulkan] = "--with-vulkan-drivers=${VULKAN_DRIVERS}, --without-vulkan-drivers, python3-mako-native" | 81 | PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${VULKAN_DRIVERS}, -Dvulkan-drivers=''," |
80 | 82 | ||
81 | PACKAGECONFIG[opengl] = "--enable-opengl, --disable-opengl" | 83 | PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false" |
82 | 84 | ||
83 | # "gles" requires "opengl" | 85 | # "gles" requires "opengl" |
84 | PACKAGECONFIG[gles] = "--enable-gles1 --enable-gles2, --disable-gles1 --disable-gles2" | 86 | PACKAGECONFIG[gles] = "-Dgles1=true -Dgles2=true, -Dgles1=false -Dgles2=false" |
85 | 87 | ||
86 | # "egl" requires "dri", "opengl" | 88 | # "egl" requires "dri", "opengl" |
87 | PACKAGECONFIG[egl] = "--enable-egl, --disable-egl" | 89 | PACKAGECONFIG[egl] = "-Degl=true, -Degl=false" |
88 | 90 | ||
89 | PACKAGECONFIG[etnaviv] = "" | 91 | PACKAGECONFIG[etnaviv] = "" |
90 | PACKAGECONFIG[imx] = "" | 92 | PACKAGECONFIG[imx] = "" |
@@ -104,28 +106,25 @@ GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ' | |||
104 | GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600', '', d)}" | 106 | GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600', '', d)}" |
105 | GALLIUMDRIVERS_append = ",virgl" | 107 | GALLIUMDRIVERS_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 | 109 | PACKAGECONFIG[gallium] = "-Dgallium-drivers=${GALLIUMDRIVERS}, -Dgallium-drivers=''" |
108 | PACKAGECONFIG[gallium] = "--with-gallium-drivers=${GALLIUMDRIVERS}, --without-gallium-drivers" | ||
109 | MESA_LLVM_RELEASE ?= "8.0.0" | 110 | MESA_LLVM_RELEASE ?= "8.0.0" |
110 | PACKAGECONFIG[gallium-llvm] = "--enable-llvm --enable-llvm-shared-libs, --disable-llvm, llvm${MESA_LLVM_RELEASE} llvm-native \ | 111 | PACKAGECONFIG[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 ''}" |
112 | export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}" | 113 | export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}" |
113 | PACKAGECONFIG[xa] = "--enable-xa, --disable-xa" | 114 | PACKAGECONFIG[xa] = "-Dgallium-xa=true, -Dgallium-xa=false" |
114 | 115 | ||
115 | OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium-osmesa', 'osmesa', d)}" | 116 | OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium', 'classic', d)}" |
116 | PACKAGECONFIG[osmesa] = "--enable-${OSMESA},--disable-${OSMESA}" | 117 | PACKAGECONFIG[osmesa] = "-Dosmesa=${OSMESA},-Dosmesa=none" |
117 | 118 | ||
118 | PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind" | 119 | PACKAGECONFIG[unwind] = "-Dlibunwind=true,-Dlibunwind=false,libunwind" |
119 | 120 | ||
120 | EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls" | 121 | # mesa tries to run cross-built gen_matypes on build machine to get struct size information |
121 | EXTRA_OECONF_append_libc-musl = " --disable-glx-tls" | 122 | EXTRA_OEMESON_append = " -Dasm=false" |
122 | EXTRA_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) |
125 | FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer" | 125 | FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer" |
126 | 126 | ||
127 | CFLAGS_append_armv5 = " -DMISSING_64BIT_ATOMICS" | 127 | CFLAGS_append_armv5 = " -DMISSING_64BIT_ATOMICS" |
128 | EXTRA_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 |
131 | RDEPENDS_${PN}-dev = "" | 130 | RDEPENDS_${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 |
diff --git a/meta/recipes-graphics/mesa/mesa_19.0.3.bb b/meta/recipes-graphics/mesa/mesa_19.0.3.bb index 585c3ede23..36faa4a99d 100644 --- a/meta/recipes-graphics/mesa/mesa_19.0.3.bb +++ b/meta/recipes-graphics/mesa/mesa_19.0.3.bb | |||
@@ -1,11 +1,9 @@ | |||
1 | require ${BPN}.inc | 1 | require ${BPN}.inc |
2 | 2 | ||
3 | SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ | 3 | SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ |
4 | file://0001-Simplify-wayland-scanner-lookup.patch \ | 4 | file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \ |
5 | file://0002-winsys-svga-drm-Include-sys-types.h.patch \ | 5 | file://0001-meson.build-make-TLS-GLX-optional-again.patch \ |
6 | file://0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch \ | 6 | " |
7 | file://0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch \ | ||
8 | " | ||
9 | 7 | ||
10 | SRC_URI[md5sum] = "d03bf14e42c0e54ebae5730712ccc408" | 8 | SRC_URI[md5sum] = "d03bf14e42c0e54ebae5730712ccc408" |
11 | SRC_URI[sha256sum] = "f027244e38dc309a4c12db45ef79be81ab62c797a50a88d566e4edb6159fc4d5" | 9 | SRC_URI[sha256sum] = "f027244e38dc309a4c12db45ef79be81ab62c797a50a88d566e4edb6159fc4d5" |