blob: fbb7927820a9df8598f1226f4e1a897099b28755 [file] [log] [blame]
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00001SUMMARY = "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
9SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
10 file://weston.png \
11 file://weston.desktop \
12 file://xwayland.weston-start \
13 file://systemd-notify.weston-start \
14 "
15
16SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch "
17
18SRC_URI[sha256sum] = "5c23964112b90238bed39e5dd1e41cd71a79398813cdc3bbb15a9fdc94e547ae"
19
20UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
21
22inherit meson pkgconfig useradd features_check
23# depends on virtual/egl
24# weston-init requires pam enabled if started via systemd
25REQUIRED_DISTRO_FEATURES = "opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}"
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)} \
40 ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'sysvinit', 'launcher-libseat', '', d)} \
41 image-jpeg \
42 screenshare \
43 shell-desktop \
44 shell-fullscreen \
45 shell-ivi"
46
47#
48# Compositor choices
49#
50# Weston on KMS
51PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev"
52# Weston on Wayland (nested Weston)
53PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2"
54# Weston on X11
55PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo"
56# Headless Weston
57PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false"
58# Weston on framebuffer
59PACKAGECONFIG[fbdev] = "-Ddeprecated-backend-fbdev=true,-Ddeprecated-backend-fbdev=false,udev mtdev"
60# Weston on RDP
61PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp"
62# weston-launch
63PACKAGECONFIG[launch] = "-Ddeprecated-weston-launch=true,-Ddeprecated-weston-launch=false,drm"
64# VA-API desktop recorder
65PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva"
66# Weston with EGL support
67PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl"
68# Weston with lcms support
69PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms"
70# Weston with webp support
71PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
72# Weston with systemd-login support
73PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus"
74# Weston with Xwayland support (requires X11 and Wayland)
75PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false"
76# colord CMS support
77PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord"
78# Clients support
79PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
80# Virtual remote output with GStreamer on DRM backend
81PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base"
82# Weston with screen-share support
83PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false"
84# Traditional desktop shell
85PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false"
86# Fullscreen shell
87PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false"
88# In-Vehicle Infotainment (IVI) shell
89PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false"
90# JPEG image loading support
91PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg"
92# support libseat based launch
93PACKAGECONFIG[launcher-libseat] = "-Dlauncher-libseat=true,-Dlauncher-libseat=false,seatd"
94
95do_install:append() {
96 # Weston doesn't need the .la files to load modules, so wipe them
97 rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la
98
99 # If X11, ship a desktop file to launch it
100 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
101 install -d ${D}${datadir}/applications
102 install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
103
104 install -d ${D}${datadir}/icons/hicolor/48x48/apps
105 install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
106 fi
107
108 if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
109 install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
110 fi
111
112 if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then
113 install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify
114 fi
115
116 if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
117 chmod u+s ${D}${bindir}/weston-launch
118 fi
119}
120
121PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
122 libweston-${WESTON_MAJOR_VERSION} ${PN}-examples"
123
124FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so"
125FILES:${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}"
126
127FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so"
128SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'."
129
130FILES:${PN}-examples = "${bindir}/*"
131
132FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
133RDEPENDS:${PN}-xwayland += "xwayland"
134
135RDEPENDS:${PN} += "xkeyboard-config"
136RRECOMMENDS:${PN} = "weston-init liberation-fonts"
137RRECOMMENDS:${PN}-dev += "wayland-protocols"
138
139USERADD_PACKAGES = "${PN}"
140GROUPADD_PARAM:${PN} = "--system weston-launch"