blob: 8424b4d5482411ba0f3311ab55b047b61892c847 [file] [log] [blame]
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00001SUMMARY = "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=eb6d5297798cabe2ddc65e2af519bcf0 \
7 "
8
9SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
10 file://weston.png \
11 file://weston.desktop \
12 file://xwayland.weston-start \
13 file://systemd-notify.weston-start \
14 "
15
16SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch "
17
18SRC_URI[sha256sum] = "5c23964112b90238bed39e5dd1e41cd71a79398813cdc3bbb15a9fdc94e547ae"
19
20UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
21
Andrew Geissler9aee5002022-03-30 16:27:02 +000022inherit meson pkgconfig useradd
23
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000024# depends on virtual/egl
Andrew Geissler9aee5002022-03-30 16:27:02 +000025#
26require ${THISDIR}/required-distro-features.inc
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000027
28DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0"
29DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
30
31LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}"
32
33WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
34
35EXTRA_OEMESON += "-Dpipewire=false"
36
37PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms wayland egl clients', '', d)} \
38 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
39 ${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \
40 ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \
41 ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'sysvinit', 'launcher-libseat', '', d)} \
42 image-jpeg \
43 screenshare \
44 shell-desktop \
45 shell-fullscreen \
46 shell-ivi"
47
48#
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] = "-Ddeprecated-backend-fbdev=true,-Ddeprecated-backend-fbdev=false,udev mtdev"
61# Weston on RDP
62PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp"
63# weston-launch
64PACKAGECONFIG[launch] = "-Ddeprecated-weston-launch=true,-Ddeprecated-weston-launch=false,drm"
65# VA-API desktop recorder
66PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva"
67# Weston with EGL support
68PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl"
69# Weston with lcms support
70PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms"
71# Weston with webp support
72PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
73# Weston with systemd-login support
74PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus"
75# Weston with Xwayland support (requires X11 and Wayland)
76PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false"
77# colord CMS support
78PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord"
79# Clients support
80PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
81# Virtual remote output with GStreamer on DRM backend
82PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base"
83# 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"
93# support libseat based launch
94PACKAGECONFIG[launcher-libseat] = "-Dlauncher-libseat=true,-Dlauncher-libseat=false,seatd"
95
96do_install:append() {
97 # Weston doesn't need the .la files to load modules, so wipe them
98 rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la
99
100 # If X11, ship a desktop file to launch it
101 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
102 install -d ${D}${datadir}/applications
103 install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
104
105 install -d ${D}${datadir}/icons/hicolor/48x48/apps
106 install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
107 fi
108
109 if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
110 install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
111 fi
112
113 if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then
114 install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify
115 fi
116
117 if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
118 chmod u+s ${D}${bindir}/weston-launch
119 fi
120}
121
122PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
123 libweston-${WESTON_MAJOR_VERSION} ${PN}-examples"
124
125FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so"
126FILES:${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}"
127
128FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so"
129SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'."
130
131FILES:${PN}-examples = "${bindir}/*"
132
133FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
134RDEPENDS:${PN}-xwayland += "xwayland"
135
136RDEPENDS:${PN} += "xkeyboard-config"
137RRECOMMENDS:${PN} = "weston-init liberation-fonts"
138RRECOMMENDS:${PN}-dev += "wayland-protocols"
139
140USERADD_PACKAGES = "${PN}"
141GROUPADD_PARAM:${PN} = "--system weston-launch"