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