diff options
Diffstat (limited to 'recipes-graphics/wayland/weston_10.0.3.imx.bb')
| -rw-r--r-- | recipes-graphics/wayland/weston_10.0.3.imx.bb | 208 |
1 files changed, 208 insertions, 0 deletions
diff --git a/recipes-graphics/wayland/weston_10.0.3.imx.bb b/recipes-graphics/wayland/weston_10.0.3.imx.bb new file mode 100644 index 000000000..f3e913fcd --- /dev/null +++ b/recipes-graphics/wayland/weston_10.0.3.imx.bb | |||
| @@ -0,0 +1,208 @@ | |||
| 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: 4b42fd87da290ddea098605aea3a5cce1fb432a7 | ||
| 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://LICENSE;md5=d79ee9e66bb0f95d3386a7acae780b70 \ | ||
| 13 | file://libweston/compositor.c;endline=27;md5=eb6d5297798cabe2ddc65e2af519bcf0 \ | ||
| 14 | " | ||
| 15 | |||
| 16 | SRC_URI = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz \ | ||
| 17 | file://weston.png \ | ||
| 18 | file://weston.desktop \ | ||
| 19 | file://xwayland.weston-start \ | ||
| 20 | file://systemd-notify.weston-start \ | ||
| 21 | " | ||
| 22 | |||
| 23 | SRC_URI[sha256sum] = "89646ca0d9f8d413c2767e5c3828eaa3fa149c2a105b3729a6894fa7cf1549e7" | ||
| 24 | |||
| 25 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" | ||
| 26 | UPSTREAM_CHECK_REGEX = "weston-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)" | ||
| 27 | |||
| 28 | inherit meson pkgconfig useradd | ||
| 29 | |||
| 30 | # depends on virtual/egl | ||
| 31 | # | ||
| 32 | require ${THISDIR}/required-distro-features.inc | ||
| 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 += "-Dpipewire=false" | ||
| 42 | |||
| 43 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms wayland egl clients', '', d)} \ | ||
| 44 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ | ||
| 45 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \ | ||
| 46 | ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ | ||
| 47 | ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'sysvinit', 'launcher-libseat', '', d)} \ | ||
| 48 | image-jpeg \ | ||
| 49 | screenshare \ | ||
| 50 | shell-desktop \ | ||
| 51 | shell-fullscreen \ | ||
| 52 | shell-ivi" | ||
| 53 | |||
| 54 | # Can be 'damage', 'im', 'egl', 'shm', 'touch', 'dmabuf-feedback', 'dmabuf-v4l', 'dmabuf-egl' or 'all' | ||
| 55 | SIMPLECLIENTS ?= "all" | ||
| 56 | |||
| 57 | # | ||
| 58 | # Compositor choices | ||
| 59 | # | ||
| 60 | # Weston on KMS | ||
| 61 | PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" | ||
| 62 | # Weston on Wayland (nested Weston) | ||
| 63 | PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" | ||
| 64 | # Weston on X11 | ||
| 65 | PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo" | ||
| 66 | # Headless Weston | ||
| 67 | PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" | ||
| 68 | # Weston on framebuffer | ||
| 69 | PACKAGECONFIG[fbdev] = "-Ddeprecated-backend-fbdev=true,-Ddeprecated-backend-fbdev=false,udev mtdev" | ||
| 70 | # Weston on RDP | ||
| 71 | PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp" | ||
| 72 | # weston-launch | ||
| 73 | PACKAGECONFIG[launch] = "-Ddeprecated-weston-launch=true,-Ddeprecated-weston-launch=false,drm" | ||
| 74 | # VA-API desktop recorder | ||
| 75 | PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" | ||
| 76 | # Weston with EGL support | ||
| 77 | PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" | ||
| 78 | # Weston with lcms support | ||
| 79 | PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" | ||
| 80 | # Weston with webp support | ||
| 81 | PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" | ||
| 82 | # Weston with systemd-login support | ||
| 83 | PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" | ||
| 84 | # Weston with Xwayland support (requires X11 and Wayland) | ||
| 85 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" | ||
| 86 | # colord CMS support | ||
| 87 | PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" | ||
| 88 | # Clients support | ||
| 89 | PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" | ||
| 90 | # Virtual remote output with GStreamer on DRM backend | ||
| 91 | PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" | ||
| 92 | # Weston with screen-share support | ||
| 93 | PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" | ||
| 94 | # Traditional desktop shell | ||
| 95 | PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false" | ||
| 96 | # Fullscreen shell | ||
| 97 | PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false" | ||
| 98 | # In-Vehicle Infotainment (IVI) shell | ||
| 99 | PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" | ||
| 100 | # JPEG image loading support | ||
| 101 | PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" | ||
| 102 | # support libseat based launch | ||
| 103 | PACKAGECONFIG[launcher-libseat] = "-Dlauncher-libseat=true,-Dlauncher-libseat=false,seatd" | ||
| 104 | |||
| 105 | do_install:append() { | ||
| 106 | # Weston doesn't need the .la files to load modules, so wipe them | ||
| 107 | rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la | ||
| 108 | |||
| 109 | # If X11, ship a desktop file to launch it | ||
| 110 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then | ||
| 111 | install -d ${D}${datadir}/applications | ||
| 112 | install ${WORKDIR}/weston.desktop ${D}${datadir}/applications | ||
| 113 | |||
| 114 | install -d ${D}${datadir}/icons/hicolor/48x48/apps | ||
| 115 | install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps | ||
| 116 | fi | ||
| 117 | |||
| 118 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then | ||
| 119 | install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland | ||
| 120 | fi | ||
| 121 | |||
| 122 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then | ||
| 123 | install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify | ||
| 124 | fi | ||
| 125 | |||
| 126 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then | ||
| 127 | chmod u+s ${D}${bindir}/weston-launch | ||
| 128 | fi | ||
| 129 | } | ||
| 130 | |||
| 131 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ | ||
| 132 | libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" | ||
| 133 | |||
| 134 | FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" | ||
| 135 | FILES:${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" | ||
| 136 | |||
| 137 | FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" | ||
| 138 | SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." | ||
| 139 | |||
| 140 | FILES:${PN}-examples = "${bindir}/*" | ||
| 141 | |||
| 142 | FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" | ||
| 143 | RDEPENDS:${PN}-xwayland += "xwayland" | ||
| 144 | |||
| 145 | RDEPENDS:${PN} += "xkeyboard-config" | ||
| 146 | RRECOMMENDS:${PN} = "weston-init liberation-fonts" | ||
| 147 | RRECOMMENDS:${PN}-dev += "wayland-protocols" | ||
| 148 | |||
| 149 | USERADD_PACKAGES = "${PN}" | ||
| 150 | GROUPADD_PARAM:${PN} = "--system weston-launch" | ||
| 151 | |||
| 152 | ########### End of OE-core copy ########### | ||
| 153 | |||
| 154 | ########### i.MX overrides ################ | ||
| 155 | |||
| 156 | SUMMARY = "Weston, a Wayland compositor, i.MX fork" | ||
| 157 | |||
| 158 | DEFAULT_PREFERENCE = "-1" | ||
| 159 | |||
| 160 | SRC_URI:remove = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz" | ||
| 161 | SRC_URI:prepend = "git://github.com/nxp-imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} " | ||
| 162 | SRC_URI += "file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch \ | ||
| 163 | file://0001-g2d-renderer.c-Include-sys-stat.h.patch" | ||
| 164 | SRCBRANCH = "weston-imx-10.0.3" | ||
| 165 | SRCREV = "c41675dc616886828219eba9b9ce22ec17533090" | ||
| 166 | S = "${WORKDIR}/git" | ||
| 167 | |||
| 168 | # Disable OpenGL for parts with GPU support for 2D but not 3D | ||
| 169 | REQUIRED_DISTRO_FEATURES = "opengl" | ||
| 170 | REQUIRED_DISTRO_FEATURES:imxgpu2d = "" | ||
| 171 | REQUIRED_DISTRO_FEATURES:imxgpu3d = "opengl" | ||
| 172 | PACKAGECONFIG_OPENGL = "opengl" | ||
| 173 | PACKAGECONFIG_OPENGL:imxgpu2d = "" | ||
| 174 | PACKAGECONFIG_OPENGL:imxgpu3d = "opengl" | ||
| 175 | |||
| 176 | PACKAGECONFIG_IMX_REMOVALS ?= "wayland x11" | ||
| 177 | PACKAGECONFIG:remove = "${PACKAGECONFIG_IMX_REMOVALS}" | ||
| 178 | PACKAGECONFIG:append = " ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL}', d)}" | ||
| 179 | |||
| 180 | PACKAGECONFIG:remove:imxfbdev = "kms" | ||
| 181 | PACKAGECONFIG:append:imxfbdev = " fbdev clients" | ||
| 182 | PACKAGECONFIG:append:imxgpu = " imxgpu" | ||
| 183 | PACKAGECONFIG:append:imxgpu2d = " imxg2d" | ||
| 184 | |||
| 185 | SIMPLECLIENTS:imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l" | ||
| 186 | |||
| 187 | # Override | ||
| 188 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor xwayland" | ||
| 189 | # Weston with i.MX GPU support | ||
| 190 | PACKAGECONFIG[imxgpu] = "-Dimxgpu=true,-Dimxgpu=false,virtual/egl" | ||
| 191 | # Weston with i.MX G2D renderer | ||
| 192 | PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d" | ||
| 193 | # Weston with OpenGL support | ||
| 194 | PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false" | ||
| 195 | |||
| 196 | PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev libdrm" | ||
| 197 | EXTRA_OEMESON:append:imxfbdev = " -Dbackend-default=fbdev" | ||
| 198 | |||
| 199 | EXTRA_OEMESON += "-Ddeprecated-wl-shell=true" | ||
| 200 | |||
| 201 | # links with imx-gpu libs which are pre-built for glibc | ||
| 202 | # gcompat will address it during runtime | ||
| 203 | LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined" | ||
| 204 | |||
| 205 | PACKAGE_ARCH = "${MACHINE_SOCARCH}" | ||
| 206 | COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" | ||
| 207 | |||
| 208 | ########### End of i.MX overrides ######### | ||
