summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/wayland/weston_14.0.1.imx.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics/wayland/weston_14.0.1.imx.bb')
-rw-r--r--recipes-graphics/wayland/weston_14.0.1.imx.bb196
1 files changed, 196 insertions, 0 deletions
diff --git a/recipes-graphics/wayland/weston_14.0.1.imx.bb b/recipes-graphics/wayland/weston_14.0.1.imx.bb
new file mode 100644
index 000000000..96bde0fe0
--- /dev/null
+++ b/recipes-graphics/wayland/weston_14.0.1.imx.bb
@@ -0,0 +1,196 @@
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: 23271a1f908a223b4eb56d6034cbb1ac23da14fe
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://0001-libweston-tools-Include-libgen.h-for-basename-signat.patch \
18 file://weston.png \
19 file://weston.desktop \
20 file://xwayland.weston-start \
21 file://systemd-notify.weston-start \
22 "
23
24SRC_URI[sha256sum] = "27f68d96e3b97d98daadef13a202356524924fa381418fa6716b9136ef099093"
25
26UPSTREAM_CHECK_URI = "https://gitlab.freedesktop.org/wayland/weston/-/tags"
27UPSTREAM_CHECK_REGEX = "releases/(?P<pver>\d+\.\d+\.(?!9\d+)\d+)"
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"
37
38LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}"
39
40WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
41
42EXTRA_OEMESON += "-Dpipewire=false"
43
44PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms wayland egl clients', '', d)} \
45 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
46 ${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \
47 ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \
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 seatd 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,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# screencasting via PipeWire
103PACKAGECONFIG[pipewire] = "-Dbackend-pipewire=true,-Dbackend-pipewire=false,pipewire"
104# VNC remote screensharing
105PACKAGECONFIG[vnc] = "-Dbackend-vnc=true,-Dbackend-vnc=false,neatvnc"
106
107
108do_install:append() {
109 # Weston doesn't need the .la files to load modules, so wipe them
110 rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la
111
112 # If X11, ship a desktop file to launch it
113 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
114 install -d ${D}${datadir}/applications
115 install ${UNPACKDIR}/weston.desktop ${D}${datadir}/applications
116
117 install -d ${D}${datadir}/icons/hicolor/48x48/apps
118 install ${UNPACKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
119 fi
120
121 if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
122 install -Dm 644 ${UNPACKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
123 fi
124
125 if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then
126 install -Dm 644 ${UNPACKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify
127 fi
128
129 if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
130 chmod u+s ${D}${bindir}/weston-launch
131 fi
132}
133
134PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
135 libweston-${WESTON_MAJOR_VERSION} ${PN}-examples"
136
137FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so"
138FILES:${PN} = "${sysconfdir} ${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}"
139
140FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so"
141SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'."
142
143FILES:${PN}-examples = "${bindir}/*"
144
145FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
146RDEPENDS:${PN}-xwayland += "xwayland"
147
148RDEPENDS:${PN} += "xkeyboard-config"
149RRECOMMENDS:${PN} = "weston-init liberation-fonts"
150RRECOMMENDS:${PN}-dev += "wayland-protocols"
151
152USERADD_PACKAGES = "${PN}"
153GROUPADD_PARAM:${PN} = "--system weston-launch"
154
155########### End of OE-core copy ###########
156
157########### i.MX overrides ################
158
159SUMMARY = "Weston, a Wayland compositor, i.MX fork"
160LIC_FILES_CHKSUM:remove = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70"
161LIC_FILES_CHKSUM += "file://LICENSE;md5=d79ee9e66bb0f95d3386a7acae780b70"
162
163DEFAULT_PREFERENCE = "-1"
164
165DEPENDS:append = " libdisplay-info"
166
167SRC_URI:remove = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz"
168SRC_URI:prepend = "${WESTON_SRC};branch=${SRCBRANCH} "
169WESTON_SRC ?= "git://github.com/nxp-imx/weston-imx.git;protocol=https"
170SRCBRANCH = "weston-imx-14.0.1"
171SRCREV = "0fd5d3ab75346e525b565039a7b8bf5d9008be78"
172
173SRC_URI:remove = "file://0001-libweston-tools-Include-libgen.h-for-basename-signat.patch"
174
175PACKAGECONFIG_IMX_REMOVALS ?= "wayland x11"
176PACKAGECONFIG:remove = "${PACKAGECONFIG_IMX_REMOVALS}"
177
178PACKAGECONFIG:append = " ${PACKAGECONFIG_G2D}"
179PACKAGECONFIG_G2D ??= ""
180PACKAGECONFIG_G2D:imxgpu2d ??= "imxg2d"
181PACKAGECONFIG_G2D:mx93-nxp-bsp ??= "imxg2d"
182
183# Remove no longer supported colord
184PACKAGECONFIG[colord] = ""
185
186# Weston with i.MX G2D renderer
187PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d"
188
189# links with imx-gpu libs which are pre-built for glibc
190# gcompat will address it during runtime
191LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined"
192
193PACKAGE_ARCH = "${MACHINE_SOCARCH}"
194COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
195
196########### End of i.MX overrides #########