diff options
Diffstat (limited to 'meta')
3 files changed, 102 insertions, 74 deletions
diff --git a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch index 0eb3d95a6d..acea9dbc31 100644 --- a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch +++ b/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch | |||
| @@ -9,27 +9,14 @@ kind of systemsi e.g. musl. | |||
| 9 | Upstream-Status: Submitted | 9 | Upstream-Status: Submitted |
| 10 | 10 | ||
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 12 | 12 | Signed-off-by: Ming Liu <ming.liu@toradex.com> | |
| 13 | --- | 13 | --- |
| 14 | configure.ac | 2 ++ | ||
| 15 | libweston/weston-error.h | 20 ++++++++++++++++++++ | 14 | libweston/weston-error.h | 20 ++++++++++++++++++++ |
| 16 | libweston/weston-launch.c | 2 +- | 15 | libweston/weston-launch.c | 2 +- |
| 17 | 3 files changed, 23 insertions(+), 1 deletion(-) | 16 | meson.build | 1 + |
| 17 | 3 files changed, 22 insertions(+), 1 deletion(-) | ||
| 18 | create mode 100644 libweston/weston-error.h | 18 | create mode 100644 libweston/weston-error.h |
| 19 | 19 | ||
| 20 | diff --git a/configure.ac b/configure.ac | ||
| 21 | index c05ad01..6da6e04 100644 | ||
| 22 | --- a/configure.ac | ||
| 23 | +++ b/configure.ac | ||
| 24 | @@ -126,6 +126,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[], | ||
| 25 | [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile weston")], | ||
| 26 | [[#include <time.h>]]) | ||
| 27 | |||
| 28 | +AC_CHECK_HEADERS([error.h]) | ||
| 29 | + | ||
| 30 | AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate]) | ||
| 31 | |||
| 32 | # check for libdrm as a build-time dependency only | ||
| 33 | diff --git a/libweston/weston-error.h b/libweston/weston-error.h | 20 | diff --git a/libweston/weston-error.h b/libweston/weston-error.h |
| 34 | new file mode 100644 | 21 | new file mode 100644 |
| 35 | index 0000000..2089d02 | 22 | index 0000000..2089d02 |
| @@ -76,3 +63,18 @@ index bf73e0d..9064439 100644 | |||
| 76 | 63 | ||
| 77 | #define DRM_MAJOR 226 | 64 | #define DRM_MAJOR 226 |
| 78 | 65 | ||
| 66 | diff --git a/meson.build b/meson.build | ||
| 67 | index 2155b7b..baa52d9 100644 | ||
| 68 | --- a/meson.build | ||
| 69 | +++ b/meson.build | ||
| 70 | @@ -94,6 +94,7 @@ foreach func : optional_libc_funcs | ||
| 71 | endforeach | ||
| 72 | |||
| 73 | optional_system_headers = [ | ||
| 74 | + 'error.h', | ||
| 75 | 'linux/sync_file.h' | ||
| 76 | ] | ||
| 77 | foreach hdr : optional_system_headers | ||
| 78 | -- | ||
| 79 | 2.7.4 | ||
| 80 | |||
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 | |||
diff --git a/meta/recipes-graphics/wayland/weston_6.0.1.bb b/meta/recipes-graphics/wayland/weston_6.0.1.bb index 95b540333e..fe8f1b8c31 100644 --- a/meta/recipes-graphics/wayland/weston_6.0.1.bb +++ b/meta/recipes-graphics/wayland/weston_6.0.1.bb | |||
| @@ -8,8 +8,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ | |||
| 8 | SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ | 8 | SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ |
| 9 | file://weston.png \ | 9 | file://weston.png \ |
| 10 | file://weston.desktop \ | 10 | file://weston.desktop \ |
| 11 | file://0001-make-error-portable.patch \ | ||
| 12 | file://xwayland.weston-start \ | 11 | file://xwayland.weston-start \ |
| 12 | file://0001-make-error-portable.patch \ | ||
| 13 | file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ | 13 | file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ |
| 14 | " | 14 | " |
| 15 | SRC_URI[md5sum] = "e7b10710ef1eac82258f97bfd41fe534" | 15 | SRC_URI[md5sum] = "e7b10710ef1eac82258f97bfd41fe534" |
| @@ -17,7 +17,7 @@ SRC_URI[sha256sum] = "bf2f6d5aae2e11cabb6bd69a76bcf9edb084f8c3e14ca769bea7234a51 | |||
| 17 | 17 | ||
| 18 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" | 18 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" |
| 19 | 19 | ||
| 20 | inherit autotools pkgconfig useradd distro_features_check | 20 | inherit meson pkgconfig useradd distro_features_check |
| 21 | # depends on virtual/egl | 21 | # depends on virtual/egl |
| 22 | REQUIRED_DISTRO_FEATURES = "opengl" | 22 | REQUIRED_DISTRO_FEATURES = "opengl" |
| 23 | 23 | ||
| @@ -26,49 +26,48 @@ DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" | |||
| 26 | 26 | ||
| 27 | WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" | 27 | WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" |
| 28 | 28 | ||
| 29 | EXTRA_OECONF = "--enable-setuid-install \ | 29 | EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false" |
| 30 | --disable-rdp-compositor \ | 30 | |
| 31 | --enable-autotools \ | ||
| 32 | " | ||
| 33 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \ | 31 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \ |
| 34 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ | 32 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ |
| 35 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ | 33 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ |
| 34 | ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ | ||
| 36 | clients launch" | 35 | clients launch" |
| 37 | # | 36 | # |
| 38 | # Compositor choices | 37 | # Compositor choices |
| 39 | # | 38 | # |
| 40 | # Weston on KMS | 39 | # Weston on KMS |
| 41 | PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa virtual/libgbm mtdev" | 40 | PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/mesa virtual/libgbm mtdev" |
| 42 | # Weston on Wayland (nested Weston) | 41 | # Weston on Wayland (nested Weston) |
| 43 | PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa" | 42 | PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/mesa" |
| 44 | # Weston on X11 | 43 | # Weston on X11 |
| 45 | PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo" | 44 | PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo" |
| 46 | # Headless Weston | 45 | # Headless Weston |
| 47 | PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor" | 46 | PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" |
| 48 | # Weston on framebuffer | 47 | # Weston on framebuffer |
| 49 | PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev" | 48 | PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" |
| 50 | # weston-launch | 49 | # weston-launch |
| 51 | PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm" | 50 | PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm" |
| 52 | # VA-API desktop recorder | 51 | # VA-API desktop recorder |
| 53 | PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva" | 52 | PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" |
| 54 | # Weston with EGL support | 53 | # Weston with EGL support |
| 55 | PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl" | 54 | PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" |
| 56 | # Weston with cairo glesv2 support | ||
| 57 | PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo" | ||
| 58 | # Weston with lcms support | 55 | # Weston with lcms support |
| 59 | PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms" | 56 | PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" |
| 60 | # Weston with webp support | 57 | # Weston with webp support |
| 61 | PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp" | 58 | PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" |
| 62 | # Weston with systemd-login support | 59 | # Weston with systemd-login support |
| 63 | PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus" | 60 | PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" |
| 64 | # Weston with Xwayland support (requires X11 and Wayland) | 61 | # Weston with Xwayland support (requires X11 and Wayland) |
| 65 | PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland" | 62 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" |
| 66 | # colord CMS support | 63 | # colord CMS support |
| 67 | PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord" | 64 | PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" |
| 68 | # Clients support | 65 | # Clients support |
| 69 | PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients" | 66 | PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" |
| 67 | # Virtual remote output with GStreamer on DRM backend | ||
| 68 | PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer-1.0" | ||
| 70 | # Weston with PAM support | 69 | # Weston with PAM support |
| 71 | PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" | 70 | PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" |
| 72 | 71 | ||
| 73 | do_install_append() { | 72 | do_install_append() { |
| 74 | # Weston doesn't need the .la files to load modules, so wipe them | 73 | # Weston doesn't need the .la files to load modules, so wipe them |
| @@ -86,6 +85,10 @@ do_install_append() { | |||
| 86 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then | 85 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then |
| 87 | install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland | 86 | install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland |
| 88 | fi | 87 | fi |
| 88 | |||
| 89 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then | ||
| 90 | chmod u+s ${D}${bindir}/weston-launch | ||
| 91 | fi | ||
| 89 | } | 92 | } |
| 90 | 93 | ||
| 91 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ | 94 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ |
