Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1 | SUMMARY = "Weston, a Wayland compositor" |
| 2 | DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" |
| 3 | HOMEPAGE = "http://wayland.freedesktop.org" |
| 4 | LICENSE = "MIT" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ |
| 6 | file://libweston/compositor.c;endline=27;md5=eb6d5297798cabe2ddc65e2af519bcf0 \ |
| 7 | " |
| 8 | |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 9 | SRC_URI = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz \ |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 10 | file://weston.png \ |
| 11 | file://weston.desktop \ |
| 12 | file://xwayland.weston-start \ |
| 13 | file://systemd-notify.weston-start \ |
| 14 | " |
| 15 | |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 16 | SRC_URI[sha256sum] = "eb686a7cf00992a23b17f192fca9a887313e92c346ee35d8575196983d656b4a" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 17 | |
| 18 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" |
| 19 | UPSTREAM_CHECK_REGEX = "weston-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)" |
| 20 | |
| 21 | inherit meson pkgconfig useradd |
| 22 | |
| 23 | # depends on virtual/egl |
| 24 | # |
| 25 | require ${THISDIR}/required-distro-features.inc |
| 26 | |
| 27 | DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" |
| 28 | DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" |
| 29 | |
| 30 | LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}" |
| 31 | |
| 32 | WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" |
| 33 | |
| 34 | EXTRA_OEMESON += "-Dpipewire=false" |
| 35 | |
| 36 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms wayland egl clients', '', d)} \ |
| 37 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ |
| 38 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \ |
| 39 | ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 40 | launcher-libseat \ |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 41 | image-jpeg \ |
| 42 | screenshare \ |
| 43 | shell-desktop \ |
| 44 | shell-fullscreen \ |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 45 | shell-ivi \ |
| 46 | shell-kiosk \ |
| 47 | " |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 48 | |
| 49 | # Can be 'damage', 'im', 'egl', 'shm', 'touch', 'dmabuf-feedback', 'dmabuf-v4l', 'dmabuf-egl' or 'all' |
| 50 | SIMPLECLIENTS ?= "all" |
| 51 | |
| 52 | # |
| 53 | # Compositor choices |
| 54 | # |
| 55 | # Weston on KMS |
| 56 | PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" |
| 57 | # Weston on Wayland (nested Weston) |
| 58 | PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" |
| 59 | # Weston on X11 |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 60 | PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcursor" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 61 | # Headless Weston |
| 62 | PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" |
| 63 | # Weston on RDP |
| 64 | PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp" |
| 65 | # VA-API desktop recorder |
| 66 | PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" |
| 67 | # Weston with EGL support |
| 68 | PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" |
| 69 | # Weston with lcms support |
| 70 | PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" |
| 71 | # Weston with webp support |
| 72 | PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 73 | # Weston with systemd support |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 74 | PACKAGECONFIG[systemd] = "-Dsystemd=true,-Dsystemd=false,systemd dbus" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 75 | # Weston with Xwayland support (requires X11 and Wayland) |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 76 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcb libxcursor xcb-util-cursor xwayland" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 77 | # colord CMS support |
| 78 | PACKAGECONFIG[colord] = "-Ddeprecated-color-management-colord=true,-Ddeprecated-color-management-colord=false,colord" |
| 79 | # Clients support |
| 80 | PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" |
| 81 | # Virtual remote output with GStreamer on DRM backend |
| 82 | PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" |
| 83 | # Weston with screen-share support |
| 84 | PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" |
| 85 | # Traditional desktop shell |
| 86 | PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false" |
| 87 | # Fullscreen shell |
| 88 | PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false" |
| 89 | # In-Vehicle Infotainment (IVI) shell |
| 90 | PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 91 | # Kiosk shell |
| 92 | PACKAGECONFIG[shell-kiosk] = "-Dshell-kiosk=true,-Dshell-kiosk=false" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 93 | # JPEG image loading support |
| 94 | PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" |
| 95 | # support libseat based launch |
| 96 | PACKAGECONFIG[launcher-libseat] = "-Dlauncher-libseat=true,-Dlauncher-libseat=false,seatd" |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 97 | # deprecated and superseded by libseat launcher |
| 98 | PACKAGECONFIG[launcher-logind] = "-Ddeprecated-launcher-logind=true,-Ddeprecated-launcher-logind=false," |
| 99 | # screencasting via PipeWire |
| 100 | PACKAGECONFIG[pipewire] = "-Dbackend-pipewire=true,-Dbackend-pipewire=false,pipewire" |
| 101 | # VNC remote screensharing |
| 102 | PACKAGECONFIG[vnc] = "-Dbackend-vnc=true,-Dbackend-vnc=false,neatvnc" |
| 103 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 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" |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 135 | FILES:${PN} = "${sysconfdir} ${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 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" |