blob: 1f1d62ea7ca2b96fe352a4c12921651af0d4cc68 [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 Geisslerc926e172021-05-07 16:11:35 -050014 file://0001-meson.build-fix-incorrect-header.patch \
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050015 file://0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050016"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050017
Patrick Williams213cb262021-08-07 19:21:33 -050018SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch "
Andrew Geisslerc9f78652020-09-18 14:11:35 -050019
20SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe"
Andrew Geissler82c905d2020-04-13 13:39:40 -050021
22UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
23
24inherit meson pkgconfig useradd features_check
25# depends on virtual/egl
Andrew Geissler6ce62a22020-11-30 19:58:47 -060026# weston-init requires pam enabled if started via systemd
27REQUIRED_DISTRO_FEATURES = "opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}"
Andrew Geissler82c905d2020-04-13 13:39:40 -050028
Andrew Geissler635e0e42020-08-21 15:58:33 -050029DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0"
Andrew Geissler82c905d2020-04-13 13:39:40 -050030DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
31
Andrew Geissler6ce62a22020-11-30 19:58:47 -060032LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}"
33
Andrew Geissler82c905d2020-04-13 13:39:40 -050034WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
35
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050036EXTRA_OEMESON += "-Dbackend-default=auto -Dpipewire=false"
Andrew Geissler82c905d2020-04-13 13:39:40 -050037
38PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \
39 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
40 ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \
41 ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \
Andrew Geissler635e0e42020-08-21 15:58:33 -050042 launch \
43 image-jpeg \
44 screenshare \
45 shell-desktop \
46 shell-fullscreen \
47 shell-ivi"
48
Andrew Geissler82c905d2020-04-13 13:39:40 -050049#
50# Compositor choices
51#
52# Weston on KMS
53PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev"
54# Weston on Wayland (nested Weston)
55PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2"
56# Weston on X11
57PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo"
58# Headless Weston
59PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false"
60# Weston on framebuffer
61PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev"
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050062# Weston on RDP
63PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp"
Andrew Geissler82c905d2020-04-13 13:39:40 -050064# weston-launch
65PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm"
66# VA-API desktop recorder
67PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva"
68# Weston with EGL support
69PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl"
70# Weston with lcms support
71PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms"
72# Weston with webp support
73PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
74# Weston with systemd-login support
75PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus"
76# Weston with Xwayland support (requires X11 and Wayland)
77PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false"
78# colord CMS support
79PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord"
80# Clients support
81PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
82# Virtual remote output with GStreamer on DRM backend
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060083PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base"
Andrew Geissler82c905d2020-04-13 13:39:40 -050084# Weston with PAM support
85PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam"
Andrew Geissler635e0e42020-08-21 15:58:33 -050086# 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"
Andrew Geissler82c905d2020-04-13 13:39:40 -050096
Patrick Williams213cb262021-08-07 19:21:33 -050097do_install:append() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050098 # Weston doesn't need the .la files to load modules, so wipe them
99 rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la
100
101 # If X11, ship a desktop file to launch it
102 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
103 install -d ${D}${datadir}/applications
104 install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
105
106 install -d ${D}${datadir}/icons/hicolor/48x48/apps
107 install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
108 fi
109
110 if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
111 install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
112 fi
113
114 if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
115 chmod u+s ${D}${bindir}/weston-launch
116 fi
117}
118
119PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
120 libweston-${WESTON_MAJOR_VERSION} ${PN}-examples"
121
Patrick Williams213cb262021-08-07 19:21:33 -0500122FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so"
123FILES:${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}"
Andrew Geissler82c905d2020-04-13 13:39:40 -0500124
Patrick Williams213cb262021-08-07 19:21:33 -0500125FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so"
126SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'."
Andrew Geissler82c905d2020-04-13 13:39:40 -0500127
Patrick Williams213cb262021-08-07 19:21:33 -0500128FILES:${PN}-examples = "${bindir}/*"
Andrew Geissler82c905d2020-04-13 13:39:40 -0500129
Patrick Williams213cb262021-08-07 19:21:33 -0500130FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
131RDEPENDS:${PN}-xwayland += "xwayland"
Andrew Geissler82c905d2020-04-13 13:39:40 -0500132
Patrick Williams213cb262021-08-07 19:21:33 -0500133RDEPENDS:${PN} += "xkeyboard-config"
134RRECOMMENDS:${PN} = "weston-init liberation-fonts"
135RRECOMMENDS:${PN}-dev += "wayland-protocols"
Andrew Geissler82c905d2020-04-13 13:39:40 -0500136
137USERADD_PACKAGES = "${PN}"
Patrick Williams213cb262021-08-07 19:21:33 -0500138GROUPADD_PARAM:${PN} = "--system weston-launch"