summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/files
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/files
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/files')
-rw-r--r--meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch44
-rw-r--r--meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch51
-rw-r--r--meta/recipes-graphics/mesa/files/0001-meson.build-make-TLS-GLX-optional-again.patch44
-rw-r--r--meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch35
-rw-r--r--meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch45
-rw-r--r--meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch38
6 files changed, 95 insertions, 162 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 @@
1From e53837ad7b01364f34a533b95f4817c1795789de Mon Sep 17 00:00:00 2001
2From: Fabio Berton <fabio.berton@ossystems.com.br>
3Date: Wed, 20 Feb 2019 16:17:00 -0300
4Subject: [PATCH 1/4] Simplify wayland-scanner lookup
5Organization: O.S. Systems Software LTDA.
6
7Don't use pkg-config to lookup the path of a binary that's in the path.
8
9Alternatively we'd have to prefix the path returned by pkg-config with
10PKG_CONFIG_SYSROOT_DIR.
11
12Upstream-Status: Pending
13Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
14Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
15Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
16---
17 configure.ac | 7 +------
18 1 file changed, 1 insertion(+), 6 deletions(-)
19
20diff --git a/configure.ac b/configure.ac
21index 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--
432.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 @@
1From 498f230c9446fc7a1b4dc77ff6b84ee1a3b53bf4 Mon Sep 17 00:00:00 2001
2From: Fabio Berton <fabio.berton@ossystems.com.br>
3Date: Wed, 24 Apr 2019 17:01:24 -0300
4Subject: [PATCH] meson.build: check for all linux host_os combinations
5Organization: O.S. Systems Software LTDA.
6
7Make sure that we are also looking for our host_os combinations like
8linux-musl etc. when assuming support for DRM/KMS.
9
10Also delete a duplicate line.
11
12Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
13Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
14---
15 meson.build | 6 +++---
16 1 file changed, 3 insertions(+), 3 deletions(-)
17
18diff --git a/meson.build b/meson.build
19index 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--
502.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 @@
1From 48318f1a5c9042a8e1bb4456c2584362b25c4a59 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 15 May 2019 17:21:51 +0200
4Subject: [PATCH] meson.build: make TLS GLX optional again
5
6This was optional with autotools, and needs to be disabled
7when using musl C library, for instance.
8
9Upstream-Status: Pending
10Signed-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
16diff --git a/meson.build b/meson.build
17index 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')
31diff --git a/meson_options.txt b/meson_options.txt
32index 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 @@
1From f212b6bed4bf265aec069c21cdc4b7c2d9cb32df Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 16 Aug 2017 18:58:20 -0700
4Subject: [PATCH 2/4] winsys/svga/drm: Include sys/types.h
5Organization: O.S. Systems Software LTDA.
6
7vmw_screen.h uses dev_t which is defines in sys/types.h
8this header is required to be included for getting dev_t
9definition. This issue happens on musl C library, it is hidden
10on glibc since sys/types.h is included through another
11system headers
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14Upstream-Status: Backport [7dfdfbf8c37e52e7b9b09f7d1d434edad3ebc864]
15Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
16Signed-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
21diff --git a/src/gallium/winsys/svga/drm/vmw_screen.h b/src/gallium/winsys/svga/drm/vmw_screen.h
22index 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--
342.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 @@
1From ce7b9ff6517fda089f296b2af2c1c49604872514 Mon Sep 17 00:00:00 2001
2From: Otavio Salvador <otavio@ossystems.com.br>
3Date: Tue, 5 Jun 2018 11:11:10 -0300
4Subject: [PATCH 3/4] Properly get LLVM version when using LLVM Git releases
5Organization: O.S. Systems Software LTDA.
6
7$ llvm-config-host --version
85.0.0git-9a5c333388c
9
10We need to ignore everything after 5.0.0 which is what the cut cmd is
11doing
12
13Upstream-Status: Pending
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
16Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
17---
18 configure.ac | 4 ++--
19 1 file changed, 2 insertions(+), 2 deletions(-)
20
21diff --git a/configure.ac b/configure.ac
22index 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--
442.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 @@
1From 5489e1d22e18740a1924628c5c97096d48dcfbf8 Mon Sep 17 00:00:00 2001
2From: Fabio Berton <fabio.berton@ossystems.com.br>
3Date: Fri, 15 Feb 2019 10:57:06 -0200
4Subject: [PATCH 4/4] use PKG_CHECK_VAR for defining WAYLAND_PROTOCOLS_DATADIR
5Organization: O.S. Systems Software LTDA.
6
7This allows to override the wayland-protocols pkgdatadir with the
8WAYLAND_PROTOCOLS_DATADIR from environment.
9
10pkgconfig would return an absolute path in
11/usr/share/wayland-protocols
12for the pkgdatadir value, which is not suitable for cross-compiling.
13
14Upstream-Status: Pending
15
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
18Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
19---
20 configure.ac | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23diff --git a/configure.ac b/configure.ac
24index 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--
372.21.0
38