diff options
Diffstat (limited to 'recipes-graphics/wayland/weston_9.0.0.imx.bb')
| -rw-r--r-- | recipes-graphics/wayland/weston_9.0.0.imx.bb | 192 |
1 files changed, 192 insertions, 0 deletions
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 000000000..825a1b1c3 --- /dev/null +++ b/recipes-graphics/wayland/weston_9.0.0.imx.bb | |||
| @@ -0,0 +1,192 @@ | |||
| 1 | # This recipe is for the i.MX fork of weston. For ease of | ||
| 2 | # maintenance, the top section is a verbatim copy of an OE-core | ||
| 3 | # recipe. The second section customizes the recipe for i.MX. | ||
| 4 | |||
| 5 | ########### OE-core copy ################## | ||
| 6 | # Upstream hash: 0a882490fe75915c7a119f3498df6750be25f8e0 | ||
| 7 | |||
| 8 | SUMMARY = "Weston, a Wayland compositor" | ||
| 9 | DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" | ||
| 10 | HOMEPAGE = "http://wayland.freedesktop.org" | ||
| 11 | LICENSE = "MIT" | ||
| 12 | LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ | ||
| 13 | file://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a" | ||
| 14 | |||
| 15 | SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ | ||
| 16 | file://weston.png \ | ||
| 17 | file://weston.desktop \ | ||
| 18 | file://xwayland.weston-start \ | ||
| 19 | file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ | ||
| 20 | file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \ | ||
| 21 | " | ||
| 22 | |||
| 23 | SRC_URI_append_libc-musl = " file://dont-use-plane-add-prop.patch " | ||
| 24 | |||
| 25 | SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe" | ||
| 26 | |||
| 27 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" | ||
| 28 | |||
| 29 | inherit meson pkgconfig useradd features_check | ||
| 30 | # depends on virtual/egl | ||
| 31 | # weston-init requires pam enabled if started via systemd | ||
| 32 | REQUIRED_DISTRO_FEATURES = "opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}" | ||
| 33 | |||
| 34 | DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" | ||
| 35 | DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" | ||
| 36 | |||
| 37 | LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}" | ||
| 38 | |||
| 39 | WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" | ||
| 40 | |||
| 41 | EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false" | ||
| 42 | |||
| 43 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \ | ||
| 44 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ | ||
| 45 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ | ||
| 46 | ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ | ||
| 47 | launch \ | ||
| 48 | image-jpeg \ | ||
| 49 | screenshare \ | ||
| 50 | shell-desktop \ | ||
| 51 | shell-fullscreen \ | ||
| 52 | shell-ivi" | ||
| 53 | |||
| 54 | # | ||
| 55 | # Compositor choices | ||
| 56 | # | ||
| 57 | # Weston on KMS | ||
| 58 | PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" | ||
| 59 | # Weston on Wayland (nested Weston) | ||
| 60 | PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" | ||
| 61 | # Weston on X11 | ||
| 62 | PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo" | ||
| 63 | # Headless Weston | ||
| 64 | PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" | ||
| 65 | # Weston on framebuffer | ||
| 66 | PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" | ||
| 67 | # weston-launch | ||
| 68 | PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm" | ||
| 69 | # VA-API desktop recorder | ||
| 70 | PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" | ||
| 71 | # Weston with EGL support | ||
| 72 | PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" | ||
| 73 | # Weston with lcms support | ||
| 74 | PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" | ||
| 75 | # Weston with webp support | ||
| 76 | PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" | ||
| 77 | # Weston with systemd-login support | ||
| 78 | PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" | ||
| 79 | # Weston with Xwayland support (requires X11 and Wayland) | ||
| 80 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" | ||
| 81 | # colord CMS support | ||
| 82 | PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" | ||
| 83 | # Clients support | ||
| 84 | PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" | ||
| 85 | # Virtual remote output with GStreamer on DRM backend | ||
| 86 | PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0" | ||
| 87 | # Weston with PAM support | ||
| 88 | PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" | ||
| 89 | # Weston with screen-share support | ||
| 90 | PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" | ||
| 91 | # Traditional desktop shell | ||
| 92 | PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false" | ||
| 93 | # Fullscreen shell | ||
| 94 | PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false" | ||
| 95 | # In-Vehicle Infotainment (IVI) shell | ||
| 96 | PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" | ||
| 97 | # JPEG image loading support | ||
| 98 | PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" | ||
| 99 | |||
| 100 | do_install_append() { | ||
| 101 | # Weston doesn't need the .la files to load modules, so wipe them | ||
| 102 | rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la | ||
| 103 | |||
| 104 | # If X11, ship a desktop file to launch it | ||
| 105 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then | ||
| 106 | install -d ${D}${datadir}/applications | ||
| 107 | install ${WORKDIR}/weston.desktop ${D}${datadir}/applications | ||
| 108 | |||
| 109 | install -d ${D}${datadir}/icons/hicolor/48x48/apps | ||
| 110 | install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps | ||
| 111 | fi | ||
| 112 | |||
| 113 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then | ||
| 114 | install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland | ||
| 115 | fi | ||
| 116 | |||
| 117 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then | ||
| 118 | chmod u+s ${D}${bindir}/weston-launch | ||
| 119 | fi | ||
| 120 | } | ||
| 121 | |||
| 122 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ | ||
| 123 | libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" | ||
| 124 | |||
| 125 | FILES_${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" | ||
| 126 | FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" | ||
| 127 | |||
| 128 | FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" | ||
| 129 | SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." | ||
| 130 | |||
| 131 | FILES_${PN}-examples = "${bindir}/*" | ||
| 132 | |||
| 133 | FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" | ||
| 134 | RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland" | ||
| 135 | |||
| 136 | RDEPENDS_${PN} += "xkeyboard-config" | ||
| 137 | RRECOMMENDS_${PN} = "weston-init liberation-fonts" | ||
| 138 | RRECOMMENDS_${PN}-dev += "wayland-protocols" | ||
| 139 | |||
| 140 | USERADD_PACKAGES = "${PN}" | ||
| 141 | GROUPADD_PARAM_${PN} = "--system weston-launch" | ||
| 142 | |||
| 143 | ########### End of OE-core copy ########### | ||
| 144 | |||
| 145 | ########### i.MX overrides ################ | ||
| 146 | |||
| 147 | SUMMARY = "Weston, a Wayland compositor, i.MX fork" | ||
| 148 | |||
| 149 | DEFAULT_PREFERENCE = "-1" | ||
| 150 | |||
| 151 | SRCBRANCH = "weston-imx-9.0" | ||
| 152 | SRC_URI = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} \ | ||
| 153 | file://weston.png \ | ||
| 154 | file://weston.desktop \ | ||
| 155 | file://xwayland.weston-start \ | ||
| 156 | file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ | ||
| 157 | " | ||
| 158 | SRCREV = "a1823f20a1d6e24d2f56e98c5576eda34a94f567" | ||
| 159 | S = "${WORKDIR}/git" | ||
| 160 | |||
| 161 | # Disable OpenGL for parts with GPU support for 2D but not 3D | ||
| 162 | REQUIRED_DISTRO_FEATURES = "opengl" | ||
| 163 | REQUIRED_DISTRO_FEATURES_imxgpu2d = "" | ||
| 164 | REQUIRED_DISTRO_FEATURES_imxgpu3d = "opengl" | ||
| 165 | PACKAGECONFIG_OPENGL = "opengl" | ||
| 166 | PACKAGECONFIG_OPENGL_imxgpu2d = "" | ||
| 167 | PACKAGECONFIG_OPENGL_imxgpu3d = "opengl" | ||
| 168 | |||
| 169 | PACKAGECONFIG_remove = "wayland x11" | ||
| 170 | PACKAGECONFIG_append = " ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL}', d)}" | ||
| 171 | |||
| 172 | PACKAGECONFIG_remove_imxfbdev = "kms" | ||
| 173 | PACKAGECONFIG_append_imxfbdev = " fbdev clients" | ||
| 174 | PACKAGECONFIG_append_imxgpu = " imxgpu" | ||
| 175 | PACKAGECONFIG_append_imxgpu2d = " imxg2d" | ||
| 176 | |||
| 177 | # Clients support | ||
| 178 | SIMPLE_CLIENTS = "all" | ||
| 179 | SIMPLE_CLIENTS_imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l" | ||
| 180 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor" | ||
| 181 | PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLE_CLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" | ||
| 182 | # Weston with i.MX GPU support | ||
| 183 | PACKAGECONFIG[imxgpu] = "-Dimxgpu=true,-Dimxgpu=false,virtual/egl" | ||
| 184 | # Weston with i.MX G2D renderer | ||
| 185 | PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d" | ||
| 186 | # Weston with OpenGL support | ||
| 187 | PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false" | ||
| 188 | |||
| 189 | PACKAGE_ARCH = "${MACHINE_SOCARCH}" | ||
| 190 | COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" | ||
| 191 | |||
| 192 | ########### End of i.MX overrides ######### | ||
