summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-graphics/wayland/weston
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-graphics/wayland/weston')
-rw-r--r--poky/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch34
-rw-r--r--poky/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch93
2 files changed, 76 insertions, 51 deletions
diff --git a/poky/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/poky/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
index 0eb3d95a6..acea9dbc3 100644
--- a/poky/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
+++ b/poky/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
@@ -9,27 +9,14 @@ kind of systemsi e.g. musl.
Upstream-Status: Submitted
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
+Signed-off-by: Ming Liu <ming.liu@toradex.com>
---
- configure.ac | 2 ++
libweston/weston-error.h | 20 ++++++++++++++++++++
libweston/weston-launch.c | 2 +-
- 3 files changed, 23 insertions(+), 1 deletion(-)
+ meson.build | 1 +
+ 3 files changed, 22 insertions(+), 1 deletion(-)
create mode 100644 libweston/weston-error.h
-diff --git a/configure.ac b/configure.ac
-index c05ad01..6da6e04 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -126,6 +126,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[],
- [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile weston")],
- [[#include <time.h>]])
-
-+AC_CHECK_HEADERS([error.h])
-+
- AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
-
- # check for libdrm as a build-time dependency only
diff --git a/libweston/weston-error.h b/libweston/weston-error.h
new file mode 100644
index 0000000..2089d02
@@ -76,3 +63,18 @@ index bf73e0d..9064439 100644
#define DRM_MAJOR 226
+diff --git a/meson.build b/meson.build
+index 2155b7b..baa52d9 100644
+--- a/meson.build
++++ b/meson.build
+@@ -94,6 +94,7 @@ foreach func : optional_libc_funcs
+ endforeach
+
+ optional_system_headers = [
++ 'error.h',
+ 'linux/sync_file.h'
+ ]
+ foreach hdr : optional_system_headers
+--
+2.7.4
+
diff --git a/poky/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/poky/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
index a2f61bfdd..81cc02537 100644
--- a/poky/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
+++ b/poky/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
@@ -15,44 +15,46 @@ Upstream-Status: Pending
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
-
+Signed-off-by: Ming Liu <ming.liu@toradex.com>
---
- configure.ac | 9 +++++++--
+ libweston/meson.build | 16 ++++++++++++----
libweston/weston-launch.c | 20 ++++++++++++++++++++
- 2 files changed, 27 insertions(+), 2 deletions(-)
+ meson_options.txt | 7 +++++++
+ 3 files changed, 39 insertions(+), 4 deletions(-)
-diff --git a/configure.ac b/configure.ac
-index 6da6e04..681f7c8 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -515,13 +515,17 @@ AC_ARG_ENABLE(resize-optimization,
- AS_IF([test "x$enable_resize_optimization" = "xyes"],
- [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
-
-+AC_ARG_WITH(pam,
-+ AS_HELP_STRING([--with-pam], [Use PAM]),
-+ [use_pam=$withval], [use_pam=yes])
- AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes)
- AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch = xyes)
--if test x$enable_weston_launch = xyes; then
-+if test x$enable_weston_launch = xyes -a x$use_pam = xyes; then
- WESTON_SEARCH_LIBS([PAM], [pam], [pam_open_session], [have_pam=yes], [have_pam=no])
- if test x$have_pam = xno; then
-- AC_ERROR([weston-launch requires pam])
-+ AC_ERROR([PAM support is explicitly requested, but libpam couldn't be found])
- fi
-+ AC_DEFINE([HAVE_PAM], [1], [Define if PAM is available])
- fi
-
- AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes")
-@@ -767,6 +771,7 @@ AC_MSG_RESULT([
- Enable developer documentation ${enable_devdocs}
-
- weston-launch utility ${enable_weston_launch}
-+ PAM support ${use_pam}
- systemd-login support ${have_systemd_login}
- systemd notify support ${enable_systemd_notify}
-
+diff --git a/libweston/meson.build b/libweston/meson.build
+index 33ab970..32f495a 100644
+--- a/libweston/meson.build
++++ b/libweston/meson.build
+@@ -472,16 +472,24 @@ if get_option('renderer-gl')
+ endif
+
+ if get_option('weston-launch')
+- dep_pam = cc.find_library('pam')
++ deps_weston_launch = [systemd_dep, dep_libdrm]
+
+- if not cc.has_function('pam_open_session', dependencies: dep_pam)
+- error('pam_open_session not found for weston-launch')
++ if get_option('pam')
++ dep_pam = cc.find_library('pam')
++ if not cc.has_function('pam_open_session', dependencies: dep_pam)
++ error('pam_open_session not found for weston-launch')
++ endif
++
++ if dep_pam.found()
++ deps_weston_launch += dep_pam
++ config_h.set('HAVE_PAM', '1')
++ endif
+ endif
+
+ executable(
+ 'weston-launch',
+ 'weston-launch.c',
+- dependencies: [dep_pam, systemd_dep, dep_libdrm],
++ dependencies: deps_weston_launch,
+ include_directories: include_directories('..'),
+ install: true
+ )
diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c
index 9064439..c6abe92 100644
--- a/libweston/weston-launch.c
@@ -172,3 +174,24 @@ index 9064439..c6abe92 100644
if (setup_launcher_socket(&wl) < 0)
exit(EXIT_FAILURE);
+diff --git a/meson_options.txt b/meson_options.txt
+index 0e1d183..9a5c3d5 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -73,6 +73,13 @@ option(
+ )
+
+ option(
++ 'pam',
++ type: 'boolean',
++ value: true,
++ description: 'Define if PAM is available'
++)
++
++option(
+ 'xwayland',
+ type: 'boolean',
+ value: true,
+--
+2.7.4
+