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