diff options
author | Samuli Piippo <samuli.piippo@qt.io> | 2017-08-16 11:16:57 +0300 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@qt.io> | 2017-08-19 05:39:02 +0000 |
commit | a123e940a042dd8ece343466753c3e5ef1db36a3 (patch) | |
tree | 32b8d301eba17eca534c4ea63d1c7d8eed8c9776 /meta-nvidia-extras/recipes | |
parent | a607c77730146fc035665a0d1c83a5717ddb2e6d (diff) | |
download | meta-boot2qt-a123e940a042dd8ece343466753c3e5ef1db36a3.tar.gz |
tegra: include older version of weston for Drive CX
The NVidia toolchain is dependent on using older version of weston/wayland
than poky/pyro currently provides. Add recipes from poky/krogoth which was
still working.
Change-Id: Iaab46edcdf01afd7eed30747395c80fb4bd68c39
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Diffstat (limited to 'meta-nvidia-extras/recipes')
14 files changed, 732 insertions, 13 deletions
diff --git a/meta-nvidia-extras/recipes/weston/weston/0001-configure.ac-Fix-wayland-protocols-path.patch b/meta-nvidia-extras/recipes/weston/weston/0001-configure.ac-Fix-wayland-protocols-path.patch new file mode 100644 index 0000000..5f4d79c --- /dev/null +++ b/meta-nvidia-extras/recipes/weston/weston/0001-configure.ac-Fix-wayland-protocols-path.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 1cfc1434a5d385a74de593ec7601674dba39e2fe Mon Sep 17 00:00:00 2001 | ||
2 | From: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
3 | Date: Wed, 11 May 2016 16:16:30 +0300 | ||
4 | Subject: [PATCH] configure.ac: Fix wayland-protocols path | ||
5 | |||
6 | The wayland-protocols directory is used during build: Fix the path | ||
7 | to point to sysroot specified in recipe. | ||
8 | |||
9 | Normally PKG_CONFIG_SYSROOT_DIR could be used in configure.ac but that | ||
10 | breaks multilib weston as it would point to multilib sysroot when the | ||
11 | (allarch) wayland-protocols is actually in the machine sysroot. | ||
12 | |||
13 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
14 | Upstream-Status: Inappropriate [embedded specific] | ||
15 | --- | ||
16 | configure.ac | 2 +- | ||
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
18 | |||
19 | --- a/configure.ac | ||
20 | +++ b/configure.ac | ||
21 | @@ -187,7 +187,7 @@ PKG_CHECK_MODULES(LIBINPUT_BACKEND, [lib | ||
22 | PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES]) | ||
23 | |||
24 | PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.7], | ||
25 | - [ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`]) | ||
26 | + [ac_wayland_protocols_pkgdatadir=${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`]) | ||
27 | AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir) | ||
28 | |||
29 | AC_ARG_ENABLE(wayland-compositor, [ --enable-wayland-compositor],, | ||
diff --git a/meta-nvidia-extras/recipes/weston/weston/0001-make-error-portable.patch b/meta-nvidia-extras/recipes/weston/weston/0001-make-error-portable.patch new file mode 100644 index 0000000..148848d --- /dev/null +++ b/meta-nvidia-extras/recipes/weston/weston/0001-make-error-portable.patch | |||
@@ -0,0 +1,80 @@ | |||
1 | From c22e90365d89346258394833cbcad03ff32b2e27 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 May 2015 20:56:00 -0700 | ||
4 | Subject: [PATCH weston] make error() portable | ||
5 | |||
6 | error() is not posix but gnu extension so may not be available on all | ||
7 | kind of systemsi e.g. musl. | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | Upstream-Status: Submitted | ||
12 | |||
13 | configure.ac | 2 ++ | ||
14 | src/weston-error.h | 20 ++++++++++++++++++++ | ||
15 | src/weston-launch.c | 2 +- | ||
16 | 3 files changed, 23 insertions(+), 1 deletion(-) | ||
17 | create mode 100644 src/weston-error.h | ||
18 | |||
19 | diff --git a/configure.ac b/configure.ac | ||
20 | index 263fc22..f52cd62 100644 | ||
21 | --- a/configure.ac | ||
22 | +++ b/configure.ac | ||
23 | @@ -57,6 +57,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[], | ||
24 | [[#include <time.h>]]) | ||
25 | AC_CHECK_HEADERS([execinfo.h]) | ||
26 | |||
27 | +AC_CHECK_HEADERS([error.h]) | ||
28 | + | ||
29 | AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate]) | ||
30 | |||
31 | COMPOSITOR_MODULES="wayland-server >= 1.7.93 pixman-1 >= 0.25.2" | ||
32 | diff --git a/src/weston-error.h b/src/weston-error.h | ||
33 | new file mode 100644 | ||
34 | index 0000000..2089d02 | ||
35 | --- /dev/null | ||
36 | +++ b/src/weston-error.h | ||
37 | @@ -0,0 +1,20 @@ | ||
38 | +#ifndef _WESTON_ERROR_H | ||
39 | +#define _WESTON_ERROR_H | ||
40 | + | ||
41 | +#if defined(HAVE_ERROR_H) | ||
42 | +#include <error.h> | ||
43 | +#else | ||
44 | +#include <err.h> | ||
45 | +#include <string.h> | ||
46 | +#define _weston_error(S, E, F, ...) do { \ | ||
47 | + if (E) \ | ||
48 | + err(S, F ": %s", ##__VA_ARGS__, strerror(E)); \ | ||
49 | + else \ | ||
50 | + err(S, F, ##__VA_ARGS__); \ | ||
51 | +} while(0) | ||
52 | + | ||
53 | +#define error _weston_error | ||
54 | +#endif | ||
55 | + | ||
56 | +#endif | ||
57 | + | ||
58 | diff --git a/src/weston-launch.c b/src/weston-launch.c | ||
59 | index 10c66de..3e6d30a 100644 | ||
60 | --- a/src/weston-launch.c | ||
61 | +++ b/src/weston-launch.c | ||
62 | @@ -30,7 +30,6 @@ | ||
63 | #include <poll.h> | ||
64 | #include <errno.h> | ||
65 | |||
66 | -#include <error.h> | ||
67 | #include <getopt.h> | ||
68 | |||
69 | #include <sys/types.h> | ||
70 | @@ -56,6 +55,7 @@ | ||
71 | #endif | ||
72 | |||
73 | #include "weston-launch.h" | ||
74 | +#include "weston-error.h" | ||
75 | |||
76 | #define DRM_MAJOR 226 | ||
77 | |||
78 | -- | ||
79 | 2.1.4 | ||
80 | |||
diff --git a/meta-nvidia-extras/recipes/weston/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/meta-nvidia-extras/recipes/weston/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch new file mode 100644 index 0000000..70b9888 --- /dev/null +++ b/meta-nvidia-extras/recipes/weston/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch | |||
@@ -0,0 +1,174 @@ | |||
1 | From 8ff6ed03ec4079f32e9b34085414e57be4730e04 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Hochstein <tom.hochstein@nxp.com> | ||
3 | Date: Wed, 22 Feb 2017 15:53:30 +0200 | ||
4 | Subject: [PATCH] weston-launch: Provide a default version that doesn't require | ||
5 | PAM | ||
6 | |||
7 | weston-launch requires PAM for starting weston as a non-root user. | ||
8 | |||
9 | Since starting weston as root is a valid use case by itself, if | ||
10 | PAM is not available, provide a default version of weston-launch | ||
11 | without non-root-user support. | ||
12 | |||
13 | Upstream-Status: Pending | ||
14 | |||
15 | Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> | ||
16 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
17 | --- | ||
18 | configure.ac | 9 +++++++-- | ||
19 | libweston/weston-launch.c | 20 ++++++++++++++++++++ | ||
20 | 2 files changed, 27 insertions(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/configure.ac b/configure.ac | ||
23 | index 46cb2c7..bb45f46 100644 | ||
24 | --- a/configure.ac | ||
25 | +++ b/configure.ac | ||
26 | @@ -435,13 +435,17 @@ AC_ARG_ENABLE(resize-optimization, | ||
27 | AS_IF([test "x$enable_resize_optimization" = "xyes"], | ||
28 | [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])]) | ||
29 | |||
30 | +AC_ARG_WITH(pam, | ||
31 | + AS_HELP_STRING([--with-pam], [Use PAM]), | ||
32 | + [use_pam=$withval], [use_pam=yes]) | ||
33 | AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes) | ||
34 | AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch = xyes) | ||
35 | -if test x$enable_weston_launch = xyes; then | ||
36 | +if test x$enable_weston_launch = xyes -a x$use_pam = xyes; then | ||
37 | WESTON_SEARCH_LIBS([PAM], [pam], [pam_open_session], [have_pam=yes], [have_pam=no]) | ||
38 | if test x$have_pam = xno; then | ||
39 | - AC_ERROR([weston-launch requires pam]) | ||
40 | + AC_ERROR([PAM support is explicitly requested, but libpam couldn't be found]) | ||
41 | fi | ||
42 | + AC_DEFINE([HAVE_PAM], [1], [Define if PAM is available]) | ||
43 | fi | ||
44 | |||
45 | AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes") | ||
46 | @@ -701,6 +705,7 @@ AC_MSG_RESULT([ | ||
47 | Enable developer documentation ${enable_devdocs} | ||
48 | |||
49 | weston-launch utility ${enable_weston_launch} | ||
50 | + PAM support ${use_pam} | ||
51 | systemd-login support ${have_systemd_login} | ||
52 | systemd notify support ${enable_systemd_notify} | ||
53 | |||
54 | diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c | ||
55 | index 0491896..07e7469 100644 | ||
56 | --- a/libweston/weston-launch.c | ||
57 | +++ b/libweston/weston-launch.c | ||
58 | @@ -51,7 +51,9 @@ | ||
59 | |||
60 | #include <pwd.h> | ||
61 | #include <grp.h> | ||
62 | +#ifdef HAVE_PAM | ||
63 | #include <security/pam_appl.h> | ||
64 | +#endif | ||
65 | |||
66 | #ifdef HAVE_SYSTEMD_LOGIN | ||
67 | #include <systemd/sd-login.h> | ||
68 | @@ -93,8 +95,10 @@ drmSetMaster(int drm_fd) | ||
69 | #endif | ||
70 | |||
71 | struct weston_launch { | ||
72 | +#ifdef HAVE_PAM | ||
73 | struct pam_conv pc; | ||
74 | pam_handle_t *ph; | ||
75 | +#endif | ||
76 | int tty; | ||
77 | int ttynr; | ||
78 | int sock[2]; | ||
79 | @@ -181,6 +185,7 @@ weston_launch_allowed(struct weston_launch *wl) | ||
80 | return false; | ||
81 | } | ||
82 | |||
83 | +#ifdef HAVE_PAM | ||
84 | static int | ||
85 | pam_conversation_fn(int msg_count, | ||
86 | const struct pam_message **messages, | ||
87 | @@ -221,6 +226,7 @@ setup_pam(struct weston_launch *wl) | ||
88 | |||
89 | return 0; | ||
90 | } | ||
91 | +#endif | ||
92 | |||
93 | static int | ||
94 | setup_launcher_socket(struct weston_launch *wl) | ||
95 | @@ -414,6 +420,7 @@ quit(struct weston_launch *wl, int status) | ||
96 | close(wl->signalfd); | ||
97 | close(wl->sock[0]); | ||
98 | |||
99 | +#ifdef HAVE_PAM | ||
100 | if (wl->new_user) { | ||
101 | err = pam_close_session(wl->ph, 0); | ||
102 | if (err) | ||
103 | @@ -421,6 +428,7 @@ quit(struct weston_launch *wl, int status) | ||
104 | err, pam_strerror(wl->ph, err)); | ||
105 | pam_end(wl->ph, err); | ||
106 | } | ||
107 | +#endif | ||
108 | |||
109 | if (ioctl(wl->tty, KDSKBMUTE, 0) && | ||
110 | ioctl(wl->tty, KDSKBMODE, wl->kb_mode)) | ||
111 | @@ -600,6 +608,7 @@ setup_session(struct weston_launch *wl, char **child_argv) | ||
112 | setenv("HOME", wl->pw->pw_dir, 1); | ||
113 | setenv("SHELL", wl->pw->pw_shell, 1); | ||
114 | |||
115 | +#ifdef HAVE_PAM | ||
116 | env = pam_getenvlist(wl->ph); | ||
117 | if (env) { | ||
118 | for (i = 0; env[i]; ++i) { | ||
119 | @@ -608,6 +617,7 @@ setup_session(struct weston_launch *wl, char **child_argv) | ||
120 | } | ||
121 | free(env); | ||
122 | } | ||
123 | +#endif | ||
124 | |||
125 | /* | ||
126 | * We open a new session, so it makes sense | ||
127 | @@ -675,7 +685,9 @@ static void | ||
128 | help(const char *name) | ||
129 | { | ||
130 | fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); | ||
131 | +#ifdef HAVE_PAM | ||
132 | fprintf(stderr, " -u, --user Start session as specified username\n"); | ||
133 | +#endif | ||
134 | fprintf(stderr, " -t, --tty Start session on alternative tty\n"); | ||
135 | fprintf(stderr, " -v, --verbose Be verbose\n"); | ||
136 | fprintf(stderr, " -h, --help Display this help message\n"); | ||
137 | @@ -688,7 +700,9 @@ main(int argc, char *argv[]) | ||
138 | int i, c; | ||
139 | char *tty = NULL; | ||
140 | struct option opts[] = { | ||
141 | +#ifdef HAVE_PAM | ||
142 | { "user", required_argument, NULL, 'u' }, | ||
143 | +#endif | ||
144 | { "tty", required_argument, NULL, 't' }, | ||
145 | { "verbose", no_argument, NULL, 'v' }, | ||
146 | { "help", no_argument, NULL, 'h' }, | ||
147 | @@ -700,9 +714,13 @@ main(int argc, char *argv[]) | ||
148 | while ((c = getopt_long(argc, argv, "u:t::vh", opts, &i)) != -1) { | ||
149 | switch (c) { | ||
150 | case 'u': | ||
151 | +#ifdef HAVE_PAM | ||
152 | wl.new_user = optarg; | ||
153 | if (getuid() != 0) | ||
154 | error(1, 0, "Permission denied. -u allowed for root only"); | ||
155 | +#else | ||
156 | + error(1, 0, "-u is unsupported in this weston-launch build"); | ||
157 | +#endif | ||
158 | break; | ||
159 | case 't': | ||
160 | tty = optarg; | ||
161 | @@ -740,8 +758,10 @@ main(int argc, char *argv[]) | ||
162 | if (setup_tty(&wl, tty) < 0) | ||
163 | exit(EXIT_FAILURE); | ||
164 | |||
165 | +#ifdef HAVE_PAM | ||
166 | if (wl.new_user && setup_pam(&wl) < 0) | ||
167 | exit(EXIT_FAILURE); | ||
168 | +#endif | ||
169 | |||
170 | if (setup_launcher_socket(&wl) < 0) | ||
171 | exit(EXIT_FAILURE); | ||
172 | -- | ||
173 | 2.1.4 | ||
174 | |||
diff --git a/meta-nvidia-extras/recipes/weston/weston/add-config-option-for-no-input-device.patch b/meta-nvidia-extras/recipes/weston/weston/add-config-option-for-no-input-device.patch new file mode 100644 index 0000000..93376ef --- /dev/null +++ b/meta-nvidia-extras/recipes/weston/weston/add-config-option-for-no-input-device.patch | |||
@@ -0,0 +1,125 @@ | |||
1 | From 6c89292024cc08d4499916dc153c354175bd81c4 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org> | ||
3 | Date: Fri, 21 Oct 2016 14:03:13 -0500 | ||
4 | Subject: [PATCH] Add configuration option for no input device. | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | [Backported from master, 75b7197.) | ||
10 | |||
11 | As it has been discussed in the past [1], running Weston | ||
12 | without any input device at launch might be beneficial for | ||
13 | some use cases. | ||
14 | |||
15 | Certainly, it's best for the vast majority of users (and | ||
16 | the project) to require an input device to be present, as | ||
17 | to avoid frustration and hassle, but for those brave souls | ||
18 | that so prefer, this patch lets them run without any input | ||
19 | device at all. | ||
20 | |||
21 | This introduces a simple configuration in weston.ini: | ||
22 | [core] | ||
23 | require-input=true | ||
24 | |||
25 | True is the default, so no behavioral change is introduced. | ||
26 | |||
27 | [1] https://lists.freedesktop.org/archives/wayland-devel/2015-November/025193.html | ||
28 | |||
29 | Signed-off-by: Daniel DÃaz <daniel.diaz@linaro.org> | ||
30 | Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> | ||
31 | Reviewed-by: Daniel Stone <daniels@collabora.com> | ||
32 | --- | ||
33 | man/weston.ini.man | 5 +++++ | ||
34 | src/compositor.h | 4 ++++ | ||
35 | src/libinput-seat.c | 6 ++++++ | ||
36 | src/main.c | 5 +++++ | ||
37 | weston.ini.in | 1 + | ||
38 | 5 files changed, 21 insertions(+) | ||
39 | |||
40 | diff --git a/man/weston.ini.man b/man/weston.ini.man | ||
41 | index a9b6026..668b16f 100644 | ||
42 | --- a/man/weston.ini.man | ||
43 | +++ b/man/weston.ini.man | ||
44 | @@ -169,6 +169,11 @@ time, the one specified in the command-line will be used. On the other | ||
45 | hand, if none of these sets the value, default idle timeout will be | ||
46 | set to 300 seconds. | ||
47 | .RS | ||
48 | +.PP | ||
49 | +.RE | ||
50 | +.TP 7 | ||
51 | +.BI "require-input=" true | ||
52 | +require an input device for launch | ||
53 | |||
54 | .SH "LIBINPUT SECTION" | ||
55 | The | ||
56 | diff --git a/src/compositor.h b/src/compositor.h | ||
57 | index c4c81f0..292a412 100644 | ||
58 | --- a/src/compositor.h | ||
59 | +++ b/src/compositor.h | ||
60 | @@ -701,6 +701,10 @@ struct weston_compositor { | ||
61 | |||
62 | void *user_data; | ||
63 | void (*exit)(struct weston_compositor *c); | ||
64 | + | ||
65 | + /* Whether to let the compositor run without any input device. */ | ||
66 | + bool require_input; | ||
67 | + | ||
68 | }; | ||
69 | |||
70 | struct weston_buffer { | ||
71 | diff --git a/src/libinput-seat.c b/src/libinput-seat.c | ||
72 | index c9f9ed2..1c4c358 100644 | ||
73 | --- a/src/libinput-seat.c | ||
74 | +++ b/src/libinput-seat.c | ||
75 | @@ -250,6 +250,12 @@ udev_input_enable(struct udev_input *input) | ||
76 | devices_found = 1; | ||
77 | } | ||
78 | |||
79 | + if (devices_found == 0 && !c->require_input) { | ||
80 | + weston_log("warning: no input devices found, but none required " | ||
81 | + "as per configuration.\n"); | ||
82 | + return 0; | ||
83 | + } | ||
84 | + | ||
85 | if (devices_found == 0) { | ||
86 | weston_log( | ||
87 | "warning: no input devices on entering Weston. " | ||
88 | diff --git a/src/main.c b/src/main.c | ||
89 | index a98570e..b8632e9 100644 | ||
90 | --- a/src/main.c | ||
91 | +++ b/src/main.c | ||
92 | @@ -658,6 +658,7 @@ int main(int argc, char *argv[]) | ||
93 | struct wl_client *primary_client; | ||
94 | struct wl_listener primary_client_destroyed; | ||
95 | struct weston_seat *seat; | ||
96 | + int require_input; | ||
97 | |||
98 | const struct weston_option core_options[] = { | ||
99 | { WESTON_OPTION_STRING, "backend", 'B', &backend }, | ||
100 | @@ -737,6 +738,10 @@ int main(int argc, char *argv[]) | ||
101 | if (weston_compositor_init_config(ec, config) < 0) | ||
102 | goto out_signals; | ||
103 | |||
104 | + weston_config_section_get_bool(section, "require-input", | ||
105 | + &require_input, true); | ||
106 | + ec->require_input = require_input; | ||
107 | + | ||
108 | if (backend_init(ec, &argc, argv, config) < 0) { | ||
109 | weston_log("fatal: failed to create compositor backend\n"); | ||
110 | goto out_signals; | ||
111 | diff --git a/weston.ini.in b/weston.ini.in | ||
112 | index 06b51df..e9ef992 100644 | ||
113 | --- a/weston.ini.in | ||
114 | +++ b/weston.ini.in | ||
115 | @@ -2,6 +2,7 @@ | ||
116 | #modules=xwayland.so,cms-colord.so | ||
117 | #shell=desktop-shell.so | ||
118 | #gbm-format=xrgb2101010 | ||
119 | +#require-input=true | ||
120 | |||
121 | [shell] | ||
122 | background-image=/usr/share/backgrounds/gnome/Aqua.jpg | ||
123 | -- | ||
124 | 1.9.1 | ||
125 | |||
diff --git a/meta-nvidia-extras/recipes/weston/weston/disable-wayland-scanner-pkg-check.patch b/meta-nvidia-extras/recipes/weston/weston/disable-wayland-scanner-pkg-check.patch deleted file mode 100644 index 062da5c..0000000 --- a/meta-nvidia-extras/recipes/weston/weston/disable-wayland-scanner-pkg-check.patch +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | Index: weston-1.5.0/configure.ac | ||
2 | =================================================================== | ||
3 | --- weston-1.5.0.orig/configure.ac | ||
4 | +++ weston-1.5.0/configure.ac | ||
5 | @@ -503,7 +503,7 @@ if test x$wayland_scanner = x; then | ||
6 | AC_MSG_ERROR([wayland-scanner is needed to compile weston]) | ||
7 | fi | ||
8 | |||
9 | -PKG_CHECK_MODULES(WAYLAND_SCANNER, wayland-scanner) | ||
10 | +#PKG_CHECK_MODULES(WAYLAND_SCANNER, wayland-scanner) | ||
11 | |||
12 | AC_CONFIG_FILES([Makefile src/version.h src/weston.pc]) | ||
13 | |||
diff --git a/meta-nvidia-extras/recipes/weston/weston/explicit-enable-disable-systemd.patch b/meta-nvidia-extras/recipes/weston/weston/explicit-enable-disable-systemd.patch new file mode 100644 index 0000000..a40eaf1 --- /dev/null +++ b/meta-nvidia-extras/recipes/weston/weston/explicit-enable-disable-systemd.patch | |||
@@ -0,0 +1,70 @@ | |||
1 | From 8e1efcd40b3bad81c83744e2e120d70c2b567ef2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Frederico Cadete <frederico@cadete.eu> | ||
3 | Date: Mon, 28 Sep 2015 00:30:10 +0200 | ||
4 | Subject: configure.ac: add explicit enable/disable for systemd-login support | ||
5 | |||
6 | Otherwise, auto-enable depending on whether the system has the necessary | ||
7 | libraries. | ||
8 | |||
9 | [Updated help text as per pq suggestion -- bwh] | ||
10 | |||
11 | Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> | ||
12 | Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> | ||
13 | Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> | ||
14 | |||
15 | Upstream-Status: Backport | ||
16 | Backported from Weston git: | ||
17 | http://cgit.freedesktop.org/wayland/weston/commit/?id=8e1efc | ||
18 | |||
19 | Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk> | ||
20 | |||
21 | diff --git a/configure.ac b/configure.ac | ||
22 | index a9cd429..67e80d0 100644 | ||
23 | --- a/configure.ac | ||
24 | +++ b/configure.ac | ||
25 | @@ -380,18 +380,30 @@ AC_ARG_ENABLE(resize-optimization, | ||
26 | AS_IF([test "x$enable_resize_optimization" = "xyes"], | ||
27 | [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])]) | ||
28 | |||
29 | -PKG_CHECK_MODULES(SYSTEMD_LOGIN, | ||
30 | - [libsystemd >= 209], | ||
31 | - [have_systemd_login_209=yes;have_systemd_login=yes], | ||
32 | - [have_systemd_login_209=no;have_systemd_login=no]) | ||
33 | - | ||
34 | -# Older versions of systemd package systemd-login separately. Fall back on that | ||
35 | -AS_IF([test x$have_systemd_login != xyes],[ | ||
36 | - PKG_CHECK_MODULES(SYSTEMD_LOGIN, | ||
37 | - [libsystemd-login >= 198], | ||
38 | - [have_systemd_login=yes], | ||
39 | - [have_systemd_login=no]) | ||
40 | - ]) | ||
41 | +AC_ARG_ENABLE(systemd-login, | ||
42 | + AS_HELP_STRING([--enable-systemd-login], | ||
43 | + [Enable logind support]),, | ||
44 | + enable_systemd_login=auto) | ||
45 | +if test x$enable_systemd_login != xno; then | ||
46 | + PKG_CHECK_MODULES(SYSTEMD_LOGIN, | ||
47 | + [libsystemd >= 209], | ||
48 | + [have_systemd_login_209=yes;have_systemd_login=yes], | ||
49 | + [have_systemd_login_209=no;have_systemd_login=no]) | ||
50 | + | ||
51 | + # Older versions of systemd package systemd-login separately. Fall back on that | ||
52 | + AS_IF([test x$have_systemd_login != xyes],[ | ||
53 | + PKG_CHECK_MODULES(SYSTEMD_LOGIN, | ||
54 | + [libsystemd-login >= 198], | ||
55 | + [have_systemd_login=yes], | ||
56 | + [have_systemd_login=no]) | ||
57 | + ]) | ||
58 | +else | ||
59 | + have_systemd_login=no | ||
60 | +fi | ||
61 | + | ||
62 | +if test "x$have_systemd_login" = "xno" -a "x$enable_systemd_login" = "xyes"; then | ||
63 | + AC_MSG_ERROR([systemd-login support explicitly enabled, but can't find libsystemd>=209 or libsystemd-login]) | ||
64 | +fi | ||
65 | |||
66 | AS_IF([test "x$have_systemd_login" = "xyes"], | ||
67 | [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])]) | ||
68 | -- | ||
69 | cgit v0.10.2 | ||
70 | |||
diff --git a/meta-nvidia-extras/recipes/weston/weston/libsystemd.patch b/meta-nvidia-extras/recipes/weston/weston/libsystemd.patch new file mode 100644 index 0000000..2d28d56 --- /dev/null +++ b/meta-nvidia-extras/recipes/weston/weston/libsystemd.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From 5eb025a867b42f8bc7bc73279eac8de58e51a13e Mon Sep 17 00:00:00 2001 | ||
2 | From: Frederico Cadete <frederico@cadete.eu> | ||
3 | Date: Mon, 28 Sep 2015 00:30:09 +0200 | ||
4 | Subject: configure.ac: add support for new versions of systemd | ||
5 | |||
6 | Starting from systemd version 209, a single libsystemd.pc is provided. | ||
7 | For previous versions, fall back on libsystemd-login.pc. | ||
8 | |||
9 | Signed-off-by: Frederico Cadete <frederico@cadete.eu> | ||
10 | Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> | ||
11 | Reviewed-by: Derek Foreman <derekf@osg.samsung.com> | ||
12 | |||
13 | Upstream-Status: Backport | ||
14 | Backported from Weston git: | ||
15 | http://cgit.freedesktop.org/wayland/weston/commit/?id=5eb025 | ||
16 | |||
17 | Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk> | ||
18 | |||
19 | diff --git a/configure.ac b/configure.ac | ||
20 | index 045291c..a9cd429 100644 | ||
21 | --- a/configure.ac | ||
22 | +++ b/configure.ac | ||
23 | @@ -380,14 +380,23 @@ AC_ARG_ENABLE(resize-optimization, | ||
24 | AS_IF([test "x$enable_resize_optimization" = "xyes"], | ||
25 | [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])]) | ||
26 | |||
27 | -PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login >= 198], | ||
28 | - [have_systemd_login=yes], [have_systemd_login=no]) | ||
29 | +PKG_CHECK_MODULES(SYSTEMD_LOGIN, | ||
30 | + [libsystemd >= 209], | ||
31 | + [have_systemd_login_209=yes;have_systemd_login=yes], | ||
32 | + [have_systemd_login_209=no;have_systemd_login=no]) | ||
33 | + | ||
34 | +# Older versions of systemd package systemd-login separately. Fall back on that | ||
35 | +AS_IF([test x$have_systemd_login != xyes],[ | ||
36 | + PKG_CHECK_MODULES(SYSTEMD_LOGIN, | ||
37 | + [libsystemd-login >= 198], | ||
38 | + [have_systemd_login=yes], | ||
39 | + [have_systemd_login=no]) | ||
40 | + ]) | ||
41 | + | ||
42 | AS_IF([test "x$have_systemd_login" = "xyes"], | ||
43 | [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])]) | ||
44 | AM_CONDITIONAL(HAVE_SYSTEMD_LOGIN, test "x$have_systemd_login" = "xyes") | ||
45 | |||
46 | -PKG_CHECK_MODULES(SYSTEMD_LOGIN_209, [libsystemd-login >= 209], | ||
47 | - [have_systemd_login_209=yes], [have_systemd_login_209=no]) | ||
48 | AS_IF([test "x$have_systemd_login_209" = "xyes"], | ||
49 | [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])]) | ||
50 | |||
51 | -- | ||
52 | cgit v0.10.2 | ||
53 | |||
diff --git a/meta-nvidia-extras/recipes/weston/weston/make-lcms-explicitly-configurable.patch b/meta-nvidia-extras/recipes/weston/weston/make-lcms-explicitly-configurable.patch new file mode 100644 index 0000000..35e6d6f --- /dev/null +++ b/meta-nvidia-extras/recipes/weston/weston/make-lcms-explicitly-configurable.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | weston-1.5.0/configure.ac: make lcms explicitly configurable | ||
2 | |||
3 | The lcms package is outside of openembedded-core, so make it | ||
4 | explicitly configurable. Make it deterministic, so that if lcms | ||
5 | dependencies are missing, autoconf throws a fatal error. Follow | ||
6 | upstream style to make it more likely to be merged. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Index: weston-1.5.0/configure.ac | ||
11 | =================================================================== | ||
12 | --- weston-1.5.0.orig/configure.ac | ||
13 | +++ weston-1.5.0/configure.ac | ||
14 | @@ -491,12 +491,24 @@ AC_ARG_ENABLE(demo-clients-install, | ||
15 | enable_demo_clients_install=no) | ||
16 | AM_CONDITIONAL(INSTALL_DEMO_CLIENTS, [test "x$enable_demo_clients_install" = "xyes"]) | ||
17 | |||
18 | -PKG_CHECK_MODULES(LCMS, lcms2, | ||
19 | - [have_lcms=yes], [have_lcms=no]) | ||
20 | -if test "x$have_lcms" = xyes; then | ||
21 | - AC_DEFINE(HAVE_LCMS, 1, [Have lcms support]) | ||
22 | +AC_ARG_ENABLE(lcms, | ||
23 | + AS_HELP_STRING([--disable-lcms], | ||
24 | + [Disable lcms support]),, | ||
25 | + enable_lcms=auto) | ||
26 | +AM_CONDITIONAL(HAVE_LCMS, [test "x$enable_lcms" = xyes]) | ||
27 | +if test "x$enable_lcms" != "xno"; then | ||
28 | + PKG_CHECK_MODULES(LCMS, | ||
29 | + lcms2, | ||
30 | + [have_lcms=yes], | ||
31 | + [have_lcms=no]) | ||
32 | + if test "x$have_lcms" = "xno" -a "x$enable_lcms" = "xyes"; then | ||
33 | + AC_MSG_ERROR([lcms support explicitly requested, but lcms couldn't be found]) | ||
34 | + fi | ||
35 | + if test "x$have_lcms" = "xyes"; then | ||
36 | + enable_lcms=yes | ||
37 | + AC_DEFINE(HAVE_LCMS, 1, [Have lcms support]) | ||
38 | + fi | ||
39 | fi | ||
40 | -AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = xyes]) | ||
41 | |||
42 | AC_PATH_PROG([wayland_scanner], [wayland-scanner]) | ||
43 | if test x$wayland_scanner = x; then | ||
diff --git a/meta-nvidia-extras/recipes/weston/weston/make-libwebp-explicitly-configurable.patch b/meta-nvidia-extras/recipes/weston/weston/make-libwebp-explicitly-configurable.patch new file mode 100644 index 0000000..ad07d4f --- /dev/null +++ b/meta-nvidia-extras/recipes/weston/weston/make-libwebp-explicitly-configurable.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | |||
2 | The libwebp package is outside of openembedded-core, so make it | ||
3 | explicitly configurable. Make it deterministic, so that if libwebp | ||
4 | dependencies are missing, autoconf throws a fatal error. | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Index: weston-1.5.0/configure.ac | ||
9 | =================================================================== | ||
10 | --- weston-1.5.0.orig/configure.ac | ||
11 | +++ weston-1.5.0/configure.ac | ||
12 | @@ -268,9 +268,22 @@ fi | ||
13 | |||
14 | PKG_CHECK_MODULES(PIXMAN, [pixman-1]) | ||
15 | PKG_CHECK_MODULES(PNG, [libpng]) | ||
16 | -PKG_CHECK_MODULES(WEBP, [libwebp], [have_webp=yes], [have_webp=no]) | ||
17 | -AS_IF([test "x$have_webp" = "xyes"], | ||
18 | - [AC_DEFINE([HAVE_WEBP], [1], [Have webp])]) | ||
19 | +AC_ARG_ENABLE(webp, | ||
20 | + AS_HELP_STRING([--disable-webp], | ||
21 | + [Disable libwebp support]),, | ||
22 | + enable_webp=auto) | ||
23 | +AM_CONDITIONAL(HAVE_WEBP, [test "x$enable_webp" = xyes]) | ||
24 | +AS_IF([test "x$enable_webp" != "xno"], | ||
25 | + PKG_CHECK_MODULES(WEBP, | ||
26 | + [libwebp], | ||
27 | + [have_webp=yes], | ||
28 | + [have_webp=no]) | ||
29 | + AS_IF([test "x$have_webp" = "xno" -a "x$enable_webp" = "xyes"], | ||
30 | + AC_MSG_ERROR([libwebp support explicitly request, but lipwebp could not be found])) | ||
31 | + AS_IF([test "x$have_webp" = "xyes"], | ||
32 | + [enable_webp=yes] | ||
33 | + [AC_DEFINE([HAVE_WEBP], [1], [Have webp])]) | ||
34 | +) | ||
35 | |||
36 | AC_ARG_ENABLE(vaapi-recorder, [ --enable-vaapi-recorder],, | ||
37 | enable_vaapi_recorder=auto) | ||
diff --git a/meta-nvidia-extras/recipes/weston/weston/weston.desktop b/meta-nvidia-extras/recipes/weston/weston/weston.desktop new file mode 100644 index 0000000..1086ae8 --- /dev/null +++ b/meta-nvidia-extras/recipes/weston/weston/weston.desktop | |||
@@ -0,0 +1,9 @@ | |||
1 | [Desktop Entry] | ||
2 | Encoding=UTF-8 | ||
3 | Type=Application | ||
4 | Name=Weston | ||
5 | Comment=Wayland Compostitor | ||
6 | Exec=weston | ||
7 | Icon=weston | ||
8 | Terminal=false | ||
9 | Categories=Utility; | ||
diff --git a/meta-nvidia-extras/recipes/weston/weston/weston.png b/meta-nvidia-extras/recipes/weston/weston/weston.png new file mode 100644 index 0000000..ea8b7e0 --- /dev/null +++ b/meta-nvidia-extras/recipes/weston/weston/weston.png | |||
Binary files differ | |||
diff --git a/meta-nvidia-extras/recipes/weston/weston/xwayland.weston-start b/meta-nvidia-extras/recipes/weston/weston/xwayland.weston-start new file mode 100644 index 0000000..b483c97 --- /dev/null +++ b/meta-nvidia-extras/recipes/weston/weston/xwayland.weston-start | |||
@@ -0,0 +1,7 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | if type Xwayland >/dev/null 2>/dev/null; then | ||
4 | mkdir -p /tmp/.X11-unix | ||
5 | |||
6 | add_weston_argument "--modules=xwayland.so" | ||
7 | fi | ||
diff --git a/meta-nvidia-extras/recipes/weston/weston_%.bbappend b/meta-nvidia-extras/recipes/weston/weston_%.bbappend index 22f0f11..e9a2154 100644 --- a/meta-nvidia-extras/recipes/weston/weston_%.bbappend +++ b/meta-nvidia-extras/recipes/weston/weston_%.bbappend | |||
@@ -28,5 +28,6 @@ | |||
28 | ############################################################################ | 28 | ############################################################################ |
29 | 29 | ||
30 | PACKAGECONFIG_remove = "kms" | 30 | PACKAGECONFIG_remove = "kms" |
31 | DEPENDS += "drm" | ||
31 | 32 | ||
32 | TARGET_CFLAGS += "-DWIN_INTERFACE_CUSTOM" | 33 | TARGET_CFLAGS += "-DWIN_INTERFACE_CUSTOM" |
diff --git a/meta-nvidia-extras/recipes/weston/weston_1.9.0.bb b/meta-nvidia-extras/recipes/weston/weston_1.9.0.bb new file mode 100644 index 0000000..3fdfbab --- /dev/null +++ b/meta-nvidia-extras/recipes/weston/weston_1.9.0.bb | |||
@@ -0,0 +1,104 @@ | |||
1 | SUMMARY = "Weston, a Wayland compositor" | ||
2 | DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" | ||
3 | HOMEPAGE = "http://wayland.freedesktop.org" | ||
4 | LICENSE = "MIT" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ | ||
6 | file://src/compositor.c;endline=23;md5=1d535fed266cf39f6d8c0647f52ac331" | ||
7 | |||
8 | SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ | ||
9 | file://weston.png \ | ||
10 | file://weston.desktop \ | ||
11 | file://make-lcms-explicitly-configurable.patch \ | ||
12 | file://make-libwebp-explicitly-configurable.patch \ | ||
13 | file://0001-make-error-portable.patch \ | ||
14 | file://libsystemd.patch \ | ||
15 | file://explicit-enable-disable-systemd.patch \ | ||
16 | file://add-config-option-for-no-input-device.patch \ | ||
17 | " | ||
18 | SRC_URI[md5sum] = "66bbba12f546570b4d97f676bc79a28e" | ||
19 | SRC_URI[sha256sum] = "9c1b03f3184fa0b0dfdf67e215048085156e1a2ca344af6613fed36794ac48cf" | ||
20 | |||
21 | inherit autotools pkgconfig useradd distro_features_check | ||
22 | # depends on virtual/egl | ||
23 | REQUIRED_DISTRO_FEATURES = "opengl" | ||
24 | |||
25 | DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg" | ||
26 | DEPENDS += "wayland libinput virtual/egl pango wayland-native" | ||
27 | |||
28 | EXTRA_OECONF = "--enable-setuid-install \ | ||
29 | --enable-simple-clients \ | ||
30 | --enable-clients \ | ||
31 | --enable-demo-clients-install \ | ||
32 | --disable-rpi-compositor \ | ||
33 | --disable-rdp-compositor \ | ||
34 | " | ||
35 | |||
36 | EXTRA_OECONF_append_qemux86 = "\ | ||
37 | WESTON_NATIVE_BACKEND=fbdev-backend.so \ | ||
38 | " | ||
39 | EXTRA_OECONF_append_qemux86-64 = "\ | ||
40 | WESTON_NATIVE_BACKEND=fbdev-backend.so \ | ||
41 | " | ||
42 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \ | ||
43 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ | ||
44 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'launch', '', d)} \ | ||
45 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ | ||
46 | " | ||
47 | # | ||
48 | # Compositor choices | ||
49 | # | ||
50 | # Weston on KMS | ||
51 | PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev" | ||
52 | # Weston on Wayland (nested Weston) | ||
53 | PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa" | ||
54 | # Weston on X11 | ||
55 | PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo" | ||
56 | # Headless Weston | ||
57 | PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor" | ||
58 | # Weston on framebuffer | ||
59 | PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev" | ||
60 | # weston-launch | ||
61 | PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,libpam drm" | ||
62 | # VA-API desktop recorder | ||
63 | PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva" | ||
64 | # Weston with EGL support | ||
65 | PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl" | ||
66 | # Weston with cairo glesv2 support | ||
67 | PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo" | ||
68 | # Weston with lcms support | ||
69 | PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms" | ||
70 | # Weston with webp support | ||
71 | PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp" | ||
72 | # Weston with unwinding support | ||
73 | PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind" | ||
74 | # Weston with systemd-login support | ||
75 | PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus" | ||
76 | # Weston with Xwayland support | ||
77 | PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,libxcb libxcursor cairo" | ||
78 | # colord CMS support | ||
79 | PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord" | ||
80 | |||
81 | do_install_append() { | ||
82 | # Weston doesn't need the .la files to load modules, so wipe them | ||
83 | rm -f ${D}/${libdir}/weston/*.la | ||
84 | |||
85 | # If X11, ship a desktop file to launch it | ||
86 | if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "x11" ]; then | ||
87 | install -d ${D}${datadir}/applications | ||
88 | install ${WORKDIR}/weston.desktop ${D}${datadir}/applications | ||
89 | |||
90 | install -d ${D}${datadir}/icons/hicolor/48x48/apps | ||
91 | install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps | ||
92 | fi | ||
93 | } | ||
94 | |||
95 | PACKAGES += "${PN}-examples" | ||
96 | |||
97 | FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}" | ||
98 | FILES_${PN}-examples = "${bindir}/*" | ||
99 | |||
100 | RDEPENDS_${PN} += "xkeyboard-config" | ||
101 | RRECOMMENDS_${PN} = "liberation-fonts" | ||
102 | |||
103 | USERADD_PACKAGES = "${PN}" | ||
104 | GROUPADD_PARAM_${PN} = "--system weston-launch" | ||