blob: e27dac164e95b341f4acbf2611389393125bfcca [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
Andrew Geissler615f2f12022-07-15 14:00:58 -05009SRC_URI = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz \
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000010 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
Andrew Geissler615f2f12022-07-15 14:00:58 -050018SRC_URI[sha256sum] = "8a9e52506a865a7410981b04f8341b89b84106db8531ab1f9fdd37b5dc034115"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000019
20UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
21
Andrew Geissler9aee5002022-03-30 16:27:02 +000022inherit meson pkgconfig useradd
23
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000024# depends on virtual/egl
Andrew Geissler9aee5002022-03-30 16:27:02 +000025#
26require ${THISDIR}/required-distro-features.inc
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000027
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)} \
41 ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'sysvinit', 'launcher-libseat', '', d)} \
42 image-jpeg \
43 screenshare \
44 shell-desktop \
45 shell-fullscreen \
46 shell-ivi"
47
Patrick Williams45852732022-04-02 08:58:32 -050048# Can be 'damage', 'im', 'egl', 'shm', 'touch', 'dmabuf-feedback', 'dmabuf-v4l', 'dmabuf-egl' or 'all'
49SIMPLECLIENTS ?= "all"
50
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000051#
52# Compositor choices
53#
54# Weston on KMS
55PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev"
56# Weston on Wayland (nested Weston)
57PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2"
58# Weston on X11
59PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo"
60# Headless Weston
61PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false"
62# Weston on framebuffer
63PACKAGECONFIG[fbdev] = "-Ddeprecated-backend-fbdev=true,-Ddeprecated-backend-fbdev=false,udev mtdev"
64# Weston on RDP
65PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp"
66# weston-launch
67PACKAGECONFIG[launch] = "-Ddeprecated-weston-launch=true,-Ddeprecated-weston-launch=false,drm"
68# VA-API desktop recorder
69PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva"
70# Weston with EGL support
71PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl"
72# Weston with lcms support
73PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms"
74# Weston with webp support
75PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
76# Weston with systemd-login support
77PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus"
78# Weston with Xwayland support (requires X11 and Wayland)
79PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false"
80# colord CMS support
81PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord"
82# Clients support
Patrick Williams45852732022-04-02 08:58:32 -050083PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000084# Virtual remote output with GStreamer on DRM backend
85PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base"
86# Weston with screen-share support
87PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false"
88# Traditional desktop shell
89PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false"
90# Fullscreen shell
91PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false"
92# In-Vehicle Infotainment (IVI) shell
93PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false"
94# 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"
98
99do_install:append() {
100 # Weston doesn't need the .la files to load modules, so wipe them
101 rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la
102
103 # If X11, ship a desktop file to launch it
104 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
105 install -d ${D}${datadir}/applications
106 install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
107
108 install -d ${D}${datadir}/icons/hicolor/48x48/apps
109 install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
110 fi
111
112 if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
113 install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
114 fi
115
116 if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then
117 install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify
118 fi
119
120 if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
121 chmod u+s ${D}${bindir}/weston-launch
122 fi
123}
124
125PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
126 libweston-${WESTON_MAJOR_VERSION} ${PN}-examples"
127
128FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so"
129FILES:${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}"
130
131FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so"
132SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'."
133
134FILES:${PN}-examples = "${bindir}/*"
135
136FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
137RDEPENDS:${PN}-xwayland += "xwayland"
138
139RDEPENDS:${PN} += "xkeyboard-config"
140RRECOMMENDS:${PN} = "weston-init liberation-fonts"
141RRECOMMENDS:${PN}-dev += "wayland-protocols"
142
143USERADD_PACKAGES = "${PN}"
144GROUPADD_PARAM:${PN} = "--system weston-launch"