blob: 59ab217a3bd15e6e9fb4ff78305f5833803c4f24 [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 \
Andrew Geisslereff27472021-10-29 15:35:00 -050012 file://systemd-notify.weston-start \
Andrew Geissler82c905d2020-04-13 13:39:40 -050013 file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
Andrew Geisslerc9f78652020-09-18 14:11:35 -050014 file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \
Andrew Geisslerc926e172021-05-07 16:11:35 -050015 file://0001-meson.build-fix-incorrect-header.patch \
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050016 file://0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050017"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050018
Patrick Williams213cb262021-08-07 19:21:33 -050019SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch "
Andrew Geisslerc9f78652020-09-18 14:11:35 -050020
21SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe"
Andrew Geissler82c905d2020-04-13 13:39:40 -050022
23UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
24
25inherit meson pkgconfig useradd features_check
26# depends on virtual/egl
Andrew Geissler6ce62a22020-11-30 19:58:47 -060027# weston-init requires pam enabled if started via systemd
28REQUIRED_DISTRO_FEATURES = "opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}"
Andrew Geissler82c905d2020-04-13 13:39:40 -050029
Andrew Geissler635e0e42020-08-21 15:58:33 -050030DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0"
Andrew Geissler82c905d2020-04-13 13:39:40 -050031DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
32
Andrew Geissler6ce62a22020-11-30 19:58:47 -060033LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}"
34
Andrew Geissler82c905d2020-04-13 13:39:40 -050035WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
36
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050037EXTRA_OEMESON += "-Dbackend-default=auto -Dpipewire=false"
Andrew Geissler82c905d2020-04-13 13:39:40 -050038
39PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \
40 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
41 ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \
42 ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \
Andrew Geissler635e0e42020-08-21 15:58:33 -050043 launch \
44 image-jpeg \
45 screenshare \
46 shell-desktop \
47 shell-fullscreen \
48 shell-ivi"
49
Andrew Geissler82c905d2020-04-13 13:39:40 -050050#
51# Compositor choices
52#
53# Weston on KMS
54PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev"
55# Weston on Wayland (nested Weston)
56PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2"
57# Weston on X11
58PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo"
59# Headless Weston
60PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false"
61# Weston on framebuffer
62PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev"
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050063# Weston on RDP
64PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp"
Andrew Geissler82c905d2020-04-13 13:39:40 -050065# weston-launch
66PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm"
67# VA-API desktop recorder
68PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva"
69# Weston with EGL support
70PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl"
71# Weston with lcms support
72PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms"
73# Weston with webp support
74PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
75# Weston with systemd-login support
76PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus"
77# Weston with Xwayland support (requires X11 and Wayland)
78PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false"
79# colord CMS support
80PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord"
81# Clients support
82PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
83# Virtual remote output with GStreamer on DRM backend
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060084PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base"
Andrew Geissler82c905d2020-04-13 13:39:40 -050085# Weston with PAM support
86PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam"
Andrew Geissler635e0e42020-08-21 15:58:33 -050087# Weston with screen-share support
88PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false"
89# Traditional desktop shell
90PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false"
91# Fullscreen shell
92PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false"
93# In-Vehicle Infotainment (IVI) shell
94PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false"
95# JPEG image loading support
96PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg"
Andrew Geissler82c905d2020-04-13 13:39:40 -050097
Patrick Williams213cb262021-08-07 19:21:33 -050098do_install:append() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050099 # Weston doesn't need the .la files to load modules, so wipe them
100 rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la
101
102 # If X11, ship a desktop file to launch it
103 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
104 install -d ${D}${datadir}/applications
105 install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
106
107 install -d ${D}${datadir}/icons/hicolor/48x48/apps
108 install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
109 fi
110
111 if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
112 install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
113 fi
114
Andrew Geisslereff27472021-10-29 15:35:00 -0500115 if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then
116 install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify
117 fi
118
Andrew Geissler82c905d2020-04-13 13:39:40 -0500119 if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
120 chmod u+s ${D}${bindir}/weston-launch
121 fi
122}
123
124PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
125 libweston-${WESTON_MAJOR_VERSION} ${PN}-examples"
126
Patrick Williams213cb262021-08-07 19:21:33 -0500127FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so"
128FILES:${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 -0500129
Patrick Williams213cb262021-08-07 19:21:33 -0500130FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so"
131SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'."
Andrew Geissler82c905d2020-04-13 13:39:40 -0500132
Patrick Williams213cb262021-08-07 19:21:33 -0500133FILES:${PN}-examples = "${bindir}/*"
Andrew Geissler82c905d2020-04-13 13:39:40 -0500134
Patrick Williams213cb262021-08-07 19:21:33 -0500135FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
136RDEPENDS:${PN}-xwayland += "xwayland"
Andrew Geissler82c905d2020-04-13 13:39:40 -0500137
Patrick Williams213cb262021-08-07 19:21:33 -0500138RDEPENDS:${PN} += "xkeyboard-config"
139RRECOMMENDS:${PN} = "weston-init liberation-fonts"
140RRECOMMENDS:${PN}-dev += "wayland-protocols"
Andrew Geissler82c905d2020-04-13 13:39:40 -0500141
142USERADD_PACKAGES = "${PN}"
Patrick Williams213cb262021-08-07 19:21:33 -0500143GROUPADD_PARAM:${PN} = "--system weston-launch"