From 0afe1a124193cd8a7d58b900c087e8fde88669aa Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Thu, 28 Jan 2021 13:35:03 +0100 Subject: weston: update to 9.0.0.imx NXP release imx_5.4.70_2.3.0. 0001-weston-launch-Provide-a-default-version-that-doesn-t.patch update taken from NXP BSP. Signed-off-by: Max Krummenacher (cherry picked from commit 9fe41a141e5d70463da2b88fc04687233e85cd20) --- ...ch-Provide-a-default-version-that-doesn-t.patch | 27 +-- .../wayland/weston/dont-use-plane-add-prop.patch | 23 +++ recipes-graphics/wayland/weston_8.0.0.imx.bb | 169 ------------------ recipes-graphics/wayland/weston_9.0.0.imx.bb | 192 +++++++++++++++++++++ 4 files changed, 229 insertions(+), 182 deletions(-) create mode 100644 recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch delete mode 100644 recipes-graphics/wayland/weston_8.0.0.imx.bb create mode 100644 recipes-graphics/wayland/weston_9.0.0.imx.bb diff --git a/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch index 62b864c1..3279a728 100644 --- a/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch +++ b/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch @@ -1,7 +1,8 @@ -From 5f2d71998eb77068cbaee2d468cbb296a42d5739 Mon Sep 17 00:00:00 2001 +From a1548c742bf2dedbb47282d8a00407b60bbab669 Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Wed, 22 Feb 2017 15:53:30 +0200 Subject: [PATCH] weston-launch: Provide a default version that doesn't require + PAM weston-launch requires PAM for starting weston as a non-root user. @@ -57,7 +58,7 @@ index 08d23ec..cb9fd3f 100644 install: true ) diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c -index 8a711b4..54c567a 100644 +index 521cb2c..2d42d33 100644 --- a/libweston/weston-launch.c +++ b/libweston/weston-launch.c @@ -51,7 +51,9 @@ @@ -97,7 +98,7 @@ index 8a711b4..54c567a 100644 static int setup_launcher_socket(struct weston_launch *wl) -@@ -431,6 +437,7 @@ quit(struct weston_launch *wl, int status) +@@ -466,6 +472,7 @@ quit(struct weston_launch *wl, int status) close(wl->signalfd); close(wl->sock[0]); @@ -105,15 +106,15 @@ index 8a711b4..54c567a 100644 if (wl->new_user) { err = pam_close_session(wl->ph, 0); if (err) -@@ -438,6 +445,7 @@ quit(struct weston_launch *wl, int status) +@@ -473,6 +480,7 @@ quit(struct weston_launch *wl, int status) err, pam_strerror(wl->ph, err)); pam_end(wl->ph, err); } +#endif - if (ioctl(wl->tty, KDSKBMUTE, 0) && - ioctl(wl->tty, KDSKBMODE, wl->kb_mode)) -@@ -666,6 +674,7 @@ setup_session(struct weston_launch *wl, char **child_argv) + /* + * Get a fresh handle to the tty as the previous one is in +@@ -710,6 +718,7 @@ setup_session(struct weston_launch *wl, char **child_argv) setenv("HOME", wl->pw->pw_dir, 1); setenv("SHELL", wl->pw->pw_shell, 1); @@ -121,7 +122,7 @@ index 8a711b4..54c567a 100644 env = pam_getenvlist(wl->ph); if (env) { for (i = 0; env[i]; ++i) { -@@ -674,6 +683,7 @@ setup_session(struct weston_launch *wl, char **child_argv) +@@ -718,6 +727,7 @@ setup_session(struct weston_launch *wl, char **child_argv) } free(env); } @@ -129,7 +130,7 @@ index 8a711b4..54c567a 100644 /* * We open a new session, so it makes sense -@@ -745,8 +755,10 @@ static void +@@ -789,8 +799,10 @@ static void help(const char *name) { fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); @@ -140,7 +141,7 @@ index 8a711b4..54c567a 100644 fprintf(stderr, " -t, --tty Start session on alternative tty,\n" " e.g. -t /dev/tty4, requires -u option.\n"); fprintf(stderr, " -v, --verbose Be verbose\n"); -@@ -760,7 +772,9 @@ main(int argc, char *argv[]) +@@ -804,7 +816,9 @@ main(int argc, char *argv[]) int i, c; char *tty = NULL; struct option opts[] = { @@ -150,7 +151,7 @@ index 8a711b4..54c567a 100644 { "tty", required_argument, NULL, 't' }, { "verbose", no_argument, NULL, 'v' }, { "help", no_argument, NULL, 'h' }, -@@ -772,11 +786,16 @@ main(int argc, char *argv[]) +@@ -816,11 +830,16 @@ main(int argc, char *argv[]) while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) { switch (c) { case 'u': @@ -167,7 +168,7 @@ index 8a711b4..54c567a 100644 break; case 't': tty = optarg; -@@ -828,8 +847,10 @@ main(int argc, char *argv[]) +@@ -872,8 +891,10 @@ main(int argc, char *argv[]) if (setup_tty(&wl, tty) < 0) exit(EXIT_FAILURE); @@ -179,7 +180,7 @@ index 8a711b4..54c567a 100644 if (setup_launcher_socket(&wl) < 0) exit(EXIT_FAILURE); diff --git a/meson_options.txt b/meson_options.txt -index c862ecc..73ef2c3 100644 +index 239bd2d..99e4ec3 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -73,6 +73,13 @@ option( diff --git a/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch b/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch new file mode 100644 index 00000000..a4444e5d --- /dev/null +++ b/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch @@ -0,0 +1,23 @@ +Fix atomic modesetting with musl + +atomic modesetting seems to fail with drm weston backend and this patch fixes +it, below errors are seen before weston exits + +atomic: couldn't commit new state: Invalid argument + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/issues/158] +Signed-off-by: Khem Raj + +--- a/libweston/backend-drm/kms.c ++++ b/libweston/backend-drm/kms.c +@@ -1168,8 +1168,8 @@ drm_pending_state_apply_atomic(struct dr + wl_list_for_each(plane, &b->plane_list, link) { + drm_debug(b, "\t\t[atomic] starting with plane %lu disabled\n", + (unsigned long) plane->plane_id); +- plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0); +- plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0); ++ //plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0); ++ //plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0); + } + + flags |= DRM_MODE_ATOMIC_ALLOW_MODESET; diff --git a/recipes-graphics/wayland/weston_8.0.0.imx.bb b/recipes-graphics/wayland/weston_8.0.0.imx.bb deleted file mode 100644 index ba2e9f93..00000000 --- a/recipes-graphics/wayland/weston_8.0.0.imx.bb +++ /dev/null @@ -1,169 +0,0 @@ -# This recipe is for the i.MX fork of weston. For ease of -# maintenance, the top section is a verbatim copy of an OE-core -# recipe. The second section customizes the recipe for i.MX. - -########### OE-core copy ################## -# Upstream hash: 9b1d30810eeecb46b977c8eed68be69aef891312 - -SUMMARY = "Weston, a Wayland compositor" -DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" -HOMEPAGE = "http://wayland.freedesktop.org" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ - file://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a" - -SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ - file://weston.png \ - file://weston.desktop \ - file://xwayland.weston-start \ - file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ -" -SRC_URI[md5sum] = "53e4810d852df0601d01fd986a5b22b3" -SRC_URI[sha256sum] = "7518b49b2eaa1c3091f24671bdcc124fd49fc8f1af51161927afa4329c027848" - -UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" - -inherit meson pkgconfig useradd features_check -# depends on virtual/egl -REQUIRED_DISTRO_FEATURES = "opengl" - -DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg" -DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" - -WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" - -EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false" - -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ - ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ - launch" -# -# Compositor choices -# -# Weston on KMS -PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" -# Weston on Wayland (nested Weston) -PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" -# Weston on X11 -PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo" -# Headless Weston -PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" -# Weston on framebuffer -PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" -# weston-launch -PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm" -# VA-API desktop recorder -PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" -# Weston with EGL support -PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" -# Weston with lcms support -PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" -# Weston with webp support -PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" -# Weston with systemd-login support -PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" -# Weston with Xwayland support (requires X11 and Wayland) -PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor" -# colord CMS support -PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" -# Clients support -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] = "-Dpam=true,-Dpam=false,libpam" - -do_install_append() { - # Weston doesn't need the .la files to load modules, so wipe them - rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la - - # If X11, ship a desktop file to launch it - if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then - install -d ${D}${datadir}/applications - install ${WORKDIR}/weston.desktop ${D}${datadir}/applications - - install -d ${D}${datadir}/icons/hicolor/48x48/apps - install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps - fi - - if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then - install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland - fi - - if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then - chmod u+s ${D}${bindir}/weston-launch - fi -} - -PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ - libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" - -FILES_${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" -FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" - -FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" -SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." - -FILES_${PN}-examples = "${bindir}/*" - -FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" -RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland" - -RDEPENDS_${PN} += "xkeyboard-config" -RRECOMMENDS_${PN} = "weston-init liberation-fonts" -RRECOMMENDS_${PN}-dev += "wayland-protocols" - -USERADD_PACKAGES = "${PN}" -GROUPADD_PARAM_${PN} = "--system weston-launch" - -########### End of OE-core copy ########### - -########### i.MX overrides ################ - -SUMMARY = "Weston, a Wayland compositor, i.MX fork" - -DEFAULT_PREFERENCE = "-1" - -SRCBRANCH = "weston-imx-8.0" -SRC_URI = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} \ - file://weston.png \ - file://weston.desktop \ - file://xwayland.weston-start \ - file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ -" -SRCREV = "f13d40a3a0504a00baf2f28abe83b65dab8b2e10" -S = "${WORKDIR}/git" - -# Disable OpenGL for parts with GPU support for 2D but not 3D -REQUIRED_DISTRO_FEATURES = "opengl" -REQUIRED_DISTRO_FEATURES_imxgpu2d = "" -REQUIRED_DISTRO_FEATURES_imxgpu3d = "opengl" -PACKAGECONFIG_OPENGL = "opengl" -PACKAGECONFIG_OPENGL_imxgpu2d = "" -PACKAGECONFIG_OPENGL_imxgpu3d = "opengl" - -PACKAGECONFIG_remove = "wayland x11" -PACKAGECONFIG_append = " ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL}', d)}" - -PACKAGECONFIG_remove_imxfbdev = "kms" -PACKAGECONFIG_append_imxfbdev = " fbdev clients" -PACKAGECONFIG_append_imxgpu = " imxgpu" -PACKAGECONFIG_append_imxgpu2d = " imxg2d" - -# Clients support -SIMPLE_CLIENTS = "all" -SIMPLE_CLIENTS_imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l" -PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLE_CLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" -# Weston with i.MX GPU support -PACKAGECONFIG[imxgpu] = "-Dimxgpu=true,-Dimxgpu=false,virtual/egl" -# Weston with i.MX G2D renderer -PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d" -# Weston with OpenGL support -PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false" - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" -COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" - -########### End of i.MX overrides ######### diff --git a/recipes-graphics/wayland/weston_9.0.0.imx.bb b/recipes-graphics/wayland/weston_9.0.0.imx.bb new file mode 100644 index 00000000..825a1b1c --- /dev/null +++ b/recipes-graphics/wayland/weston_9.0.0.imx.bb @@ -0,0 +1,192 @@ +# This recipe is for the i.MX fork of weston. For ease of +# maintenance, the top section is a verbatim copy of an OE-core +# recipe. The second section customizes the recipe for i.MX. + +########### OE-core copy ################## +# Upstream hash: 0a882490fe75915c7a119f3498df6750be25f8e0 + +SUMMARY = "Weston, a Wayland compositor" +DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" +HOMEPAGE = "http://wayland.freedesktop.org" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ + file://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a" + +SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ + file://weston.png \ + file://weston.desktop \ + file://xwayland.weston-start \ + file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ + file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \ +" + +SRC_URI_append_libc-musl = " file://dont-use-plane-add-prop.patch " + +SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe" + +UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" + +inherit meson pkgconfig useradd features_check +# depends on virtual/egl +# weston-init requires pam enabled if started via systemd +REQUIRED_DISTRO_FEATURES = "opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}" + +DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" +DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" + +LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}" + +WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" + +EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ + ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ + launch \ + image-jpeg \ + screenshare \ + shell-desktop \ + shell-fullscreen \ + shell-ivi" + +# +# Compositor choices +# +# Weston on KMS +PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" +# Weston on Wayland (nested Weston) +PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" +# Weston on X11 +PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo" +# Headless Weston +PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" +# Weston on framebuffer +PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" +# weston-launch +PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm" +# VA-API desktop recorder +PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" +# Weston with EGL support +PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" +# Weston with lcms support +PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" +# Weston with webp support +PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" +# Weston with systemd-login support +PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" +# Weston with Xwayland support (requires X11 and Wayland) +PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" +# colord CMS support +PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" +# Clients support +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,gstreamer1.0" +# Weston with PAM support +PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" +# Weston with screen-share support +PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" +# Traditional desktop shell +PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false" +# Fullscreen shell +PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false" +# In-Vehicle Infotainment (IVI) shell +PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" +# JPEG image loading support +PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" + +do_install_append() { + # Weston doesn't need the .la files to load modules, so wipe them + rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la + + # If X11, ship a desktop file to launch it + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then + install -d ${D}${datadir}/applications + install ${WORKDIR}/weston.desktop ${D}${datadir}/applications + + install -d ${D}${datadir}/icons/hicolor/48x48/apps + install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then + install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then + chmod u+s ${D}${bindir}/weston-launch + fi +} + +PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ + libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" + +FILES_${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" +FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" + +FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" +SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." + +FILES_${PN}-examples = "${bindir}/*" + +FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" +RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland" + +RDEPENDS_${PN} += "xkeyboard-config" +RRECOMMENDS_${PN} = "weston-init liberation-fonts" +RRECOMMENDS_${PN}-dev += "wayland-protocols" + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "--system weston-launch" + +########### End of OE-core copy ########### + +########### i.MX overrides ################ + +SUMMARY = "Weston, a Wayland compositor, i.MX fork" + +DEFAULT_PREFERENCE = "-1" + +SRCBRANCH = "weston-imx-9.0" +SRC_URI = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} \ + file://weston.png \ + file://weston.desktop \ + file://xwayland.weston-start \ + file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ +" +SRCREV = "a1823f20a1d6e24d2f56e98c5576eda34a94f567" +S = "${WORKDIR}/git" + +# Disable OpenGL for parts with GPU support for 2D but not 3D +REQUIRED_DISTRO_FEATURES = "opengl" +REQUIRED_DISTRO_FEATURES_imxgpu2d = "" +REQUIRED_DISTRO_FEATURES_imxgpu3d = "opengl" +PACKAGECONFIG_OPENGL = "opengl" +PACKAGECONFIG_OPENGL_imxgpu2d = "" +PACKAGECONFIG_OPENGL_imxgpu3d = "opengl" + +PACKAGECONFIG_remove = "wayland x11" +PACKAGECONFIG_append = " ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL}', d)}" + +PACKAGECONFIG_remove_imxfbdev = "kms" +PACKAGECONFIG_append_imxfbdev = " fbdev clients" +PACKAGECONFIG_append_imxgpu = " imxgpu" +PACKAGECONFIG_append_imxgpu2d = " imxg2d" + +# Clients support +SIMPLE_CLIENTS = "all" +SIMPLE_CLIENTS_imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l" +PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor" +PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLE_CLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" +# Weston with i.MX GPU support +PACKAGECONFIG[imxgpu] = "-Dimxgpu=true,-Dimxgpu=false,virtual/egl" +# Weston with i.MX G2D renderer +PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d" +# Weston with OpenGL support +PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false" + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" +COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" + +########### End of i.MX overrides ######### -- cgit v1.2.3-54-g00ecf