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