diff options
author | Ross Burton <ross.burton@intel.com> | 2018-07-03 14:04:12 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-05 00:22:08 +0100 |
commit | 0c1437563b40db682985a4bd2d003613876f4b63 (patch) | |
tree | 8081da9fa44daf190eb7af3da97f0fa8ae901118 /meta/recipes-graphics/drm/libdrm | |
parent | e03660f46effd31fe61af28cb26a016b49ee58db (diff) | |
download | poky-0c1437563b40db682985a4bd2d003613876f4b63.tar.gz |
libdrm: port to Meson
Drop the patch to install tests as the Meson build allows this.
Drop the patch to disable cunit as this predates recipe-specific-sysroots and
isn't required anymore.
As Meson always builds the test suite (instead of building before running it),
add a patch to fix compilation with musl.
(From OE-Core rev: 8dcebad54ded4fa9b3455b674be37ad0b10190d8)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/drm/libdrm')
3 files changed, 35 insertions, 78 deletions
diff --git a/meta/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch b/meta/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch deleted file mode 100644 index 40bebc0f50..0000000000 --- a/meta/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | From e6bd4205b0b546afe991ae6f72256645f4404ad4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
3 | Date: Mon, 5 Sep 2016 14:41:37 +0300 | ||
4 | Subject: [PATCH libdrm] configure.ac: Allow explicit enabling of cunit tests | ||
5 | |||
6 | Add --with-cunit to make it easier to do reproducible builds. Default | ||
7 | is still to probe cunit and build opportunistically. | ||
8 | |||
9 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
10 | Upstream-Status: Submitted [mailing list] | ||
11 | --- | ||
12 | configure.ac | 14 ++++++++++++-- | ||
13 | 1 file changed, 12 insertions(+), 2 deletions(-) | ||
14 | |||
15 | Index: libdrm-2.4.91/configure.ac | ||
16 | =================================================================== | ||
17 | --- libdrm-2.4.91.orig/configure.ac | ||
18 | +++ libdrm-2.4.91/configure.ac | ||
19 | @@ -163,6 +163,12 @@ AC_ARG_ENABLE(install-test-programs, | ||
20 | [Install test programs (default: no)]), | ||
21 | [INSTALL_TESTS=$enableval], [INSTALL_TESTS=no]) | ||
22 | |||
23 | +AC_ARG_WITH([cunit], | ||
24 | + [AS_HELP_STRING([--with-cunit], | ||
25 | + [Build tests that use cunit (default: auto)])], | ||
26 | + [], | ||
27 | + [with_cunit=auto]) | ||
28 | + | ||
29 | dnl =========================================================================== | ||
30 | dnl check compiler flags | ||
31 | AC_DEFUN([LIBDRM_CC_TRY_FLAG], [ | ||
32 | @@ -411,7 +417,7 @@ else | ||
33 | AC_DEFINE(HAVE_RADEON, 0) | ||
34 | fi | ||
35 | |||
36 | -if test "x$AMDGPU" != xno; then | ||
37 | +if test "x$with_cunit" != xno -a "x$AMDGPU" != xno; then | ||
38 | # Detect cunit library | ||
39 | PKG_CHECK_MODULES([CUNIT], [cunit >= 2.1], [have_cunit=yes], [have_cunit=no]) | ||
40 | # If pkg-config does not find cunit, check it using AC_CHECK_LIB. We | ||
41 | @@ -436,7 +442,11 @@ if test "x$AMDGPU" = xyes; then | ||
42 | AC_DEFINE(HAVE_AMDGPU, 1, [Have amdgpu support]) | ||
43 | |||
44 | if test "x$have_cunit" = "xno"; then | ||
45 | - AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests]) | ||
46 | + if test "x$with_cunit" = "xyes"; then | ||
47 | + AC_MSG_ERROR([Could not find cunit library but --with-cunit was given]) | ||
48 | + elif test "x$with_cunit" = "xauto"; then | ||
49 | + AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests]) | ||
50 | + fi | ||
51 | fi | ||
52 | else | ||
53 | AC_DEFINE(HAVE_AMDGPU, 0) | ||
diff --git a/meta/recipes-graphics/drm/libdrm/installtests.patch b/meta/recipes-graphics/drm/libdrm/installtests.patch deleted file mode 100644 index ec1fb0236e..0000000000 --- a/meta/recipes-graphics/drm/libdrm/installtests.patch +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | From 5c6eb43c2f6e7f2ee7c25c92e42f4e4403fa0527 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
3 | Date: Tue, 21 Feb 2017 14:37:52 +0200 | ||
4 | Subject: [PATCH] tests: also install test apps | ||
5 | |||
6 | Upstream-Status: Inappropriate [configuration] | ||
7 | |||
8 | Signed-off-by: Yu Ke <ke.yu@intel.com> | ||
9 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
10 | --- | ||
11 | tests/Makefile.am | 1 + | ||
12 | 1 file changed, 1 insertion(+) | ||
13 | |||
14 | diff --git a/tests/Makefile.am b/tests/Makefile.am | ||
15 | index 0355a92..b4882cd 100644 | ||
16 | --- a/tests/Makefile.am | ||
17 | +++ b/tests/Makefile.am | ||
18 | @@ -45,3 +45,4 @@ TESTS = \ | ||
19 | check_PROGRAMS = \ | ||
20 | $(TESTS) \ | ||
21 | drmdevice | ||
22 | +bin_PROGRAMS = $(check_PROGRAMS) | ||
23 | -- | ||
24 | 2.1.4 | ||
25 | |||
diff --git a/meta/recipes-graphics/drm/libdrm/musl-ioctl.patch b/meta/recipes-graphics/drm/libdrm/musl-ioctl.patch new file mode 100644 index 0000000000..e3d6c5b853 --- /dev/null +++ b/meta/recipes-graphics/drm/libdrm/musl-ioctl.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | Upstream-Status: Submitted | ||
2 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
3 | |||
4 | From 46c0fd6c827a8cb4d04e067bf04fab579ac4712e Mon Sep 17 00:00:00 2001 | ||
5 | From: Ross Burton <ross.burton@intel.com> | ||
6 | Date: Mon, 18 Jun 2018 15:07:03 +0100 | ||
7 | Subject: [PATCH] tests/nouveau/threaded: adapt ioctl signature | ||
8 | |||
9 | POSIX says ioctl() has the signature (int, int, ...) but glibc has decided to | ||
10 | use (int, unsigned long int, ...) instead. | ||
11 | |||
12 | Use a #ifdef to adapt the replacement function as appropriate. | ||
13 | --- | ||
14 | tests/nouveau/threaded.c | 4 ++++ | ||
15 | 1 file changed, 4 insertions(+) | ||
16 | |||
17 | diff --git a/tests/nouveau/threaded.c b/tests/nouveau/threaded.c | ||
18 | index 3669bcd3..e1c27c01 100644 | ||
19 | --- a/tests/nouveau/threaded.c | ||
20 | +++ b/tests/nouveau/threaded.c | ||
21 | @@ -36,7 +36,11 @@ static int failed; | ||
22 | |||
23 | static int import_fd; | ||
24 | |||
25 | +#ifdef __GLIBC__ | ||
26 | int ioctl(int fd, unsigned long request, ...) | ||
27 | +#else | ||
28 | +int ioctl(int fd, int request, ...) | ||
29 | +#endif | ||
30 | { | ||
31 | va_list va; | ||
32 | int ret; | ||
33 | -- | ||
34 | 2.11.0 | ||
35 | |||