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 | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 14 | " |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 15 | |
| 16 | SRC_URI_append_libc-musl = " file://dont-use-plane-add-prop.patch " |
| 17 | |
| 18 | SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 19 | |
| 20 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" |
| 21 | |
| 22 | inherit meson pkgconfig useradd features_check |
| 23 | # depends on virtual/egl |
| 24 | REQUIRED_DISTRO_FEATURES = "opengl" |
| 25 | |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame] | 26 | DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 27 | DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" |
| 28 | |
| 29 | WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" |
| 30 | |
| 31 | EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false" |
| 32 | |
| 33 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \ |
| 34 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ |
| 35 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ |
| 36 | ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame] | 37 | launch \ |
| 38 | image-jpeg \ |
| 39 | screenshare \ |
| 40 | shell-desktop \ |
| 41 | shell-fullscreen \ |
| 42 | shell-ivi" |
| 43 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 44 | # |
| 45 | # Compositor choices |
| 46 | # |
| 47 | # Weston on KMS |
| 48 | PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" |
| 49 | # Weston on Wayland (nested Weston) |
| 50 | PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" |
| 51 | # Weston on X11 |
| 52 | PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo" |
| 53 | # Headless Weston |
| 54 | PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" |
| 55 | # Weston on framebuffer |
| 56 | PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" |
| 57 | # weston-launch |
| 58 | PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm" |
| 59 | # VA-API desktop recorder |
| 60 | PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" |
| 61 | # Weston with EGL support |
| 62 | PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" |
| 63 | # Weston with lcms support |
| 64 | PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" |
| 65 | # Weston with webp support |
| 66 | PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" |
| 67 | # Weston with systemd-login support |
| 68 | PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" |
| 69 | # Weston with Xwayland support (requires X11 and Wayland) |
| 70 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" |
| 71 | # colord CMS support |
| 72 | PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" |
| 73 | # Clients support |
| 74 | PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" |
| 75 | # Virtual remote output with GStreamer on DRM backend |
| 76 | PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer-1.0" |
| 77 | # Weston with PAM support |
| 78 | PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame] | 79 | # Weston with screen-share support |
| 80 | PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" |
| 81 | # Traditional desktop shell |
| 82 | PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false" |
| 83 | # Fullscreen shell |
| 84 | PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false" |
| 85 | # In-Vehicle Infotainment (IVI) shell |
| 86 | PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" |
| 87 | # JPEG image loading support |
| 88 | PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 89 | |
| 90 | do_install_append() { |
| 91 | # Weston doesn't need the .la files to load modules, so wipe them |
| 92 | rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la |
| 93 | |
| 94 | # If X11, ship a desktop file to launch it |
| 95 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then |
| 96 | install -d ${D}${datadir}/applications |
| 97 | install ${WORKDIR}/weston.desktop ${D}${datadir}/applications |
| 98 | |
| 99 | install -d ${D}${datadir}/icons/hicolor/48x48/apps |
| 100 | install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps |
| 101 | fi |
| 102 | |
| 103 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then |
| 104 | install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland |
| 105 | fi |
| 106 | |
| 107 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then |
| 108 | chmod u+s ${D}${bindir}/weston-launch |
| 109 | fi |
| 110 | } |
| 111 | |
| 112 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ |
| 113 | libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" |
| 114 | |
| 115 | FILES_${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" |
| 116 | FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" |
| 117 | |
| 118 | FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" |
| 119 | SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." |
| 120 | |
| 121 | FILES_${PN}-examples = "${bindir}/*" |
| 122 | |
| 123 | FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" |
| 124 | RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland" |
| 125 | |
| 126 | RDEPENDS_${PN} += "xkeyboard-config" |
| 127 | RRECOMMENDS_${PN} = "weston-init liberation-fonts" |
| 128 | RRECOMMENDS_${PN}-dev += "wayland-protocols" |
| 129 | |
| 130 | USERADD_PACKAGES = "${PN}" |
| 131 | GROUPADD_PARAM_${PN} = "--system weston-launch" |