Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [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=6c53bbbd99273f4f7c4affa855c33c0a" |
| 7 | |
| 8 | SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ |
| 9 | file://weston.png \ |
| 10 | file://weston.desktop \ |
| 11 | file://xwayland.weston-start \ |
| 12 | file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 13 | file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \ |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 14 | file://0001-meson.build-fix-incorrect-header.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 15 | " |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 16 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 17 | SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch " |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 18 | |
| 19 | SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 20 | |
| 21 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" |
| 22 | |
| 23 | inherit meson pkgconfig useradd features_check |
| 24 | # depends on virtual/egl |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 25 | # weston-init requires pam enabled if started via systemd |
| 26 | REQUIRED_DISTRO_FEATURES = "opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 27 | |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame] | 28 | DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 29 | DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" |
| 30 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 31 | LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}" |
| 32 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 33 | WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" |
| 34 | |
| 35 | EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false" |
| 36 | |
| 37 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \ |
| 38 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ |
| 39 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ |
| 40 | ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame] | 41 | launch \ |
| 42 | image-jpeg \ |
| 43 | screenshare \ |
| 44 | shell-desktop \ |
| 45 | shell-fullscreen \ |
| 46 | shell-ivi" |
| 47 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 48 | # |
| 49 | # Compositor choices |
| 50 | # |
| 51 | # Weston on KMS |
| 52 | PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" |
| 53 | # Weston on Wayland (nested Weston) |
| 54 | PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" |
| 55 | # Weston on X11 |
| 56 | PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo" |
| 57 | # Headless Weston |
| 58 | PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" |
| 59 | # Weston on framebuffer |
| 60 | PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" |
| 61 | # weston-launch |
| 62 | PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm" |
| 63 | # VA-API desktop recorder |
| 64 | PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" |
| 65 | # Weston with EGL support |
| 66 | PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" |
| 67 | # Weston with lcms support |
| 68 | PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" |
| 69 | # Weston with webp support |
| 70 | PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" |
| 71 | # Weston with systemd-login support |
| 72 | PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" |
| 73 | # Weston with Xwayland support (requires X11 and Wayland) |
| 74 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" |
| 75 | # colord CMS support |
| 76 | PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" |
| 77 | # Clients support |
| 78 | PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" |
| 79 | # Virtual remote output with GStreamer on DRM backend |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 80 | PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 81 | # Weston with PAM support |
| 82 | PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame] | 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" |
| 91 | # JPEG image loading support |
| 92 | PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 93 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 94 | do_install:append() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 95 | # Weston doesn't need the .la files to load modules, so wipe them |
| 96 | rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la |
| 97 | |
| 98 | # If X11, ship a desktop file to launch it |
| 99 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then |
| 100 | install -d ${D}${datadir}/applications |
| 101 | install ${WORKDIR}/weston.desktop ${D}${datadir}/applications |
| 102 | |
| 103 | install -d ${D}${datadir}/icons/hicolor/48x48/apps |
| 104 | install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps |
| 105 | fi |
| 106 | |
| 107 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then |
| 108 | install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland |
| 109 | fi |
| 110 | |
| 111 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then |
| 112 | chmod u+s ${D}${bindir}/weston-launch |
| 113 | fi |
| 114 | } |
| 115 | |
| 116 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ |
| 117 | libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" |
| 118 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 119 | FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" |
| 120 | FILES:${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 121 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 122 | FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" |
| 123 | SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 124 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 125 | FILES:${PN}-examples = "${bindir}/*" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 126 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 127 | FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" |
| 128 | RDEPENDS:${PN}-xwayland += "xwayland" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 129 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 130 | RDEPENDS:${PN} += "xkeyboard-config" |
| 131 | RRECOMMENDS:${PN} = "weston-init liberation-fonts" |
| 132 | RRECOMMENDS:${PN}-dev += "wayland-protocols" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 133 | |
| 134 | USERADD_PACKAGES = "${PN}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 135 | GROUPADD_PARAM:${PN} = "--system weston-launch" |