blob: 5d2a9336f3961b66843f2fc0936e1d244af53766 [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001SUMMARY = "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 \
Brad Bishopc342db32019-05-15 21:57:59 -040011 file://xwayland.weston-start \
12 file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
13"
Brad Bishop79641f22019-09-10 07:20:22 -040014SRC_URI[md5sum] = "cbfda483bc2501d0831af3f33c707850"
15SRC_URI[sha256sum] = "a00a6d207b6a45f95f4401c604772a307c3767e5e2beecf3d879110c43909a64"
Brad Bishopc342db32019-05-15 21:57:59 -040016
17UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
18
Brad Bishop08902b02019-08-20 09:16:51 -040019inherit meson pkgconfig useradd distro_features_check
Brad Bishopc342db32019-05-15 21:57:59 -040020# depends on virtual/egl
21REQUIRED_DISTRO_FEATURES = "opengl"
22
23DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
24DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
25
26WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
27
Brad Bishop79641f22019-09-10 07:20:22 -040028EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false"
Brad Bishop08902b02019-08-20 09:16:51 -040029
Brad Bishopc342db32019-05-15 21:57:59 -040030PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
31 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
32 ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \
Brad Bishop08902b02019-08-20 09:16:51 -040033 ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \
Brad Bishopc342db32019-05-15 21:57:59 -040034 clients launch"
35#
36# Compositor choices
37#
38# Weston on KMS
Brad Bishop08902b02019-08-20 09:16:51 -040039PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/mesa virtual/libgbm mtdev"
Brad Bishopc342db32019-05-15 21:57:59 -040040# Weston on Wayland (nested Weston)
Brad Bishop08902b02019-08-20 09:16:51 -040041PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/mesa"
Brad Bishopc342db32019-05-15 21:57:59 -040042# Weston on X11
Brad Bishop08902b02019-08-20 09:16:51 -040043PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo"
Brad Bishopc342db32019-05-15 21:57:59 -040044# Headless Weston
Brad Bishop08902b02019-08-20 09:16:51 -040045PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false"
Brad Bishopc342db32019-05-15 21:57:59 -040046# Weston on framebuffer
Brad Bishop08902b02019-08-20 09:16:51 -040047PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev"
Brad Bishopc342db32019-05-15 21:57:59 -040048# weston-launch
Brad Bishop08902b02019-08-20 09:16:51 -040049PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm"
Brad Bishopc342db32019-05-15 21:57:59 -040050# VA-API desktop recorder
Brad Bishop08902b02019-08-20 09:16:51 -040051PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva"
Brad Bishopc342db32019-05-15 21:57:59 -040052# Weston with EGL support
Brad Bishop08902b02019-08-20 09:16:51 -040053PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl"
Brad Bishopc342db32019-05-15 21:57:59 -040054# Weston with lcms support
Brad Bishop08902b02019-08-20 09:16:51 -040055PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms"
Brad Bishopc342db32019-05-15 21:57:59 -040056# Weston with webp support
Brad Bishop08902b02019-08-20 09:16:51 -040057PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
Brad Bishopc342db32019-05-15 21:57:59 -040058# Weston with systemd-login support
Brad Bishop08902b02019-08-20 09:16:51 -040059PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus"
Brad Bishopc342db32019-05-15 21:57:59 -040060# Weston with Xwayland support (requires X11 and Wayland)
Brad Bishop08902b02019-08-20 09:16:51 -040061PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false"
Brad Bishopc342db32019-05-15 21:57:59 -040062# colord CMS support
Brad Bishop08902b02019-08-20 09:16:51 -040063PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord"
Brad Bishopc342db32019-05-15 21:57:59 -040064# Clients support
Brad Bishop08902b02019-08-20 09:16:51 -040065PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
66# Virtual remote output with GStreamer on DRM backend
67PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer-1.0"
Brad Bishopc342db32019-05-15 21:57:59 -040068# Weston with PAM support
Brad Bishop08902b02019-08-20 09:16:51 -040069PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam"
Brad Bishopc342db32019-05-15 21:57:59 -040070
71do_install_append() {
72 # Weston doesn't need the .la files to load modules, so wipe them
73 rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la
74
75 # If X11, ship a desktop file to launch it
76 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
77 install -d ${D}${datadir}/applications
78 install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
79
80 install -d ${D}${datadir}/icons/hicolor/48x48/apps
81 install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
82 fi
83
84 if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
85 install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
86 fi
Brad Bishop08902b02019-08-20 09:16:51 -040087
88 if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
89 chmod u+s ${D}${bindir}/weston-launch
90 fi
Brad Bishopc342db32019-05-15 21:57:59 -040091}
92
93PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
94 libweston-${WESTON_MAJOR_VERSION} ${PN}-examples"
95
96FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
97
98FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so"
99SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'."
100
101FILES_${PN}-examples = "${bindir}/*"
102
103FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
104RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
105
106RDEPENDS_${PN} += "xkeyboard-config"
107RRECOMMENDS_${PN} = "weston-conf liberation-fonts"
108RRECOMMENDS_${PN}-dev += "wayland-protocols"
109
110USERADD_PACKAGES = "${PN}"
111GROUPADD_PARAM_${PN} = "--system weston-launch"