From 1e2ff11ab06320e69e617d80f11e2f8094b931fc Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Thu, 23 May 2019 13:08:39 -0500 Subject: weston: Upgrade to 5.0.0.imx Signed-off-by: Tom Hochstein --- ...2d-renderer-Fix-open-function-build-break.patch | 33 ----- .../wayland/weston/0001-make-error-portable.patch | 6 +- ...ch-Provide-a-default-version-that-doesn-t.patch | 30 ++--- recipes-graphics/wayland/weston_4.0.0.imx.bb | 144 --------------------- recipes-graphics/wayland/weston_5.0.0.imx.bb | 143 ++++++++++++++++++++ 5 files changed, 161 insertions(+), 195 deletions(-) delete mode 100644 recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch delete mode 100644 recipes-graphics/wayland/weston_4.0.0.imx.bb create mode 100644 recipes-graphics/wayland/weston_5.0.0.imx.bb diff --git a/recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch b/recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch deleted file mode 100644 index 6f676048b..000000000 --- a/recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 7857e5aa2459b2746e062ae59ae0240c4af7af5d Mon Sep 17 00:00:00 2001 -From: Tom Hochstein -Date: Mon, 29 Oct 2018 21:40:32 +0000 -Subject: [PATCH] g2d-renderer: Fix open function build break - -| from ../git/libweston/g2d-renderer.c:40: -| In function 'open', -| inlined from 'g2d_renderer_create' at ../git/libweston/g2d-renderer.c:1629:2: -| /home/r60874/upstream/fsl-xwayland/tmp/work/cortexa9t2hf-neon-mx6qdl-fsl-linux-gnueabi/weston/4.0.0.imx-r0/recipe- sysroot/usr/include/bits/fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute error: open wit h O_CREAT or O_TMPFILE in second argument needs 3 arguments -| __open_missing_mode (); -| ^~~~~~~~~~~~~~~~~~~~~~ -| Makefile:5266: recipe for target 'libweston/g2d_renderer_la-g2d-renderer.lo' failed - -Upstream-Status: Inappropriate [i.MX-specific] - -Signed-off-by: Tom Hochstein ---- - libweston/g2d-renderer.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: git/libweston/g2d-renderer.c -=================================================================== ---- git.orig/libweston/g2d-renderer.c -+++ git/libweston/g2d-renderer.c -@@ -1626,7 +1626,7 @@ g2d_renderer_create(struct weston_compos - path = malloc(strlen(dir) + 40); - strcpy(path, dir); - strcat(path, "/use-g2d-renderer"); -- close(open(path, O_CREAT | O_RDWR)); -+ close(open(path, O_CREAT | O_RDWR, 0600)); - free(path); - - return 0; diff --git a/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/recipes-graphics/wayland/weston/0001-make-error-portable.patch index 09ec1559e..c15e6928e 100644 --- a/recipes-graphics/wayland/weston/0001-make-error-portable.patch +++ b/recipes-graphics/wayland/weston/0001-make-error-portable.patch @@ -1,4 +1,4 @@ -From ad1d2161c811cff25d1684c33611f300adb753bc Mon Sep 17 00:00:00 2001 +From 6ef33e86557c59b31c9b731c0360ec1d404cc801 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 29 May 2015 20:56:00 -0700 Subject: [PATCH] make error() portable @@ -18,7 +18,7 @@ Signed-off-by: Khem Raj create mode 100644 libweston/weston-error.h diff --git a/configure.ac b/configure.ac -index 7aebbdb..dc9c802 100644 +index 9d98e84..8f6b80d 100644 --- a/configure.ac +++ b/configure.ac @@ -109,6 +109,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[], @@ -57,7 +57,7 @@ index 0000000..2089d02 +#endif + diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c -index 1adcf21..166bf3b 100644 +index bf73e0d..9064439 100644 --- a/libweston/weston-launch.c +++ b/libweston/weston-launch.c @@ -33,7 +33,6 @@ 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 d648538b8..3e4e772b8 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,4 +1,4 @@ -From b98b9dbda902225cdd972b5bff6a641c36cc7e90 Mon Sep 17 00:00:00 2001 +From d5fb8567868866665502106def90017243a968a8 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 @@ -21,10 +21,10 @@ Signed-off-by: Denys Dmytriyenko 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac -index dc9c802..48cf5cb 100644 +index 8f6b80d..603fcb3 100644 --- a/configure.ac +++ b/configure.ac -@@ -451,13 +451,17 @@ AC_ARG_ENABLE(resize-optimization, +@@ -494,13 +494,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])]) @@ -44,7 +44,7 @@ index dc9c802..48cf5cb 100644 fi AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes") -@@ -702,6 +706,7 @@ AC_MSG_RESULT([ +@@ -748,6 +752,7 @@ AC_MSG_RESULT([ Enable developer documentation ${enable_devdocs} weston-launch utility ${enable_weston_launch} @@ -53,7 +53,7 @@ index dc9c802..48cf5cb 100644 systemd notify support ${enable_systemd_notify} diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c -index 166bf3b..6fb9232 100644 +index 9064439..c6abe92 100644 --- a/libweston/weston-launch.c +++ b/libweston/weston-launch.c @@ -51,7 +51,9 @@ @@ -77,7 +77,7 @@ index 166bf3b..6fb9232 100644 int tty; int ttynr; int sock[2]; -@@ -189,6 +193,7 @@ weston_launch_allowed(struct weston_launch *wl) +@@ -191,6 +195,7 @@ weston_launch_allowed(struct weston_launch *wl) return false; } @@ -85,7 +85,7 @@ index 166bf3b..6fb9232 100644 static int pam_conversation_fn(int msg_count, const struct pam_message **messages, -@@ -229,6 +234,7 @@ setup_pam(struct weston_launch *wl) +@@ -231,6 +236,7 @@ setup_pam(struct weston_launch *wl) return 0; } @@ -93,7 +93,7 @@ index 166bf3b..6fb9232 100644 static int setup_launcher_socket(struct weston_launch *wl) -@@ -422,6 +428,7 @@ quit(struct weston_launch *wl, int status) +@@ -424,6 +430,7 @@ quit(struct weston_launch *wl, int status) close(wl->signalfd); close(wl->sock[0]); @@ -101,7 +101,7 @@ index 166bf3b..6fb9232 100644 if (wl->new_user) { err = pam_close_session(wl->ph, 0); if (err) -@@ -429,6 +436,7 @@ quit(struct weston_launch *wl, int status) +@@ -431,6 +438,7 @@ quit(struct weston_launch *wl, int status) err, pam_strerror(wl->ph, err)); pam_end(wl->ph, err); } @@ -109,7 +109,7 @@ index 166bf3b..6fb9232 100644 if (ioctl(wl->tty, KDSKBMUTE, 0) && ioctl(wl->tty, KDSKBMODE, wl->kb_mode)) -@@ -608,6 +616,7 @@ setup_session(struct weston_launch *wl, char **child_argv) +@@ -610,6 +618,7 @@ setup_session(struct weston_launch *wl, char **child_argv) setenv("HOME", wl->pw->pw_dir, 1); setenv("SHELL", wl->pw->pw_shell, 1); @@ -117,7 +117,7 @@ index 166bf3b..6fb9232 100644 env = pam_getenvlist(wl->ph); if (env) { for (i = 0; env[i]; ++i) { -@@ -616,6 +625,7 @@ setup_session(struct weston_launch *wl, char **child_argv) +@@ -618,6 +627,7 @@ setup_session(struct weston_launch *wl, char **child_argv) } free(env); } @@ -125,7 +125,7 @@ index 166bf3b..6fb9232 100644 /* * We open a new session, so it makes sense -@@ -683,8 +693,10 @@ static void +@@ -685,8 +695,10 @@ static void help(const char *name) { fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); @@ -136,7 +136,7 @@ index 166bf3b..6fb9232 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"); -@@ -698,7 +710,9 @@ main(int argc, char *argv[]) +@@ -700,7 +712,9 @@ main(int argc, char *argv[]) int i, c; char *tty = NULL; struct option opts[] = { @@ -146,7 +146,7 @@ index 166bf3b..6fb9232 100644 { "tty", required_argument, NULL, 't' }, { "verbose", no_argument, NULL, 'v' }, { "help", no_argument, NULL, 'h' }, -@@ -710,9 +724,13 @@ main(int argc, char *argv[]) +@@ -712,9 +726,13 @@ main(int argc, char *argv[]) while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) { switch (c) { case 'u': @@ -160,7 +160,7 @@ index 166bf3b..6fb9232 100644 break; case 't': tty = optarg; -@@ -753,8 +771,10 @@ main(int argc, char *argv[]) +@@ -755,8 +773,10 @@ main(int argc, char *argv[]) if (setup_tty(&wl, tty) < 0) exit(EXIT_FAILURE); diff --git a/recipes-graphics/wayland/weston_4.0.0.imx.bb b/recipes-graphics/wayland/weston_4.0.0.imx.bb deleted file mode 100644 index e8d74fd49..000000000 --- a/recipes-graphics/wayland/weston_4.0.0.imx.bb +++ /dev/null @@ -1,144 +0,0 @@ -SUMMARY = "Weston, a Wayland compositor, i.MX fork" -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=26;md5=e342df749174a8ee11065583157c7a38" - -DEFAULT_PREFERENCE = "-1" - -SRCBRANCH = "weston-imx-4.0" -SRC_URI = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} \ - file://weston.ini \ - file://weston.png \ - file://weston.desktop \ - file://0001-make-error-portable.patch \ - file://xwayland.weston-start \ - file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ - file://0001-g2d-renderer-Fix-open-function-build-break.patch \ -" -SRCREV = "866072b52751e5023651dd9322baa513e1f74fe6" -S = "${WORKDIR}/git" - -UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" - -inherit autotools pkgconfig useradd distro_features_check - -# 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" - -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_OECONF = "--enable-setuid-install \ - --disable-rdp-compositor \ - " -EXTRA_OECONF_append_qemux86 = " \ - WESTON_NATIVE_BACKEND=fbdev-backend.so \ - " -EXTRA_OECONF_append_qemux86-64 = " \ - WESTON_NATIVE_BACKEND=fbdev-backend.so \ - " -EXTRA_OECONF_append_imxfbdev = " \ - WESTON_NATIVE_BACKEND=fbdev-backend.so \ - " -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', '${PACKAGECONFIG_OPENGL} pam systemd x11', d)} \ - clients launch" -PACKAGECONFIG_remove_imxfbdev = "kms" -PACKAGECONFIG_append_imxgpu = " imxgpu" -PACKAGECONFIG_append_imxgpu2d = " imxg2d" -PACKAGECONFIG_append_imxgpu3d = " cairo-glesv2" -# -# Compositor choices -# -# Weston on KMS -PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev" -# Weston on Wayland (nested Weston) -PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa" -# Weston on X11 -PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo" -# Headless Weston -PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor" -# Weston on framebuffer -PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev" -# weston-launch -PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm" -# VA-API desktop recorder -PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva" -# Weston with EGL support -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" -# Weston with lcms support -PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms" -# Weston with webp support -PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp" -# Weston with systemd-login support -PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus" -# Weston with Xwayland support (requires X11 and Wayland) -PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland" -# colord CMS support -PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord" -# Clients support -PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients" -# Weston with PAM support -PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" -# Weston with i.MX GPU support -PACKAGECONFIG[imxgpu] = "--enable-imxgpu,--disable-imxgpu" -# Weston with i.MX G2D renderer -PACKAGECONFIG[imxg2d] = "--enable-imxg2d,--disable-imxg2d,virtual/libg2d" -# Weston with OpenGL support -PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl" - -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 - - # install default weston.ini - install -D -m 0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini -} - -PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ - libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" - -FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir} ${sysconfdir}/xdg/weston" - -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} = "liberation-fonts" -RRECOMMENDS_${PN}-dev += "wayland-protocols" - -USERADD_PACKAGES = "${PN}" -GROUPADD_PARAM_${PN} = "--system weston-launch" - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" -COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" diff --git a/recipes-graphics/wayland/weston_5.0.0.imx.bb b/recipes-graphics/wayland/weston_5.0.0.imx.bb new file mode 100644 index 000000000..11da28728 --- /dev/null +++ b/recipes-graphics/wayland/weston_5.0.0.imx.bb @@ -0,0 +1,143 @@ +SUMMARY = "Weston, a Wayland compositor, i.MX fork" +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=26;md5=f47553ae598090444273db00adfb5b66" + +DEFAULT_PREFERENCE = "-1" + +SRCBRANCH = "weston-imx-5.0" +SRC_URI = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} \ + file://weston.ini \ + file://weston.png \ + file://weston.desktop \ + file://0001-make-error-portable.patch \ + file://xwayland.weston-start \ + file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ +" +SRCREV = "fb563901657b296c7c7c86d26602a622429e334f" +S = "${WORKDIR}/git" + +UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" + +inherit autotools pkgconfig useradd distro_features_check + +# 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" + +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_OECONF = "--enable-setuid-install \ + --disable-rdp-compositor \ + " +EXTRA_OECONF_append_qemux86 = " \ + WESTON_NATIVE_BACKEND=fbdev-backend.so \ + " +EXTRA_OECONF_append_qemux86-64 = " \ + WESTON_NATIVE_BACKEND=fbdev-backend.so \ + " +EXTRA_OECONF_append_imxfbdev = " \ + WESTON_NATIVE_BACKEND=fbdev-backend.so \ + " +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', '${PACKAGECONFIG_OPENGL} pam systemd x11', d)} \ + clients launch" +PACKAGECONFIG_remove_imxfbdev = "kms" +PACKAGECONFIG_append_imxgpu = " imxgpu" +PACKAGECONFIG_append_imxgpu2d = " imxg2d" +PACKAGECONFIG_append_imxgpu3d = " cairo-glesv2" +# +# Compositor choices +# +# Weston on KMS +PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev" +# Weston on Wayland (nested Weston) +PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa" +# Weston on X11 +PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo" +# Headless Weston +PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor" +# Weston on framebuffer +PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev" +# weston-launch +PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm" +# VA-API desktop recorder +PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva" +# Weston with EGL support +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" +# Weston with lcms support +PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms" +# Weston with webp support +PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp" +# Weston with systemd-login support +PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus" +# Weston with Xwayland support (requires X11 and Wayland) +PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland" +# colord CMS support +PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord" +# Clients support +PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients" +# Weston with PAM support +PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" +# Weston with i.MX GPU support +PACKAGECONFIG[imxgpu] = "--enable-imxgpu,--disable-imxgpu" +# Weston with i.MX G2D renderer +PACKAGECONFIG[imxg2d] = "--enable-imxg2d,--disable-imxg2d,virtual/libg2d" +# Weston with OpenGL support +PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl" + +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 + + # install default weston.ini + install -D -m 0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini +} + +PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ + libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" + +FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir} ${sysconfdir}/xdg/weston" + +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} = "liberation-fonts" +RRECOMMENDS_${PN}-dev += "wayland-protocols" + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "--system weston-launch" + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" +COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" -- cgit v1.2.3-54-g00ecf