blob: 8fef86482704cff8adc101c9ced6853324f156e5 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "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=6c53bbbd99273f4f7c4affa855c33c0a"
7
8SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
9 file://weston.png \
10 file://weston.desktop \
11 file://xwayland.weston-start \
12 file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
13"
14SRC_URI[md5sum] = "53e4810d852df0601d01fd986a5b22b3"
15SRC_URI[sha256sum] = "7518b49b2eaa1c3091f24671bdcc124fd49fc8f1af51161927afa4329c027848"
16
17UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
18
19inherit meson pkgconfig useradd features_check
20# depends on virtual/egl
21REQUIRED_DISTRO_FEATURES = "opengl"
22
Andrew Geissler635e0e42020-08-21 15:58:33 -050023DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0"
Andrew Geissler82c905d2020-04-13 13:39:40 -050024DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
25
26WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
27
28EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false"
29
30PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \
31 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
32 ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \
33 ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \
Andrew Geissler635e0e42020-08-21 15:58:33 -050034 launch \
35 image-jpeg \
36 screenshare \
37 shell-desktop \
38 shell-fullscreen \
39 shell-ivi"
40
Andrew Geissler82c905d2020-04-13 13:39:40 -050041#
42# Compositor choices
43#
44# Weston on KMS
45PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev"
46# Weston on Wayland (nested Weston)
47PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2"
48# Weston on X11
49PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo"
50# Headless Weston
51PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false"
52# Weston on framebuffer
53PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev"
54# weston-launch
55PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm"
56# VA-API desktop recorder
57PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva"
58# Weston with EGL support
59PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl"
60# Weston with lcms support
61PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms"
62# Weston with webp support
63PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
64# Weston with systemd-login support
65PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus"
66# Weston with Xwayland support (requires X11 and Wayland)
67PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false"
68# colord CMS support
69PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord"
70# Clients support
71PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
72# Virtual remote output with GStreamer on DRM backend
73PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer-1.0"
74# Weston with PAM support
75PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam"
Andrew Geissler635e0e42020-08-21 15:58:33 -050076# Weston with screen-share support
77PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false"
78# Traditional desktop shell
79PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false"
80# Fullscreen shell
81PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false"
82# In-Vehicle Infotainment (IVI) shell
83PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false"
84# JPEG image loading support
85PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg"
Andrew Geissler82c905d2020-04-13 13:39:40 -050086
87do_install_append() {
88 # Weston doesn't need the .la files to load modules, so wipe them
89 rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la
90
91 # If X11, ship a desktop file to launch it
92 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
93 install -d ${D}${datadir}/applications
94 install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
95
96 install -d ${D}${datadir}/icons/hicolor/48x48/apps
97 install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
98 fi
99
100 if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
101 install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
102 fi
103
104 if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
105 chmod u+s ${D}${bindir}/weston-launch
106 fi
107}
108
109PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
110 libweston-${WESTON_MAJOR_VERSION} ${PN}-examples"
111
112FILES_${PN}-dev += "${libdir}/${BPN}/libexec_weston.so"
113FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}"
114
115FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so"
116SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'."
117
118FILES_${PN}-examples = "${bindir}/*"
119
120FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
121RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
122
123RDEPENDS_${PN} += "xkeyboard-config"
124RRECOMMENDS_${PN} = "weston-init liberation-fonts"
125RRECOMMENDS_${PN}-dev += "wayland-protocols"
126
127USERADD_PACKAGES = "${PN}"
128GROUPADD_PARAM_${PN} = "--system weston-launch"