diff --git a/meta-digi-dey/recipes-graphics/wayland/weston-init.bbappend b/meta-digi-dey/recipes-graphics/wayland/weston-init.bbappend index 6df4ec803..abaa1ef2f 100644 --- a/meta-digi-dey/recipes-graphics/wayland/weston-init.bbappend +++ b/meta-digi-dey/recipes-graphics/wayland/weston-init.bbappend @@ -5,18 +5,18 @@ REQUIRED_DISTRO_FEATURES_remove_mx6sl = "opengl" SRC_URI_append = " file://profile" SRC_URI_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd wayland x11', 'file://weston.config', '', d)}" -HAS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'yes', 'no', d)}" -HAS_XWAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland x11', 'yes', 'no', d)}" +HAS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" +HAS_XWAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland x11', 'true', 'false', d)}" do_install_append() { install -Dm0755 ${WORKDIR}/profile ${D}${sysconfdir}/profile.d/weston.sh - if [ "${HAS_SYSTEMD}" = "yes" ]; then + if ${HAS_SYSTEMD}; then sed -i \ -e 's,/usr/bin,${bindir},g' \ -e 's,/etc,${sysconfdir},g' \ -e 's,/var,${localstatedir},g' \ ${D}${systemd_system_unitdir}/weston.service - if [ "${HAS_XWAYLAND}" = "yes" ]; then + if ${HAS_XWAYLAND}; then install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston fi fi diff --git a/meta-digi-dey/recipes-graphics/wayland/weston-init/imxdrm/weston.config b/meta-digi-dey/recipes-graphics/wayland/weston-init/imxdrm/weston.config index 5693d6cbf..7c92cf110 100644 --- a/meta-digi-dey/recipes-graphics/wayland/weston-init/imxdrm/weston.config +++ b/meta-digi-dey/recipes-graphics/wayland/weston-init/imxdrm/weston.config @@ -1,3 +1,2 @@ #!/bin/sh OPTARGS="--xwayland" -DESKTOP_SHELL_WINDOW=1920x1080 diff --git a/meta-digi-dey/recipes-graphics/wayland/weston-init/profile b/meta-digi-dey/recipes-graphics/wayland/weston-init/profile index d4fefbcb7..f6f312d23 100644 --- a/meta-digi-dey/recipes-graphics/wayland/weston-init/profile +++ b/meta-digi-dey/recipes-graphics/wayland/weston-init/profile @@ -1,5 +1,5 @@ if test -z "$XDG_RUNTIME_DIR"; then - export XDG_RUNTIME_DIR=/run/user/$USER + export XDG_RUNTIME_DIR=/run/user/`id -u` if ! test -d "${XDG_RUNTIME_DIR}"; then mkdir --parents "${XDG_RUNTIME_DIR}" chmod 0700 "${XDG_RUNTIME_DIR}" diff --git a/meta-digi-dey/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/meta-digi-dey/recipes-graphics/wayland/weston/0001-make-error-portable.patch index e2213aca6..dc6fbaab9 100644 --- a/meta-digi-dey/recipes-graphics/wayland/weston/0001-make-error-portable.patch +++ b/meta-digi-dey/recipes-graphics/wayland/weston/0001-make-error-portable.patch @@ -1,24 +1,26 @@ -From c22e90365d89346258394833cbcad03ff32b2e27 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 weston] make error() portable +Subject: [PATCH] make error() portable error() is not posix but gnu extension so may not be available on all kind of systemsi e.g. musl. Signed-off-by: Khem Raj ---- Upstream-Status: Submitted - configure.ac | 2 ++ - libweston/weston-error.h | 20 ++++++++++++++++++++ - libweston/weston-launch.c | 2 +- +--- + configure.ac | 2 ++ + libweston/weston-error.h | 20 ++++++++++++++++++++ + libweston/weston-launch.c | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) - create mode 100644 src/weston-error.h + create mode 100644 libweston/weston-error.h +diff --git a/configure.ac b/configure.ac +index 9d98e84..8f6b80d 100644 --- a/configure.ac +++ b/configure.ac -@@ -60,6 +60,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[], +@@ -109,6 +109,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[], [[#include ]]) AC_CHECK_HEADERS([execinfo.h]) @@ -26,7 +28,10 @@ Upstream-Status: Submitted + AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate]) - COMPOSITOR_MODULES="wayland-server >= $WAYLAND_PREREQ_VERSION pixman-1 >= 0.25.2" + # 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 --- /dev/null +++ b/libweston/weston-error.h @@ -0,0 +1,20 @@ @@ -50,6 +55,8 @@ Upstream-Status: Submitted + +#endif + +diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c +index bf73e0d..9064439 100644 --- a/libweston/weston-launch.c +++ b/libweston/weston-launch.c @@ -33,7 +33,6 @@ diff --git a/meta-digi-dey/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/meta-digi-dey/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch index 5bbc1ad44..cbb1c3271 100644 --- a/meta-digi-dey/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch +++ b/meta-digi-dey/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch @@ -1,4 +1,4 @@ -From 8ff6ed03ec4079f32e9b34085414e57be4730e04 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 @@ -14,16 +14,17 @@ Upstream-Status: Pending Signed-off-by: Tom Hochstein Signed-off-by: Jussi Kukkonen + --- configure.ac | 9 +++++++-- libweston/weston-launch.c | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) -Index: git/configure.ac -=================================================================== ---- git.orig/configure.ac 2018-02-08 14:04:40.807286171 -0600 -+++ git/configure.ac 2018-02-08 14:04:40.807286171 -0600 -@@ -472,13 +472,17 @@ +diff --git a/configure.ac b/configure.ac +index 8f6b80d..603fcb3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -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])]) @@ -43,7 +44,7 @@ Index: git/configure.ac fi AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes") -@@ -744,6 +748,7 @@ +@@ -748,6 +752,7 @@ AC_MSG_RESULT([ Enable developer documentation ${enable_devdocs} weston-launch utility ${enable_weston_launch} @@ -51,10 +52,10 @@ Index: git/configure.ac systemd-login support ${have_systemd_login} systemd notify support ${enable_systemd_notify} -Index: git/libweston/weston-launch.c -=================================================================== ---- git.orig/libweston/weston-launch.c 2018-02-08 14:04:40.807286171 -0600 -+++ git/libweston/weston-launch.c 2018-02-08 14:08:10.000000000 -0600 +diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c +index 9064439..c6abe92 100644 +--- a/libweston/weston-launch.c ++++ b/libweston/weston-launch.c @@ -51,7 +51,9 @@ #include @@ -65,7 +66,7 @@ Index: git/libweston/weston-launch.c #ifdef HAVE_SYSTEMD_LOGIN #include -@@ -101,8 +103,10 @@ +@@ -101,8 +103,10 @@ drmSetMaster(int drm_fd) #endif struct weston_launch { @@ -76,7 +77,7 @@ Index: git/libweston/weston-launch.c int tty; int ttynr; int sock[2]; -@@ -189,6 +193,7 @@ +@@ -191,6 +195,7 @@ weston_launch_allowed(struct weston_launch *wl) return false; } @@ -84,7 +85,7 @@ Index: git/libweston/weston-launch.c static int pam_conversation_fn(int msg_count, const struct pam_message **messages, -@@ -229,6 +234,7 @@ +@@ -231,6 +236,7 @@ setup_pam(struct weston_launch *wl) return 0; } @@ -92,7 +93,7 @@ Index: git/libweston/weston-launch.c static int setup_launcher_socket(struct weston_launch *wl) -@@ -422,6 +428,7 @@ +@@ -424,6 +430,7 @@ quit(struct weston_launch *wl, int status) close(wl->signalfd); close(wl->sock[0]); @@ -100,7 +101,7 @@ Index: git/libweston/weston-launch.c if (wl->new_user) { err = pam_close_session(wl->ph, 0); if (err) -@@ -429,6 +436,7 @@ +@@ -431,6 +438,7 @@ quit(struct weston_launch *wl, int status) err, pam_strerror(wl->ph, err)); pam_end(wl->ph, err); } @@ -108,7 +109,7 @@ Index: git/libweston/weston-launch.c if (ioctl(wl->tty, KDSKBMUTE, 0) && ioctl(wl->tty, KDSKBMODE, wl->kb_mode)) -@@ -608,6 +616,7 @@ +@@ -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); @@ -116,7 +117,7 @@ Index: git/libweston/weston-launch.c env = pam_getenvlist(wl->ph); if (env) { for (i = 0; env[i]; ++i) { -@@ -616,6 +625,7 @@ +@@ -618,6 +627,7 @@ setup_session(struct weston_launch *wl, char **child_argv) } free(env); } @@ -124,7 +125,7 @@ Index: git/libweston/weston-launch.c /* * We open a new session, so it makes sense -@@ -683,8 +693,10 @@ +@@ -685,8 +695,10 @@ static void help(const char *name) { fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); @@ -135,7 +136,7 @@ Index: git/libweston/weston-launch.c 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 @@ +@@ -700,7 +712,9 @@ main(int argc, char *argv[]) int i, c; char *tty = NULL; struct option opts[] = { @@ -145,7 +146,7 @@ Index: git/libweston/weston-launch.c { "tty", required_argument, NULL, 't' }, { "verbose", no_argument, NULL, 'v' }, { "help", no_argument, NULL, 'h' }, -@@ -710,9 +724,13 @@ +@@ -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': @@ -159,7 +160,7 @@ Index: git/libweston/weston-launch.c break; case 't': tty = optarg; -@@ -753,8 +771,10 @@ +@@ -755,8 +773,10 @@ main(int argc, char *argv[]) if (setup_tty(&wl, tty) < 0) exit(EXIT_FAILURE); diff --git a/meta-digi-dey/recipes-graphics/wayland/weston/0001-weston.ini-using-argb8888-as-gbm-default-on-mscale-8.patch b/meta-digi-dey/recipes-graphics/wayland/weston/0001-weston.ini-using-argb8888-as-gbm-default-on-mscale-8.patch new file mode 100644 index 000000000..e4487bf7e --- /dev/null +++ b/meta-digi-dey/recipes-graphics/wayland/weston/0001-weston.ini-using-argb8888-as-gbm-default-on-mscale-8.patch @@ -0,0 +1,29 @@ +From 186ec0c80410b2120b8f31c211cb44a836c84522 Mon Sep 17 00:00:00 2001 +From: Haihua Hu +Date: Wed, 4 Jul 2018 16:05:20 +0800 +Subject: [PATCH] weston.ini: using argb8888 as gbm default on mscale 850D + +mscale 850D video playback need using pixel alpha for graphic layer + +upstream status: imx specific +Signed-off-by: Haihua Hu + +--- + weston.ini.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/weston.ini.in b/weston.ini.in +index 2d492ab..ae54b79 100644 +--- a/weston.ini.in ++++ b/weston.ini.in +@@ -1,6 +1,7 @@ + [core] + # i.MX: Disable idle timeout + idle-time=0 ++gbm-format=argb8888 + + [libinput] + touchscreen_calibrator=true +-- +2.7.4 + diff --git a/meta-digi-dey/recipes-graphics/wayland/weston/0002-weston.ini-configure-desktop-shell-size-in-weston-co.patch b/meta-digi-dey/recipes-graphics/wayland/weston/0002-weston.ini-configure-desktop-shell-size-in-weston-co.patch new file mode 100644 index 000000000..4aa325693 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/wayland/weston/0002-weston.ini-configure-desktop-shell-size-in-weston-co.patch @@ -0,0 +1,28 @@ +From 3012798d7e9c9e624024fc962d749a960289ad8b Mon Sep 17 00:00:00 2001 +From: Haihua Hu +Date: Wed, 11 Jul 2018 17:47:47 +0800 +Subject: [PATCH] weston.ini: configure desktop shell size in weston configure + file + +mscale 850D need set desktop shell to 1080p + +upstream status: imx specific +Signed-off-by: Haihua Hu + +--- + weston.ini.in | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/weston.ini.in b/weston.ini.in +index bd8abe4..077155b 100644 +--- a/weston.ini.in ++++ b/weston.ini.in +@@ -8,6 +8,8 @@ gbm-format=argb8888 + #mode=1920x1080@60 + #transform=90 + ++[shell] ++size=1920x1080 + + #[output] + #name=HDMI-A-2 diff --git a/meta-digi-dey/recipes-graphics/wayland/weston/0003-weston-touch-calibrator-Advertise-the-touchscreen-ca.patch b/meta-digi-dey/recipes-graphics/wayland/weston/0003-weston-touch-calibrator-Advertise-the-touchscreen-ca.patch new file mode 100644 index 000000000..9be872b89 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/wayland/weston/0003-weston-touch-calibrator-Advertise-the-touchscreen-ca.patch @@ -0,0 +1,32 @@ +From 8955e20180954b4778b9284bade05acf323a1690 Mon Sep 17 00:00:00 2001 +From: Jun Zhu +Date: Sun, 30 Sep 2018 15:31:26 +0800 +Subject: [PATCH] weston-touch-calibrator: Advertise the touchscreen calibrator + interface to all clients. [YOCIMX-2963] + +Set touchscreen_calibrator to true in the section "libinput" of the configure file + /etc/xdg/weston/weston.ini. +Otherwise, it will report that the new-added interface "weston-touch-calibration" cannot be found. + +Signed-off-by: Jun Zhu +--- + weston.ini.in | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/weston.ini.in b/weston.ini.in +index fec4291..2d492ab 100644 +--- a/weston.ini.in ++++ b/weston.ini.in +@@ -2,6 +2,9 @@ + # i.MX: Disable idle timeout + idle-time=0 + ++[libinput] ++touchscreen_calibrator=true ++ + #[output] + #name=HDMI-A-1 + #mode=1920x1080@60 +-- +2.7.4 + diff --git a/meta-digi-dey/recipes-graphics/wayland/weston_4.0.0.bbappend b/meta-digi-dey/recipes-graphics/wayland/weston_4.0.0.bbappend deleted file mode 100644 index c1bd077a2..000000000 --- a/meta-digi-dey/recipes-graphics/wayland/weston_4.0.0.bbappend +++ /dev/null @@ -1,52 +0,0 @@ -SUMMARY_append = " (with i.MX support)" - -DEPENDS_append_imxgpu2d = " virtual/libg2d" - -# Use i.MX fork of weston for customizations. -SRC_URI_remove = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz" -SRC_URI_remove = "file://weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch" -SRC_URI_remove = "file://fix-missing-header.patch" -SRC_URI += "file://0001-weston.ini.in-Modify-paths-to-point-to-right-directo.patch" -WESTON_SRC ?= "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https" -SRCBRANCH = "weston-imx-4.0" -SRC_URI_prepend = "${WESTON_SRC};branch=${SRCBRANCH} " -SRCREV = "a400f041e68b25da8ef9f6376d30209e43b507fb" -S = "${WORKDIR}/git" - -EXTRA_OECONF_append_imxfbdev = " WESTON_NATIVE_BACKEND=fbdev-backend.so" - -# Disable OpenGL for parts with GPU support for 2D but not 3D -IMX_REQUIRED_DISTRO_FEATURES_REMOVE = "" -IMX_REQUIRED_DISTRO_FEATURES_REMOVE_imxgpu2d = "opengl" -IMX_REQUIRED_DISTRO_FEATURES_REMOVE_imxgpu3d = "" -REQUIRED_DISTRO_FEATURES_remove = "${IMX_REQUIRED_DISTRO_FEATURES_REMOVE}" -IMX_EXTRA_OECONF_OPENGL = "" -IMX_EXTRA_OECONF_OPENGL_imxgpu2d = " --disable-opengl" -IMX_EXTRA_OECONF_OPENGL_imxgpu3d = "" -EXTRA_OECONF_append = "${IMX_EXTRA_OECONF_OPENGL}" - -# Disable G2D for parts without GPU support for 2D -IMX_EXTRA_OECONF_G2D = " --disable-imxg2d" -IMX_EXTRA_OECONF_G2D_imxgpu2d = "" -EXTRA_OECONF_append = "${IMX_EXTRA_OECONF_G2D}" - -# drm is not supported on mx6/mx7 -PACKAGECONFIG_remove_mx6 = "kms" -PACKAGECONFIG_remove_mx7 = "kms" - -PACKAGECONFIG_append_imxgpu3d = " cairo-glesv2" - -do_install_append() { - if [ "${@bb.utils.filter('BBFILE_COLLECTIONS', 'ivi', d)}" ]; then - WESTON_INI_SRC=${B}/ivi-shell/weston.ini - else - WESTON_INI_SRC=${B}/weston.ini - fi - WESTON_INI_DEST_DIR=${D}${sysconfdir}/xdg/weston - install -d ${WESTON_INI_DEST_DIR} - install -m 0644 ${WESTON_INI_SRC} ${WESTON_INI_DEST_DIR} -} - -FILES_${PN} += "${sysconfdir}/xdg/weston" - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" diff --git a/meta-digi-dey/recipes-graphics/wayland/weston_4.0.0.bb b/meta-digi-dey/recipes-graphics/wayland/weston_5.0.0.imx.bb similarity index 50% rename from meta-digi-dey/recipes-graphics/wayland/weston_4.0.0.bb rename to meta-digi-dey/recipes-graphics/wayland/weston_5.0.0.imx.bb index a24f667f5..465522188 100644 --- a/meta-digi-dey/recipes-graphics/wayland/weston_4.0.0.bb +++ b/meta-digi-dey/recipes-graphics/wayland/weston_5.0.0.imx.bb @@ -1,29 +1,44 @@ -SUMMARY = "Weston, a Wayland compositor" +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" + file://libweston/compositor.c;endline=26;md5=f47553ae598090444273db00adfb5b66" -SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ +#DEFAULT_PREFERENCE = "-1" + +WESTON_SRC ?= "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https" +SRCBRANCH = "weston-imx-5.0" +SRC_URI = "${WESTON_SRC};branch=${SRCBRANCH} \ 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://weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch \ - file://fix-missing-header.patch \ + file://0003-weston-touch-calibrator-Advertise-the-touchscreen-ca.patch \ " -SRC_URI[md5sum] = "33709aa4d5916f89643fca0fc0064b39" -SRC_URI[sha256sum] = "a0fc0ae7ef83dfbed12abfe9b8096a24a7dd00705e86fa0db1e619ded18b4b58" +# Use argb8888 as gbm-format for i.MX8MQ only +SRC_URI_append_mx8mq = " file://0001-weston.ini-using-argb8888-as-gbm-default-on-mscale-8.patch \ + file://0002-weston.ini-configure-desktop-shell-size-in-weston-co.patch \ +" + +SRCREV = "de814e1aa4899375b67140b5e5ae714c67bb27a0" +S = "${WORKDIR}/git" + +UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" inherit autotools pkgconfig useradd distro_features_check -# depends on virtual/egl -REQUIRED_DISTRO_FEATURES = "opengl" +# 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" 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 \ " @@ -33,12 +48,28 @@ EXTRA_OECONF_append_qemux86 = "\ EXTRA_OECONF_append_qemux86-64 = "\ WESTON_NATIVE_BACKEND=fbdev-backend.so \ " +EXTRA_OECONF_append_mx6 = "\ + WESTON_NATIVE_BACKEND=fbdev-backend.so \ + " +EXTRA_OECONF_append_mx7 = "\ + WESTON_NATIVE_BACKEND=fbdev-backend.so \ + " + +IMX_EXTRA_OECONF_OPENGL = "" +IMX_EXTRA_OECONF_OPENGL_imxgpu2d = " --disable-opengl" +IMX_EXTRA_OECONF_OPENGL_imxgpu3d = "" +EXTRA_OECONF_append = "${IMX_EXTRA_OECONF_OPENGL}" + PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'opengl pam systemd x11', d)} \ clients launch" +# drm is not supported on mx6/mx7 +PACKAGECONFIG_remove_mx6 = "kms" +PACKAGECONFIG_remove_mx7 = "kms" +PACKAGECONFIG_append_imxgpu = " imxgpu" +PACKAGECONFIG_append_imxgpu2d = " imxg2d" +PACKAGECONFIG_append_imxgpu3d = " cairo-glesv2" # # Compositor choices # @@ -64,8 +95,6 @@ PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo" PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms" # Weston with webp support PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp" -# Weston with unwinding support -PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind" # Weston with systemd-login support PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus" # Weston with Xwayland support (requires X11 and Wayland) @@ -76,36 +105,54 @@ PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord" 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 G2D renderer +PACKAGECONFIG[imxg2d] = "--enable-imxg2d,--disable-imxg2d,virtual/libg2d" +# Weston with OpenGL support +PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl" +# Weston with imxgpu hardware +PACKAGECONFIG[imxgpu] = "--enable-imxgpu,--disable-imxgpu" do_install_append() { - # Weston doesn't need the .la files to load modules, so wipe them - rm -f ${D}/${libdir}/libweston-4/*.la + # 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.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" ]; then - install -d ${D}${datadir}/applications - install ${WORKDIR}/weston.desktop ${D}${datadir}/applications + # 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 + 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', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then + install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland + fi + + if [ "${@bb.utils.filter('BBFILE_COLLECTIONS', 'ivi', d)}" ]; then + WESTON_INI_SRC=${B}/ivi-shell/weston.ini + else + WESTON_INI_SRC=${B}/weston.ini + fi + WESTON_INI_DEST_DIR=${D}${sysconfdir}/xdg/weston + if [ -z "${@bb.utils.filter('BBFILE_COLLECTIONS', 'aglprofilegraphical', d)}" ]; then + install -d ${WESTON_INI_DEST_DIR} + install -m 0644 ${WESTON_INI_SRC} ${WESTON_INI_DEST_DIR} + fi } PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ - libweston-4 ${PN}-examples" + 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}" +FILES_${PN} += "${sysconfdir}/xdg/weston" -FILES_libweston-4 = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-4/*.so" -SUMMARY_libweston-4 = "Helper library for implementing 'wayland window managers'." +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-4/xwayland.so" +FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland" RDEPENDS_${PN} += "xkeyboard-config" @@ -114,3 +161,5 @@ RRECOMMENDS_${PN}-dev += "wayland-protocols" USERADD_PACKAGES = "${PN}" GROUPADD_PARAM_${PN} = "--system weston-launch" + +PACKAGE_ARCH = "${MACHINE_SOCARCH}"