Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [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 | |
| 9 | SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ |
| 10 | file://weston.png \ |
| 11 | file://weston.desktop \ |
| 12 | file://xwayland.weston-start \ |
| 13 | file://systemd-notify.weston-start \ |
| 14 | " |
| 15 | |
| 16 | SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch " |
| 17 | |
| 18 | SRC_URI[sha256sum] = "5c23964112b90238bed39e5dd1e41cd71a79398813cdc3bbb15a9fdc94e547ae" |
| 19 | |
| 20 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" |
| 21 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 22 | inherit meson pkgconfig useradd |
| 23 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 24 | # depends on virtual/egl |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 25 | # |
| 26 | require ${THISDIR}/required-distro-features.inc |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 27 | |
| 28 | DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" |
| 29 | DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" |
| 30 | |
| 31 | LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}" |
| 32 | |
| 33 | WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" |
| 34 | |
| 35 | EXTRA_OEMESON += "-Dpipewire=false" |
| 36 | |
| 37 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms wayland egl clients', '', d)} \ |
| 38 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ |
| 39 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \ |
| 40 | ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ |
| 41 | ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'sysvinit', 'launcher-libseat', '', d)} \ |
| 42 | image-jpeg \ |
| 43 | screenshare \ |
| 44 | shell-desktop \ |
| 45 | shell-fullscreen \ |
| 46 | shell-ivi" |
| 47 | |
Patrick Williams | 4585273 | 2022-04-02 08:58:32 -0500 | [diff] [blame] | 48 | # Can be 'damage', 'im', 'egl', 'shm', 'touch', 'dmabuf-feedback', 'dmabuf-v4l', 'dmabuf-egl' or 'all' |
| 49 | SIMPLECLIENTS ?= "all" |
| 50 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 51 | # |
| 52 | # Compositor choices |
| 53 | # |
| 54 | # Weston on KMS |
| 55 | PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" |
| 56 | # Weston on Wayland (nested Weston) |
| 57 | PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" |
| 58 | # Weston on X11 |
| 59 | PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo" |
| 60 | # Headless Weston |
| 61 | PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" |
| 62 | # Weston on framebuffer |
| 63 | PACKAGECONFIG[fbdev] = "-Ddeprecated-backend-fbdev=true,-Ddeprecated-backend-fbdev=false,udev mtdev" |
| 64 | # Weston on RDP |
| 65 | PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp" |
| 66 | # weston-launch |
| 67 | PACKAGECONFIG[launch] = "-Ddeprecated-weston-launch=true,-Ddeprecated-weston-launch=false,drm" |
| 68 | # VA-API desktop recorder |
| 69 | PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" |
| 70 | # Weston with EGL support |
| 71 | PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" |
| 72 | # Weston with lcms support |
| 73 | PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" |
| 74 | # Weston with webp support |
| 75 | PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" |
| 76 | # Weston with systemd-login support |
| 77 | PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" |
| 78 | # Weston with Xwayland support (requires X11 and Wayland) |
| 79 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" |
| 80 | # colord CMS support |
| 81 | PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" |
| 82 | # Clients support |
Patrick Williams | 4585273 | 2022-04-02 08:58:32 -0500 | [diff] [blame] | 83 | PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 84 | # Virtual remote output with GStreamer on DRM backend |
| 85 | PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" |
| 86 | # Weston with screen-share support |
| 87 | PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" |
| 88 | # Traditional desktop shell |
| 89 | PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false" |
| 90 | # Fullscreen shell |
| 91 | PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false" |
| 92 | # In-Vehicle Infotainment (IVI) shell |
| 93 | PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" |
| 94 | # JPEG image loading support |
| 95 | PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" |
| 96 | # support libseat based launch |
| 97 | PACKAGECONFIG[launcher-libseat] = "-Dlauncher-libseat=true,-Dlauncher-libseat=false,seatd" |
| 98 | |
| 99 | do_install:append() { |
| 100 | # Weston doesn't need the .la files to load modules, so wipe them |
| 101 | rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la |
| 102 | |
| 103 | # If X11, ship a desktop file to launch it |
| 104 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then |
| 105 | install -d ${D}${datadir}/applications |
| 106 | install ${WORKDIR}/weston.desktop ${D}${datadir}/applications |
| 107 | |
| 108 | install -d ${D}${datadir}/icons/hicolor/48x48/apps |
| 109 | install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps |
| 110 | fi |
| 111 | |
| 112 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then |
| 113 | install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland |
| 114 | fi |
| 115 | |
| 116 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then |
| 117 | install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify |
| 118 | fi |
| 119 | |
| 120 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then |
| 121 | chmod u+s ${D}${bindir}/weston-launch |
| 122 | fi |
| 123 | } |
| 124 | |
| 125 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ |
| 126 | libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" |
| 127 | |
| 128 | FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" |
| 129 | FILES:${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" |
| 130 | |
| 131 | FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" |
| 132 | SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." |
| 133 | |
| 134 | FILES:${PN}-examples = "${bindir}/*" |
| 135 | |
| 136 | FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" |
| 137 | RDEPENDS:${PN}-xwayland += "xwayland" |
| 138 | |
| 139 | RDEPENDS:${PN} += "xkeyboard-config" |
| 140 | RRECOMMENDS:${PN} = "weston-init liberation-fonts" |
| 141 | RRECOMMENDS:${PN}-dev += "wayland-protocols" |
| 142 | |
| 143 | USERADD_PACKAGES = "${PN}" |
| 144 | GROUPADD_PARAM:${PN} = "--system weston-launch" |