diff options
Diffstat (limited to 'meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch')
| -rw-r--r-- | meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch | 93 |
1 files changed, 58 insertions, 35 deletions
diff --git a/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch index a2f61bfdd3..81cc025371 100644 --- a/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch +++ b/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch | |||
| @@ -15,44 +15,46 @@ Upstream-Status: Pending | |||
| 15 | Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> | 15 | Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> |
| 16 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | 16 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> |
| 17 | Signed-off-by: Denys Dmytriyenko <denys@ti.com> | 17 | Signed-off-by: Denys Dmytriyenko <denys@ti.com> |
| 18 | 18 | Signed-off-by: Ming Liu <ming.liu@toradex.com> | |
| 19 | --- | 19 | --- |
| 20 | configure.ac | 9 +++++++-- | 20 | libweston/meson.build | 16 ++++++++++++---- |
| 21 | libweston/weston-launch.c | 20 ++++++++++++++++++++ | 21 | libweston/weston-launch.c | 20 ++++++++++++++++++++ |
| 22 | 2 files changed, 27 insertions(+), 2 deletions(-) | 22 | meson_options.txt | 7 +++++++ |
| 23 | 3 files changed, 39 insertions(+), 4 deletions(-) | ||
| 23 | 24 | ||
| 24 | diff --git a/configure.ac b/configure.ac | 25 | diff --git a/libweston/meson.build b/libweston/meson.build |
| 25 | index 6da6e04..681f7c8 100644 | 26 | index 33ab970..32f495a 100644 |
| 26 | --- a/configure.ac | 27 | --- a/libweston/meson.build |
| 27 | +++ b/configure.ac | 28 | +++ b/libweston/meson.build |
| 28 | @@ -515,13 +515,17 @@ AC_ARG_ENABLE(resize-optimization, | 29 | @@ -472,16 +472,24 @@ if get_option('renderer-gl') |
| 29 | AS_IF([test "x$enable_resize_optimization" = "xyes"], | 30 | endif |
| 30 | [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])]) | 31 | |
| 31 | 32 | if get_option('weston-launch') | |
| 32 | +AC_ARG_WITH(pam, | 33 | - dep_pam = cc.find_library('pam') |
| 33 | + AS_HELP_STRING([--with-pam], [Use PAM]), | 34 | + deps_weston_launch = [systemd_dep, dep_libdrm] |
| 34 | + [use_pam=$withval], [use_pam=yes]) | 35 | |
| 35 | AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes) | 36 | - if not cc.has_function('pam_open_session', dependencies: dep_pam) |
| 36 | AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch = xyes) | 37 | - error('pam_open_session not found for weston-launch') |
| 37 | -if test x$enable_weston_launch = xyes; then | 38 | + if get_option('pam') |
| 38 | +if test x$enable_weston_launch = xyes -a x$use_pam = xyes; then | 39 | + dep_pam = cc.find_library('pam') |
| 39 | WESTON_SEARCH_LIBS([PAM], [pam], [pam_open_session], [have_pam=yes], [have_pam=no]) | 40 | + if not cc.has_function('pam_open_session', dependencies: dep_pam) |
| 40 | if test x$have_pam = xno; then | 41 | + error('pam_open_session not found for weston-launch') |
| 41 | - AC_ERROR([weston-launch requires pam]) | 42 | + endif |
| 42 | + AC_ERROR([PAM support is explicitly requested, but libpam couldn't be found]) | 43 | + |
| 43 | fi | 44 | + if dep_pam.found() |
| 44 | + AC_DEFINE([HAVE_PAM], [1], [Define if PAM is available]) | 45 | + deps_weston_launch += dep_pam |
| 45 | fi | 46 | + config_h.set('HAVE_PAM', '1') |
| 46 | 47 | + endif | |
| 47 | AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes") | 48 | endif |
| 48 | @@ -767,6 +771,7 @@ AC_MSG_RESULT([ | 49 | |
| 49 | Enable developer documentation ${enable_devdocs} | 50 | executable( |
| 50 | 51 | 'weston-launch', | |
| 51 | weston-launch utility ${enable_weston_launch} | 52 | 'weston-launch.c', |
| 52 | + PAM support ${use_pam} | 53 | - dependencies: [dep_pam, systemd_dep, dep_libdrm], |
| 53 | systemd-login support ${have_systemd_login} | 54 | + dependencies: deps_weston_launch, |
| 54 | systemd notify support ${enable_systemd_notify} | 55 | include_directories: include_directories('..'), |
| 55 | 56 | install: true | |
| 57 | ) | ||
| 56 | diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c | 58 | diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c |
| 57 | index 9064439..c6abe92 100644 | 59 | index 9064439..c6abe92 100644 |
| 58 | --- a/libweston/weston-launch.c | 60 | --- a/libweston/weston-launch.c |
| @@ -172,3 +174,24 @@ index 9064439..c6abe92 100644 | |||
| 172 | 174 | ||
| 173 | if (setup_launcher_socket(&wl) < 0) | 175 | if (setup_launcher_socket(&wl) < 0) |
| 174 | exit(EXIT_FAILURE); | 176 | exit(EXIT_FAILURE); |
| 177 | diff --git a/meson_options.txt b/meson_options.txt | ||
| 178 | index 0e1d183..9a5c3d5 100644 | ||
| 179 | --- a/meson_options.txt | ||
| 180 | +++ b/meson_options.txt | ||
| 181 | @@ -73,6 +73,13 @@ option( | ||
| 182 | ) | ||
| 183 | |||
| 184 | option( | ||
| 185 | + 'pam', | ||
| 186 | + type: 'boolean', | ||
| 187 | + value: true, | ||
| 188 | + description: 'Define if PAM is available' | ||
| 189 | +) | ||
| 190 | + | ||
| 191 | +option( | ||
| 192 | 'xwayland', | ||
| 193 | type: 'boolean', | ||
| 194 | value: true, | ||
| 195 | -- | ||
| 196 | 2.7.4 | ||
| 197 | |||
