summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/wayland/weston_10.0.1.imx.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics/wayland/weston_10.0.1.imx.bb')
-rw-r--r--recipes-graphics/wayland/weston_10.0.1.imx.bb212
1 files changed, 212 insertions, 0 deletions
diff --git a/recipes-graphics/wayland/weston_10.0.1.imx.bb b/recipes-graphics/wayland/weston_10.0.1.imx.bb
new file mode 100644
index 00000000..84cd9fd8
--- /dev/null
+++ b/recipes-graphics/wayland/weston_10.0.1.imx.bb
@@ -0,0 +1,212 @@
1# This recipe is for the i.MX fork of weston. For ease of
2# maintenance, the top section is a verbatim copy of an OE-core
3# recipe. The second section customizes the recipe for i.MX.
4
5########### OE-core copy ##################
6# Upstream hash: 400aae43d08f0b9f787ac0d21cb3c97058d76748
7
8SUMMARY = "Weston, a Wayland compositor"
9DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
10HOMEPAGE = "http://wayland.freedesktop.org"
11LICENSE = "MIT"
12LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
13 file://libweston/compositor.c;endline=27;md5=eb6d5297798cabe2ddc65e2af519bcf0 \
14 "
15
16SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
17 file://weston.png \
18 file://weston.desktop \
19 file://xwayland.weston-start \
20 file://systemd-notify.weston-start \
21 "
22
23SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch "
24
25SRC_URI[sha256sum] = "5c23964112b90238bed39e5dd1e41cd71a79398813cdc3bbb15a9fdc94e547ae"
26
27UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
28
29inherit meson pkgconfig useradd
30
31# depends on virtual/egl
32#
33require ${THISDIR}/required-distro-features.inc
34
35DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0"
36DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
37DEPENDS:append:imxfbdev = " libdrm"
38
39LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}"
40
41WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
42
43EXTRA_OEMESON += "-Dpipewire=false"
44
45PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms wayland egl clients', '', d)} \
46 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
47 ${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \
48 ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \
49 ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'sysvinit', 'launcher-libseat', '', d)} \
50 image-jpeg \
51 screenshare \
52 shell-desktop \
53 shell-fullscreen \
54 shell-ivi"
55
56# Can be 'damage', 'im', 'egl', 'shm', 'touch', 'dmabuf-feedback', 'dmabuf-v4l', 'dmabuf-egl' or 'all'
57SIMPLECLIENTS ?= "all"
58
59#
60# Compositor choices
61#
62# Weston on KMS
63PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev"
64# Weston on Wayland (nested Weston)
65PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2"
66# Weston on X11
67PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo"
68# Headless Weston
69PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false"
70# Weston on framebuffer
71PACKAGECONFIG[fbdev] = "-Ddeprecated-backend-fbdev=true,-Ddeprecated-backend-fbdev=false,udev mtdev"
72# Weston on RDP
73PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp"
74# weston-launch
75PACKAGECONFIG[launch] = "-Ddeprecated-weston-launch=true,-Ddeprecated-weston-launch=false,drm"
76# VA-API desktop recorder
77PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva"
78# Weston with EGL support
79PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl"
80# Weston with lcms support
81PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms"
82# Weston with webp support
83PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
84# Weston with systemd-login support
85PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus"
86# Weston with Xwayland support (requires X11 and Wayland)
87PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false"
88# colord CMS support
89PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord"
90# Clients support
91PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
92# Virtual remote output with GStreamer on DRM backend
93PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base"
94# Weston with screen-share support
95PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false"
96# Traditional desktop shell
97PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false"
98# Fullscreen shell
99PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false"
100# In-Vehicle Infotainment (IVI) shell
101PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false"
102# JPEG image loading support
103PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg"
104# support libseat based launch
105PACKAGECONFIG[launcher-libseat] = "-Dlauncher-libseat=true,-Dlauncher-libseat=false,seatd"
106
107do_install:append() {
108 # Weston doesn't need the .la files to load modules, so wipe them
109 rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la
110
111 # If X11, ship a desktop file to launch it
112 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
113 install -d ${D}${datadir}/applications
114 install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
115
116 install -d ${D}${datadir}/icons/hicolor/48x48/apps
117 install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
118 fi
119
120 if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
121 install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
122 fi
123
124 if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then
125 install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify
126 fi
127
128 if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
129 chmod u+s ${D}${bindir}/weston-launch
130 fi
131}
132
133PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
134 libweston-${WESTON_MAJOR_VERSION} ${PN}-examples"
135
136FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so"
137FILES:${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}"
138
139FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so"
140SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'."
141
142FILES:${PN}-examples = "${bindir}/*"
143
144FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
145RDEPENDS:${PN}-xwayland += "xwayland"
146
147RDEPENDS:${PN} += "xkeyboard-config"
148RRECOMMENDS:${PN} = "weston-init liberation-fonts"
149RRECOMMENDS:${PN}-dev += "wayland-protocols"
150
151USERADD_PACKAGES = "${PN}"
152GROUPADD_PARAM:${PN} = "--system weston-launch"
153
154########### End of OE-core copy ###########
155
156########### i.MX overrides ################
157
158SUMMARY = "Weston, a Wayland compositor, i.MX fork"
159
160DEFAULT_PREFERENCE = "-1"
161
162SRC_URI:remove = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
163SRC_URI:prepend = "git://github.com/nxp-imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} "
164SRC_URI += "file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch \
165 file://0001-g2d-renderer.c-Include-sys-stat.h.patch \
166 file://0001-tests-Add-dependency-on-screenshooter-client-protoco.patch \
167 "
168SRCBRANCH = "weston-imx-10.0.1"
169SRCREV = "3f8f336b5d2cf7ea7aa4e047d669d093fc46dfe6"
170
171S = "${WORKDIR}/git"
172
173# Disable OpenGL for parts with GPU support for 2D but not 3D
174REQUIRED_DISTRO_FEATURES = "opengl"
175REQUIRED_DISTRO_FEATURES:imxgpu2d = ""
176REQUIRED_DISTRO_FEATURES:imxgpu3d = "opengl"
177PACKAGECONFIG_OPENGL = "opengl"
178PACKAGECONFIG_OPENGL:imxgpu2d = ""
179PACKAGECONFIG_OPENGL:imxgpu3d = "opengl"
180
181PACKAGECONFIG:remove = "wayland x11"
182PACKAGECONFIG:append = " ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL}', d)}"
183
184PACKAGECONFIG:remove:imxfbdev = "kms"
185PACKAGECONFIG:append:imxfbdev = " fbdev clients"
186PACKAGECONFIG:append:imxgpu = " imxgpu"
187PACKAGECONFIG:append:imxgpu2d = " imxg2d"
188
189SIMPLECLIENTS:imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l"
190
191# Override
192PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor"
193# Weston with i.MX GPU support
194PACKAGECONFIG[imxgpu] = "-Dimxgpu=true,-Dimxgpu=false,virtual/egl"
195# Weston with i.MX G2D renderer
196PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d"
197# Weston with OpenGL support
198PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false"
199
200PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev"
201EXTRA_OEMESON:append:imxfbdev = " -Dbackend-default=fbdev"
202
203EXTRA_OEMESON += "-Ddeprecated-wl-shell=true"
204
205# links with imx-gpu libs which are pre-built for glibc
206# gcompat will address it during runtime
207LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined"
208
209PACKAGE_ARCH = "${MACHINE_SOCARCH}"
210COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)"
211
212########### End of i.MX overrides #########