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