weston: change to use meson build system
PATCH 1/1 weston: change to use meson build system
From: Ming Liu <[email protected]>
The changes include:
- Drop all autotools related patches.
- Move weston-launch setuid-install to do_install task since it's not supported yet by meson build.
- Drop cairo-glesv2 package config, it's not supported by meson build, it is hardcoded to cairo-image for now in weston source.
- Introduce remoting package config, without it meson would run into a build error.
--- .../wayland/weston/0001-make-error-portable.patch | 34 ++++---- ...ch-Provide-a-default-version-that-doesn-t.patch | 93 ++++++++++++++-------- meta/recipes-graphics/wayland/weston_6.0.0.bb | 48 +++++------ 3 files changed, 101 insertions(+), 74 deletions(-)
meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch +18 -16
@@ -9,27 +9,14 @@ kind of systemsi e.g. musl. Upstream-Status: Submitted Signed-off-by: Khem Raj <[email protected]> - +Signed-off-by: Ming Liu <[email protected]> --- - 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 +
meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch +58 -35
105 lines not on this page · raw message
meta/recipes-graphics/wayland/weston_6.0.0.bb +25 -23
93 lines not on this page · raw message
Signature · 1 line
2.7.4
Quoted 2 lines · On Thu, 25 Jul 2019 at 12:42, <[email protected]> wrote:
- Introduce remoting package config, without it meson would run into a build error.
Did you tell upstream about this?
Ross
Quoted 3 lines · Ross
Quoted 2 lines · On Thu, 25 Jul 2019 at 12:42, <[email protected]> wrote:
- Introduce remoting package config, without it meson would run into a build error.
What do you mean by that exactly, I guess it does build at all with remoting, and by introducing a packaging config you disable it for now?
Quoted 2 lines
Did you tell upstream about this?
There is actually Weston 6.0.1 with some Meson related fixed, also remoting:
https://gitlab.freedesktop.org/wayland/weston/commits/6.0.1
We probably should upgrade to 6.0.1 too.
--
Stefan
Sorry, I did not describe it correctly, as Stefan said, it’s not a build issue with meson, but we need explicitly set the remoting option on or off
, or else we will have a gstreamer dependency missing issue. I will change
the commit message here in V2.
//Ming Liu
Quoted 7 lines · On Thu, 25 Jul 2019 at 12:42, <[email protected]> wrote:
Quoted 2 lines
- Introduce remoting package config, without it meson would run into a build error.
Did you tell upstream about this?
Ross
FYI,
I have made a V2 patch, but I noticed Denys Dmytriyenko had sent a patch to upgrade weston from 6.0.0 to 6.0.1, I would like to send out the V2 patch later after it’s merged.
//Ming Liu
Sorry, I did not describe it correctly, as Stefan said, it’s not a build
Quoted 15 lines
issue with meson, but we need explicitly set the remoting option on or off
, or else we will have a gstreamer dependency missing issue. I will change
the commit message here in V2.//Ming Liu
Quoted 7 lines · On Thu, 25 Jul 2019 at 12:42, <[email protected]> wrote:
Quoted 2 lines
- Introduce remoting package config, without it meson would run into a build error.
Did you tell upstream about this?
Ross
Hi Ming,
Thanks for working on that!
Quoted 8 lines · On 2019-07-25 13:41, [email protected] wrote:
From: Ming Liu <[email protected]>
The changes include:
- Drop all autotools related patches.
- Move weston-launch setuid-install todo_installtask since it's not supported yet by meson build.
- Drop cairo-glesv2 package config, it's not supported by meson build, it is hardcoded to cairo-image for now in weston source.
It seem that upstream recommends cairo image anyway (see README.md). I am not exactly sure why, but this bug seems to indicate that using the image backend is more efficient?
https://gitlab.freedesktop.org/wayland/weston/issues/46
I actually realized that meta-freescale uses the cairo-glesv2 package config.
[added Tom to CC who added the package config a while ago]
I guess we should send a patch to remove that.
Otherwise the patch looks good to me. I like the fact that this patch mostly migrates 1:1 to Meson without changing anything else.
--
Stefan
Quoted 326 lines
- Introduce remoting package config, without it meson would run into a build error.
Signed-off-by Stefan Agner <[email protected]>Signed-off-by Ming Liu <[email protected]>--- .../wayland/weston/0001-make-error-portable.patch | 34 ++++---- ...ch-Provide-a-default-version-that-doesn-t.patch | 93 ++++++++++++++-------- meta/recipes-graphics/wayland/weston_6.0.0.bb | 48 +++++------ 3 files changed, 101 insertions(+), 74 deletions(-)diff --git
a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patchb/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patchindex 0eb3d95..acea9db 100644meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch +18
-16@@ -9,27 +9,14 @@ kind of systemsi e.g. musl. Upstream-Status: Submitted Signed-off-by: Khem Raj <[email protected]> - +Signed-off-by: Ming Liu <[email protected]> --- - 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/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patchb/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patchindex a2f61bf..81cc025 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.patchmeta/recipes-graphics/wayland/weston/0001-make-error-portable.patch +58
-35@@ -15,44 +15,46 @@ Upstream-Status: Pending Signed-off-by: Tom Hochstein <[email protected]> Signed-off-by: Jussi Kukkonen <[email protected]> Signed-off-by: Denys Dmytriyenko <[email protected]> - +Signed-off-by: Ming Liu <[email protected]> --- - 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 +meta/recipes-graphics/wayland/weston_6.0.0.bb +1
-1@@ -8,8 +8,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ file://weston.png \ file://weston.desktop \ - file://0001-make-error-portable.patch \ file://xwayland.weston-start \ + file://0001-make-error-portable.patch \file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
"
SRC_URI[md5sum] = "7c634e262f8a464a076c97fd50ad36b3"meta/recipes-graphics/wayland/weston_6.0.0.bb +0
-0@@ -17,7 +17,7 @@ SRC_URI[sha256sum] ="
546323a90607b3bd7f48809ea9d76e64cd09718102f2deca6d95aa59a8
UPSTREAM_CHECK_URI= "https://wayland.freedesktop.org/releases.html"meta/recipes-graphics/wayland/weston_6.0.0.bb +1
-1-inherit autotools pkgconfig useradd distro_features_check +inherit meson pkgconfig useradd distro_features_check # depends on virtual/egl REQUIRED_DISTRO_FEATURES = "opengl"@@ -26,10 +26,8 @@ DEPENDS += "wayland wayland-protocols libinputvirtual/egl pango wayland-native"
WESTON_MAJOR_VERSION= "${@'.'.join(d.getVar('PV').split('.')[0:1])}"meta/recipes-graphics/wayland/weston_6.0.0.bb +2
-4-EXTRA_OECONF = "--enable-setuid-install \ - --disable-rdp-compositor \ - --enable-autotools \ - " +EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false" + PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland','kms fbdev wayland egl', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemdx11', d)} \
meta/recipes-graphics/wayland/weston_6.0.0.bb +0
-0@@ -38,37 +36,37 @@ PACKAGECONFIG ??="${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev
# Compositor choices
#
# Weston on KMS
-PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa virtual/libgbm mtdev"
+PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/mesa virtual/libgbm mtdev"
# Weston on Wayland (nested Weston)
-PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa" +PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/mesa"
# Weston on X11
-PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo"
+PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo"
# Headless Weston
-PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor"meta/recipes-graphics/wayland/weston_6.0.0.bb +1
-1+PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" # Weston on framebuffer -PACKAGECONFIG[fbdev] ="--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev"
meta/recipes-graphics/wayland/weston_6.0.0.bb +3
-2+PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" # weston-launch -PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm" +PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm" # VA-API desktop recorder -PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva" +PACKAGECONFIG[vaapi] ="-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva"
# Weston with EGL supportmeta/recipes-graphics/wayland/weston_6.0.0.bb +2
-6-PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl" -# Weston with cairo glesv2 support -PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo" +PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" # Weston with lcms support -PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms" +PACKAGECONFIG[lcms] ="-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms"
# Weston with webp supportmeta/recipes-graphics/wayland/weston_6.0.0.bb +1
-2-PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp" +PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" # Weston with systemd-login support -PACKAGECONFIG[systemd] ="--enable-systemd-login,--disable-systemd-login,systemd dbus"
meta/recipes-graphics/wayland/weston_6.0.0.bb +1
-1+PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemddbus"
# Weston with Xwayland support (requires X11 and Wayland)meta/recipes-graphics/wayland/weston_6.0.0.bb +2
-2-PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland" +PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" # colord CMS support -PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord" +PACKAGECONFIG[colord] ="-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord"
# Clients supportmeta/recipes-graphics/wayland/weston_6.0.0.bb +4
-5-PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients" +PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" +# Virtual remote output with GStreamer on DRM backend +PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer-1.0" # Weston with PAM support -PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" +PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" do_install_append() { # Weston doesn't need the .la files to load modules, so wipe them@@ -86,6 +84,10 @@ do_install_append() { if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no',d)}" = "yes" ]; then
install -Dm 644 ${WORKDIR}/xwayland.weston-start
${D}${datadir}/weston-start/xwaylandmeta/recipes-graphics/wayland/weston_6.0.0.bb +2
-0fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no',d)}" = "yes" ]; then
meta/recipes-graphics/wayland/weston_6.0.0.bb +2
-0+ chmod u+s ${D}${bindir}/weston-launch + fi } PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland','${PN}-xwayland', '', d)} \
Signature · 1 line
2.7.4
Thanks for the review, will send a V2 as you suggested.
//Ming Liu
Hi Ming,
Quoted 377 lines
Thanks for working on that!
Quoted 8 lines · On 2019-07-25 13:41, [email protected] wrote:
From: Ming Liu <[email protected]>
The changes include:
- Drop all autotools related patches.
- Move weston-launch setuid-install todo_installtask since it's not supported yet by meson build.
- Drop cairo-glesv2 package config, it's not supported by meson build, it is hardcoded to cairo-image for now in weston source.It seem that upstream recommends cairo image anyway (see README.md). I am not exactly sure why, but this bug seems to indicate that using the image backend is more efficient?
https://gitlab.freedesktop.org/wayland/weston/issues/46I actually realized that meta-freescale uses the cairo-glesv2 package config.
[added Tom to CC who added the package config a while ago]
I guess we should send a patch to remove that.
Otherwise the patch looks good to me. I like the fact that this patch mostly migrates 1:1 to Meson without changing anything else.
--
StefanQuoted 8 lines
- Introduce remoting package config, without it meson would run into a build error.
Signed-off-by Stefan Agner <[email protected]>Signed-off-by Ming Liu <[email protected]>--- .../wayland/weston/0001-make-error-portable.patch | 34 ++++---- ...ch-Provide-a-default-version-that-doesn-t.patch | 93++++++++++++++--------
Quoted 20 lines
meta/recipes-graphics/wayland/weston_6.0.0.bb | 48 +++++------ 3 files changed, 101 insertions(+), 74 deletions(-)diff --git
a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patchb/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patchindex 0eb3d95..acea9db 100644meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch +1
-3@@ -9,27 +9,14 @@ kind of systemsi e.g. musl. Upstream-Status: Submitted Signed-off-by: Khem Raj <[email protected]> - +Signed-off-by: Ming Liu <[email protected]> --- - configure.ac | 2 ++ libweston/weston-error.h | 20 ++++++++++++++++++++ libweston/weston-launch.c | 2 +- - 3 files changed, 23 insertions(+), 1 deletion(-)meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch kind of systemsi e.g. musl. · line 25
Quoted 10 lines
meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch +2
-6+ 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 compileweston")],
Quoted 29 lines
meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch +15
-7- [[#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 +Quoted 2 lines
diff --git
a/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patchQuoted 1 line
b/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patchQuoted 3 lines
index a2f61bf..81cc025 100644
---
a/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patchQuoted 2 lines
+++
b/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patchQuoted 56 lines
meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch +10
-35@@ -15,44 +15,46 @@ Upstream-Status: Pending Signed-off-by: Tom Hochstein <[email protected]> Signed-off-by: Jussi Kukkonen <[email protected]> Signed-off-by: Denys Dmytriyenko <[email protected]> - +Signed-off-by: Ming Liu <[email protected]> --- - 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') + endifmeta/recipes-graphics/wayland/weston/0001-make-error-portable.patch Upstream-Status: Pending
Quoted 10 lines
meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch +10
-0+ + 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)Quoted 1 line
++ error('pam_open_session not found for
weston-launch')
Quoted 50 lines
++ endif
++
++ ifdep_pam.found()
++deps_weston_launch+=dep_pam
++config_h.set('HAVE_PAM', '1')
++ endifmeta/recipes-graphics/wayland/weston/0001-make-error-portable.patch +31
-0+ 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 +meta/recipes-graphics/wayland/weston_6.0.0.bb +0
-0meta/recipes-graphics/wayland/weston_6.0.0.bb LIC_FILES_CHKSUM = · line 9
Quoted 2 lines
meta/recipes-graphics/wayland/weston_6.0.0.bb +0
-0@@ -8,8 +8,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz\
Quoted 55 lines
meta/recipes-graphics/wayland/weston_6.0.0.bb +1
-1file://weston.png \ file://weston.desktop \ - file://0001-make-error-portable.patch \ file://xwayland.weston-start \ + file://0001-make-error-portable.patch \file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
"
SRC_URI[md5sum] = "7c634e262f8a464a076c97fd50ad36b3"meta/recipes-graphics/wayland/weston_6.0.0.bb +0
-0@@ -17,7 +17,7 @@ SRC_URI[sha256sum] ="
546323a90607b3bd7f48809ea9d76e64cd09718102f2deca6d95aa59a8
UPSTREAM_CHECK_URI= "https://wayland.freedesktop.org/releases.html"meta/recipes-graphics/wayland/weston_6.0.0.bb +1
-1-inherit autotools pkgconfig useradd distro_features_check +inherit meson pkgconfig useradd distro_features_check # depends on virtual/egl REQUIRED_DISTRO_FEATURES = "opengl"@@ -26,10 +26,8 @@ DEPENDS += "wayland wayland-protocols libinputvirtual/egl pango wayland-native"
WESTON_MAJOR_VERSION= "${@'.'.join(d.getVar('PV').split('.')[0:1])}"meta/recipes-graphics/wayland/weston_6.0.0.bb +2
-4-EXTRA_OECONF = "--enable-setuid-install \ - --disable-rdp-compositor \ - --enable-autotools \ - " +EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false" + PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland','kms fbdev wayland egl', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemdx11', d)} \
meta/recipes-graphics/wayland/weston_6.0.0.bb +0
-0@@ -38,37 +36,37 @@ PACKAGECONFIG ??="${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev
# Compositor choices
#
# Weston on KMS
-PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa virtual/libgbm mtdev"
+PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/mesa virtual/libgbm mtdev"
# Weston on Wayland (nested Weston)
-PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa" +PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/mesa"
# Weston on X11
-PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11Quoted 8 lines
libxcb libxcb libxcursor cairo"
+PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo"
# Headless Weston
-PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor" +PACKAGECONFIG[headless] ="-Dbackend-headless=true,-Dbackend-headless=false"
Quoted 4 lines
# Weston on framebuffer
-PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev" +PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udevmtdev"
Quoted 2 lines
# weston-launch -PACKAGECONFIG[launch] ="--enable-weston-launch,--disable-weston-launch,drm"
meta/recipes-graphics/wayland/weston_6.0.0.bb PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev
Quoted 3 lines
meta/recipes-graphics/wayland/weston_6.0.0.bb +1
-1+PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm" # VA-API desktop recorder -PACKAGECONFIG[vaapi] ="--enable-vaapi-recorder,--disable-vaapi-recorder,libva"
Quoted 2 lines
+PACKAGECONFIG[vaapi] =
"-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva"
meta/recipes-graphics/wayland/weston_6.0.0.bb
Quoted 6 lines
# Weston with EGL support
meta/recipes-graphics/wayland/weston_6.0.0.bb +0
-5-PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl" -# Weston with cairo glesv2 support -PACKAGECONFIG[cairo-glesv2] ="--with-cairo-glesv2,--with-cairo=image,cairo"
Quoted 1 line
+PACKAGECONFIG[egl] =
"-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl"
Quoted 21 lines
# Weston with lcms support
meta/recipes-graphics/wayland/weston_6.0.0.bb +1
-1-PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms" +PACKAGECONFIG[lcms] ="-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms"
# Weston with webp supportmeta/recipes-graphics/wayland/weston_6.0.0.bb +1
-2-PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp" +PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" # Weston with systemd-login support -PACKAGECONFIG[systemd] ="--enable-systemd-login,--disable-systemd-login,systemd dbus"
meta/recipes-graphics/wayland/weston_6.0.0.bb +1
-1+PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemddbus"
# Weston with Xwayland support (requires X11 and Wayland)meta/recipes-graphics/wayland/weston_6.0.0.bb +2
-2-PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland" +PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" # colord CMS support -PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord" +PACKAGECONFIG[colord] ="-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord"
# Clients supportmeta/recipes-graphics/wayland/weston_6.0.0.bb
Quoted 7 lines
meta/recipes-graphics/wayland/weston_6.0.0.bb +3
-4-PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients" +PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" +# Virtual remote output with GStreamer on DRM backend +PACKAGECONFIG[remoting] ="-Dremoting=true,-Dremoting=false,gstreamer-1.0"
meta/recipes-graphics/wayland/weston_6.0.0.bb do_install_append() { · line 84
Quoted 8 lines
# Weston with PAM support
meta/recipes-graphics/wayland/weston_6.0.0.bb +1
-1-PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" +PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" do_install_append() { # Weston doesn't need the .la files to load modules, so wipe them@@ -86,6 +84,10 @@ do_install_append() { if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes','no',
Quoted 15 lines
d)}" = "yes" ]; then
install -Dm 644 ${WORKDIR}/xwayland.weston-start${D}${datadir}/weston-start/xwayland
fimeta/recipes-graphics/wayland/weston_6.0.0.bb +2
-0+ + if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no',d)}" = "yes" ]; then
meta/recipes-graphics/wayland/weston_6.0.0.bb +2
-0+ chmod u+s ${D}${bindir}/weston-launch + fi } PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland','${PN}-xwayland', '', d)} \
--
2.7.4