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