summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/wayland/weston_12.0.3.imx.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics/wayland/weston_12.0.3.imx.bb')
-rw-r--r--recipes-graphics/wayland/weston_12.0.3.imx.bb194
1 files changed, 194 insertions, 0 deletions
diff --git a/recipes-graphics/wayland/weston_12.0.3.imx.bb b/recipes-graphics/wayland/weston_12.0.3.imx.bb
new file mode 100644
index 00000000..8114ddbb
--- /dev/null
+++ b/recipes-graphics/wayland/weston_12.0.3.imx.bb
@@ -0,0 +1,194 @@
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: 92a460b55e7290ec0006365219189761f7226f7c
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://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] = "eb686a7cf00992a23b17f192fca9a887313e92c346ee35d8575196983d656b4a"
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 launcher-libseat \
48 image-jpeg \
49 screenshare \
50 shell-desktop \
51 shell-fullscreen \
52 shell-ivi \
53 shell-kiosk \
54 "
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 libxcursor"
68# Headless Weston
69PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false"
70# Weston on RDP
71PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp"
72# VA-API desktop recorder
73PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva"
74# Weston with EGL support
75PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl"
76# Weston with lcms support
77PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms"
78# Weston with webp support
79PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
80# Weston with systemd support
81PACKAGECONFIG[systemd] = "-Dsystemd=true,-Dsystemd=false,systemd dbus"
82# Weston with Xwayland support (requires X11 and Wayland)
83PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcb libxcursor xcb-util-cursor xwayland"
84# colord CMS support
85PACKAGECONFIG[colord] = "-Ddeprecated-color-management-colord=true,-Ddeprecated-color-management-colord=false,colord"
86# Clients support
87PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
88# Virtual remote output with GStreamer on DRM backend
89PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base"
90# Weston with screen-share support
91PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false"
92# Traditional desktop shell
93PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false"
94# Fullscreen shell
95PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false"
96# In-Vehicle Infotainment (IVI) shell
97PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false"
98# Kiosk shell
99PACKAGECONFIG[shell-kiosk] = "-Dshell-kiosk=true,-Dshell-kiosk=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# deprecated and superseded by libseat launcher
105PACKAGECONFIG[launcher-logind] = "-Ddeprecated-launcher-logind=true,-Ddeprecated-launcher-logind=false,"
106# screencasting via PipeWire
107PACKAGECONFIG[pipewire] = "-Dbackend-pipewire=true,-Dbackend-pipewire=false,pipewire"
108# VNC remote screensharing
109PACKAGECONFIG[vnc] = "-Dbackend-vnc=true,-Dbackend-vnc=false,neatvnc"
110
111
112do_install:append() {
113 # Weston doesn't need the .la files to load modules, so wipe them
114 rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la
115
116 # If X11, ship a desktop file to launch it
117 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
118 install -d ${D}${datadir}/applications
119 install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
120
121 install -d ${D}${datadir}/icons/hicolor/48x48/apps
122 install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
123 fi
124
125 if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
126 install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
127 fi
128
129 if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then
130 install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify
131 fi
132
133 if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
134 chmod u+s ${D}${bindir}/weston-launch
135 fi
136}
137
138PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
139 libweston-${WESTON_MAJOR_VERSION} ${PN}-examples"
140
141FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so"
142FILES:${PN} = "${sysconfdir} ${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}"
143
144FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so"
145SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'."
146
147FILES:${PN}-examples = "${bindir}/*"
148
149FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
150RDEPENDS:${PN}-xwayland += "xwayland"
151
152RDEPENDS:${PN} += "xkeyboard-config"
153RRECOMMENDS:${PN} = "weston-init liberation-fonts"
154RRECOMMENDS:${PN}-dev += "wayland-protocols"
155
156USERADD_PACKAGES = "${PN}"
157GROUPADD_PARAM:${PN} = "--system weston-launch"
158
159########### End of OE-core copy ###########
160
161########### i.MX overrides ################
162
163SUMMARY = "Weston, a Wayland compositor, i.MX fork"
164LIC_FILES_CHKSUM:remove = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70"
165LIC_FILES_CHKSUM += "file://LICENSE;md5=d79ee9e66bb0f95d3386a7acae780b70"
166
167DEFAULT_PREFERENCE = "-1"
168
169SRC_URI:remove = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz"
170SRC_URI:prepend = "git://github.com/nxp-imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} "
171SRC_URI += "file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch"
172SRCBRANCH = "weston-imx-12.0.3"
173SRCREV = "b0d890915ee191ceb10e79ea9a830281f5c6258f"
174S = "${WORKDIR}/git"
175
176PACKAGECONFIG_IMX_REMOVALS ?= "wayland x11"
177PACKAGECONFIG:remove = "${PACKAGECONFIG_IMX_REMOVALS}"
178
179PACKAGECONFIG:append = " ${PACKAGECONFIG_G2D}"
180PACKAGECONFIG_G2D ??= ""
181PACKAGECONFIG_G2D:imxgpu2d ??= "imxg2d"
182PACKAGECONFIG_G2D:mx93-nxp-bsp ??= "imxg2d"
183
184# Weston with i.MX G2D renderer
185PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d"
186
187# links with imx-gpu libs which are pre-built for glibc
188# gcompat will address it during runtime
189LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined"
190
191PACKAGE_ARCH = "${MACHINE_SOCARCH}"
192COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
193
194########### End of i.MX overrides #########