blob: e51710928a1143a363f35eef71dd1b7e135a806a [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001SUMMARY = "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://0001-make-error-portable.patch \
12 file://xwayland.weston-start \
13 file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
14"
15SRC_URI[md5sum] = "752a04ce3c65af4884cfac4e57231bdb"
16SRC_URI[sha256sum] = "15a23423bcfa45e31e1dedc0cd524ba71e2930df174fde9c99b71a537c4e4caf"
17
18UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
19
20inherit autotools pkgconfig useradd distro_features_check
21# depends on virtual/egl
22REQUIRED_DISTRO_FEATURES = "opengl"
23
24DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
25DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
26
27WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
28
29EXTRA_OECONF = "--enable-setuid-install \
30 --disable-rdp-compositor \
31 "
32PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
33 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
34 ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \
35 clients launch"
36#
37# Compositor choices
38#
39# Weston on KMS
40PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa virtual/libgbm mtdev"
41# Weston on Wayland (nested Weston)
42PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa"
43# Weston on X11
44PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo"
45# Headless Weston
46PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor"
47# Weston on framebuffer
48PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev"
49# weston-launch
50PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm"
51# VA-API desktop recorder
52PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva"
53# Weston with EGL support
54PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl"
55# Weston with cairo glesv2 support
56PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo"
57# Weston with lcms support
58PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms"
59# Weston with webp support
60PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp"
61# Weston with systemd-login support
62PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus"
63# Weston with Xwayland support (requires X11 and Wayland)
64PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland"
65# colord CMS support
66PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord"
67# Clients support
68PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients"
69# Weston with PAM support
70PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
71
72do_install_append() {
73 # Weston doesn't need the .la files to load modules, so wipe them
74 rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la
75
76 # If X11, ship a desktop file to launch it
77 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
78 install -d ${D}${datadir}/applications
79 install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
80
81 install -d ${D}${datadir}/icons/hicolor/48x48/apps
82 install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
83 fi
84
85 if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
86 install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
87 fi
88}
89
90PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
91 libweston-${WESTON_MAJOR_VERSION} ${PN}-examples"
92
93FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
94
95FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so"
96SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'."
97
98FILES_${PN}-examples = "${bindir}/*"
99
100FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
101RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
102
103RDEPENDS_${PN} += "xkeyboard-config"
104RRECOMMENDS_${PN} = "weston-conf liberation-fonts"
105RRECOMMENDS_${PN}-dev += "wayland-protocols"
106
107USERADD_PACKAGES = "${PN}"
108GROUPADD_PARAM_${PN} = "--system weston-launch"