blob: 5a179e6770c09272e6b253962a449eddc6d5ae6b [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 \
Andrew Geissler517393d2023-01-13 08:55:19 -060010 file://weston.png \
11 file://weston.desktop \
12 file://xwayland.weston-start \
13 file://systemd-notify.weston-start \
14 "
15
Andrew Geissler5082cc72023-09-11 08:41:39 -040016SRC_URI[sha256sum] = "eb686a7cf00992a23b17f192fca9a887313e92c346ee35d8575196983d656b4a"
Andrew Geissler517393d2023-01-13 08:55:19 -060017
18UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
19UPSTREAM_CHECK_REGEX = "weston-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)"
20
21inherit meson pkgconfig useradd
22
23# depends on virtual/egl
24#
25require ${THISDIR}/required-distro-features.inc
26
27DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0"
28DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
29
30LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}"
31
32WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
33
34EXTRA_OEMESON += "-Dpipewire=false"
35
36PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms wayland egl clients', '', d)} \
37 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
38 ${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \
39 ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \
Andrew Geissler8f840682023-07-21 09:09:43 -050040 launcher-libseat \
Andrew Geissler517393d2023-01-13 08:55:19 -060041 image-jpeg \
42 screenshare \
43 shell-desktop \
44 shell-fullscreen \
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060045 shell-ivi \
46 shell-kiosk \
47 "
Andrew Geissler517393d2023-01-13 08:55:19 -060048
49# Can be 'damage', 'im', 'egl', 'shm', 'touch', 'dmabuf-feedback', 'dmabuf-v4l', 'dmabuf-egl' or 'all'
50SIMPLECLIENTS ?= "all"
51
52#
53# Compositor choices
54#
55# Weston on KMS
56PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev"
57# Weston on Wayland (nested Weston)
58PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2"
59# Weston on X11
Patrick Williams520786c2023-06-25 16:20:36 -050060PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcursor"
Andrew Geissler517393d2023-01-13 08:55:19 -060061# Headless Weston
62PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false"
63# Weston on RDP
64PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp"
65# VA-API desktop recorder
66PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva"
67# Weston with EGL support
68PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl"
69# Weston with lcms support
70PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms"
71# Weston with webp support
72PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
Andrew Geissler5082cc72023-09-11 08:41:39 -040073# Weston with systemd support
Andrew Geissler8f840682023-07-21 09:09:43 -050074PACKAGECONFIG[systemd] = "-Dsystemd=true,-Dsystemd=false,systemd dbus"
Andrew Geissler517393d2023-01-13 08:55:19 -060075# Weston with Xwayland support (requires X11 and Wayland)
Andrew Geissler8f840682023-07-21 09:09:43 -050076PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcb libxcursor xcb-util-cursor xwayland"
Andrew Geissler517393d2023-01-13 08:55:19 -060077# colord CMS support
78PACKAGECONFIG[colord] = "-Ddeprecated-color-management-colord=true,-Ddeprecated-color-management-colord=false,colord"
79# Clients support
80PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
81# Virtual remote output with GStreamer on DRM backend
82PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base"
83# Weston with screen-share support
84PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false"
85# Traditional desktop shell
86PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false"
87# Fullscreen shell
88PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false"
89# In-Vehicle Infotainment (IVI) shell
90PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false"
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060091# Kiosk shell
92PACKAGECONFIG[shell-kiosk] = "-Dshell-kiosk=true,-Dshell-kiosk=false"
Andrew Geissler517393d2023-01-13 08:55:19 -060093# JPEG image loading support
94PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg"
95# support libseat based launch
96PACKAGECONFIG[launcher-libseat] = "-Dlauncher-libseat=true,-Dlauncher-libseat=false,seatd"
Andrew Geissler8f840682023-07-21 09:09:43 -050097# deprecated and superseded by libseat launcher
98PACKAGECONFIG[launcher-logind] = "-Ddeprecated-launcher-logind=true,-Ddeprecated-launcher-logind=false,"
99# screencasting via PipeWire
100PACKAGECONFIG[pipewire] = "-Dbackend-pipewire=true,-Dbackend-pipewire=false,pipewire"
101# VNC remote screensharing
102PACKAGECONFIG[vnc] = "-Dbackend-vnc=true,-Dbackend-vnc=false,neatvnc"
103
Andrew Geissler517393d2023-01-13 08:55:19 -0600104
105do_install:append() {
106 # Weston doesn't need the .la files to load modules, so wipe them
107 rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la
108
109 # If X11, ship a desktop file to launch it
110 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
111 install -d ${D}${datadir}/applications
112 install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
113
114 install -d ${D}${datadir}/icons/hicolor/48x48/apps
115 install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
116 fi
117
118 if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
119 install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
120 fi
121
122 if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then
123 install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify
124 fi
125
126 if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
127 chmod u+s ${D}${bindir}/weston-launch
128 fi
129}
130
131PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
132 libweston-${WESTON_MAJOR_VERSION} ${PN}-examples"
133
134FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so"
Andrew Geissler5082cc72023-09-11 08:41:39 -0400135FILES:${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 -0600136
137FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so"
138SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'."
139
140FILES:${PN}-examples = "${bindir}/*"
141
142FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
143RDEPENDS:${PN}-xwayland += "xwayland"
144
145RDEPENDS:${PN} += "xkeyboard-config"
146RRECOMMENDS:${PN} = "weston-init liberation-fonts"
147RRECOMMENDS:${PN}-dev += "wayland-protocols"
148
149USERADD_PACKAGES = "${PN}"
150GROUPADD_PARAM:${PN} = "--system weston-launch"