blob: cfcaaca9c77e3fee20f38d3a88481a47a1fbea7c [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001SUMMARY = "Weston, a Wayland compositor"
2DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
3HOMEPAGE = "http://wayland.freedesktop.org"
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
6 file://libweston/compositor.c;endline=27;md5=eb6d5297798cabe2ddc65e2af519bcf0 \
7 "
8
Andrew Geissler8f840682023-07-21 09:09:43 -05009SRC_URI = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz \
Patrick Williams169d7bc2024-01-05 11:33:25 -060010 file://0001-libweston-tools-Include-libgen.h-for-basename-signat.patch \
Andrew Geissler517393d2023-01-13 08:55:19 -060011 file://weston.png \
12 file://weston.desktop \
13 file://xwayland.weston-start \
14 file://systemd-notify.weston-start \
15 "
16
Andrew Geissler5082cc72023-09-11 08:41:39 -040017SRC_URI[sha256sum] = "eb686a7cf00992a23b17f192fca9a887313e92c346ee35d8575196983d656b4a"
Andrew Geissler517393d2023-01-13 08:55:19 -060018
19UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
20UPSTREAM_CHECK_REGEX = "weston-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)"
21
22inherit meson pkgconfig useradd
23
24# depends on virtual/egl
25#
26require ${THISDIR}/required-distro-features.inc
27
28DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0"
29DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
30
31LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}"
32
33WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
34
35EXTRA_OEMESON += "-Dpipewire=false"
36
37PACKAGECONFIG ??= "${@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)} \
Andrew Geissler8f840682023-07-21 09:09:43 -050041 launcher-libseat \
Andrew Geissler517393d2023-01-13 08:55:19 -060042 image-jpeg \
43 screenshare \
44 shell-desktop \
45 shell-fullscreen \
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060046 shell-ivi \
47 shell-kiosk \
48 "
Andrew Geissler517393d2023-01-13 08:55:19 -060049
50# Can be 'damage', 'im', 'egl', 'shm', 'touch', 'dmabuf-feedback', 'dmabuf-v4l', 'dmabuf-egl' or 'all'
51SIMPLECLIENTS ?= "all"
52
53#
54# Compositor choices
55#
56# Weston on KMS
57PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev"
58# Weston on Wayland (nested Weston)
59PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2"
60# Weston on X11
Patrick Williams520786c2023-06-25 16:20:36 -050061PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcursor"
Andrew Geissler517393d2023-01-13 08:55:19 -060062# Headless Weston
63PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false"
64# Weston on RDP
65PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp"
66# VA-API desktop recorder
67PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva"
68# Weston with EGL support
69PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl"
70# Weston with lcms support
71PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms"
72# Weston with webp support
73PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
Andrew Geissler5082cc72023-09-11 08:41:39 -040074# Weston with systemd support
Andrew Geissler8f840682023-07-21 09:09:43 -050075PACKAGECONFIG[systemd] = "-Dsystemd=true,-Dsystemd=false,systemd dbus"
Andrew Geissler517393d2023-01-13 08:55:19 -060076# Weston with Xwayland support (requires X11 and Wayland)
Andrew Geissler8f840682023-07-21 09:09:43 -050077PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcb libxcursor xcb-util-cursor xwayland"
Andrew Geissler517393d2023-01-13 08:55:19 -060078# colord CMS support
79PACKAGECONFIG[colord] = "-Ddeprecated-color-management-colord=true,-Ddeprecated-color-management-colord=false,colord"
80# Clients support
81PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
82# Virtual remote output with GStreamer on DRM backend
83PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base"
84# Weston with screen-share support
85PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false"
86# Traditional desktop shell
87PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false"
88# Fullscreen shell
89PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false"
90# In-Vehicle Infotainment (IVI) shell
91PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false"
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060092# Kiosk shell
93PACKAGECONFIG[shell-kiosk] = "-Dshell-kiosk=true,-Dshell-kiosk=false"
Andrew Geissler517393d2023-01-13 08:55:19 -060094# JPEG image loading support
95PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg"
96# support libseat based launch
97PACKAGECONFIG[launcher-libseat] = "-Dlauncher-libseat=true,-Dlauncher-libseat=false,seatd"
Andrew Geissler8f840682023-07-21 09:09:43 -050098# deprecated and superseded by libseat launcher
99PACKAGECONFIG[launcher-logind] = "-Ddeprecated-launcher-logind=true,-Ddeprecated-launcher-logind=false,"
100# screencasting via PipeWire
101PACKAGECONFIG[pipewire] = "-Dbackend-pipewire=true,-Dbackend-pipewire=false,pipewire"
102# VNC remote screensharing
103PACKAGECONFIG[vnc] = "-Dbackend-vnc=true,-Dbackend-vnc=false,neatvnc"
104
Andrew Geissler517393d2023-01-13 08:55:19 -0600105
106do_install:append() {
107 # Weston doesn't need the .la files to load modules, so wipe them
108 rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la
109
110 # If X11, ship a desktop file to launch it
111 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
112 install -d ${D}${datadir}/applications
113 install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
114
115 install -d ${D}${datadir}/icons/hicolor/48x48/apps
116 install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
117 fi
118
119 if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
120 install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
121 fi
122
123 if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then
124 install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify
125 fi
126
127 if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
128 chmod u+s ${D}${bindir}/weston-launch
129 fi
130}
131
132PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
133 libweston-${WESTON_MAJOR_VERSION} ${PN}-examples"
134
135FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so"
Andrew Geissler5082cc72023-09-11 08:41:39 -0400136FILES:${PN} = "${sysconfdir} ${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}"
Andrew Geissler517393d2023-01-13 08:55:19 -0600137
138FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so"
139SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'."
140
141FILES:${PN}-examples = "${bindir}/*"
142
143FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
144RDEPENDS:${PN}-xwayland += "xwayland"
145
146RDEPENDS:${PN} += "xkeyboard-config"
147RRECOMMENDS:${PN} = "weston-init liberation-fonts"
148RRECOMMENDS:${PN}-dev += "wayland-protocols"
149
150USERADD_PACKAGES = "${PN}"
151GROUPADD_PARAM:${PN} = "--system weston-launch"