blob: 50fbfa613b1807cf4b0437831ce281b9d70d0afc [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
Andrew Geissler6ce62a22020-11-30 19:58:47 -060024# weston-init requires pam enabled if started via systemd
25REQUIRED_DISTRO_FEATURES = "opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}"
Andrew Geissler82c905d2020-04-13 13:39:40 -050026
Andrew Geissler635e0e42020-08-21 15:58:33 -050027DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0"
Andrew Geissler82c905d2020-04-13 13:39:40 -050028DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
29
Andrew Geissler6ce62a22020-11-30 19:58:47 -060030LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}"
31
Andrew Geissler82c905d2020-04-13 13:39:40 -050032WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
33
34EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false"
35
36PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \
37 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
38 ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \
39 ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \
Andrew Geissler635e0e42020-08-21 15:58:33 -050040 launch \
41 image-jpeg \
42 screenshare \
43 shell-desktop \
44 shell-fullscreen \
45 shell-ivi"
46
Andrew Geissler82c905d2020-04-13 13:39:40 -050047#
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] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev"
60# weston-launch
61PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm"
62# VA-API desktop recorder
63PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva"
64# Weston with EGL support
65PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl"
66# Weston with lcms support
67PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms"
68# Weston with webp support
69PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
70# Weston with systemd-login support
71PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus"
72# Weston with Xwayland support (requires X11 and Wayland)
73PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false"
74# colord CMS support
75PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord"
76# Clients support
77PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
78# Virtual remote output with GStreamer on DRM backend
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060079PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base"
Andrew Geissler82c905d2020-04-13 13:39:40 -050080# Weston with PAM support
81PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam"
Andrew Geissler635e0e42020-08-21 15:58:33 -050082# 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"
Andrew Geissler82c905d2020-04-13 13:39:40 -050092
93do_install_append() {
94 # Weston doesn't need the .la files to load modules, so wipe them
95 rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la
96
97 # If X11, ship a desktop file to launch it
98 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
99 install -d ${D}${datadir}/applications
100 install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
101
102 install -d ${D}${datadir}/icons/hicolor/48x48/apps
103 install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
104 fi
105
106 if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
107 install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
108 fi
109
110 if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
111 chmod u+s ${D}${bindir}/weston-launch
112 fi
113}
114
115PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
116 libweston-${WESTON_MAJOR_VERSION} ${PN}-examples"
117
118FILES_${PN}-dev += "${libdir}/${BPN}/libexec_weston.so"
119FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}"
120
121FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so"
122SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'."
123
124FILES_${PN}-examples = "${bindir}/*"
125
126FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
127RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
128
129RDEPENDS_${PN} += "xkeyboard-config"
130RRECOMMENDS_${PN} = "weston-init liberation-fonts"
131RRECOMMENDS_${PN}-dev += "wayland-protocols"
132
133USERADD_PACKAGES = "${PN}"
134GROUPADD_PARAM_${PN} = "--system weston-launch"