summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/wayland/weston_10.0.0.imx.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics/wayland/weston_10.0.0.imx.bb')
-rw-r--r--recipes-graphics/wayland/weston_10.0.0.imx.bb206
1 files changed, 206 insertions, 0 deletions
diff --git a/recipes-graphics/wayland/weston_10.0.0.imx.bb b/recipes-graphics/wayland/weston_10.0.0.imx.bb
new file mode 100644
index 00000000..8fce4472
--- /dev/null
+++ b/recipes-graphics/wayland/weston_10.0.0.imx.bb
@@ -0,0 +1,206 @@
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"
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 ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'sysvinit', 'launcher-libseat', '', d)} \
49 image-jpeg \
50 screenshare \
51 shell-desktop \
52 shell-fullscreen \
53 shell-ivi"
54
55# Can be 'damage', 'im', 'egl', 'shm', 'touch', 'dmabuf-feedback', 'dmabuf-v4l', 'dmabuf-egl' or 'all'
56SIMPLECLIENTS ?= "all"
57
58#
59# Compositor choices
60#
61# Weston on KMS
62PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev"
63# Weston on Wayland (nested Weston)
64PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2"
65# Weston on X11
66PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo"
67# Headless Weston
68PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false"
69# Weston on framebuffer
70PACKAGECONFIG[fbdev] = "-Ddeprecated-backend-fbdev=true,-Ddeprecated-backend-fbdev=false,udev mtdev"
71# Weston on RDP
72PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp"
73# weston-launch
74PACKAGECONFIG[launch] = "-Ddeprecated-weston-launch=true,-Ddeprecated-weston-launch=false,drm"
75# VA-API desktop recorder
76PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva"
77# Weston with EGL support
78PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl"
79# Weston with lcms support
80PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms"
81# Weston with webp support
82PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
83# Weston with systemd-login support
84PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus"
85# Weston with Xwayland support (requires X11 and Wayland)
86PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false"
87# colord CMS support
88PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord"
89# Clients support
90PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
91# Virtual remote output with GStreamer on DRM backend
92PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base"
93# Weston with screen-share support
94PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false"
95# Traditional desktop shell
96PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false"
97# Fullscreen shell
98PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false"
99# In-Vehicle Infotainment (IVI) shell
100PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false"
101# JPEG image loading support
102PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg"
103# support libseat based launch
104PACKAGECONFIG[launcher-libseat] = "-Dlauncher-libseat=true,-Dlauncher-libseat=false,seatd"
105
106do_install:append() {
107 # Weston doesn't need the .la files to load modules, so wipe them
108 rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la
109
110 # If X11, ship a desktop file to launch it
111 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
112 install -d ${D}${datadir}/applications
113 install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
114
115 install -d ${D}${datadir}/icons/hicolor/48x48/apps
116 install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
117 fi
118
119 if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
120 install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
121 fi
122
123 if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then
124 install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify
125 fi
126
127 if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
128 chmod u+s ${D}${bindir}/weston-launch
129 fi
130}
131
132PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
133 libweston-${WESTON_MAJOR_VERSION} ${PN}-examples"
134
135FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so"
136FILES:${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}"
137
138FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so"
139SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'."
140
141FILES:${PN}-examples = "${bindir}/*"
142
143FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
144RDEPENDS:${PN}-xwayland += "xwayland"
145
146RDEPENDS:${PN} += "xkeyboard-config"
147RRECOMMENDS:${PN} = "weston-init liberation-fonts"
148RRECOMMENDS:${PN}-dev += "wayland-protocols"
149
150USERADD_PACKAGES = "${PN}"
151GROUPADD_PARAM:${PN} = "--system weston-launch"
152
153########### End of OE-core copy ###########
154
155########### i.MX overrides ################
156
157SUMMARY = "Weston, a Wayland compositor, i.MX fork"
158
159DEFAULT_PREFERENCE = "-1"
160
161SRC_URI:remove = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
162SRC_URI:prepend = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} "
163SRC_URI += "file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch"
164SRCBRANCH = "weston-imx-10.0"
165SRCREV = "c8c6e3106b03441db1037afa995f95fcb2f9f17d"
166
167S = "${WORKDIR}/git"
168
169# Disable OpenGL for parts with GPU support for 2D but not 3D
170REQUIRED_DISTRO_FEATURES = "opengl"
171REQUIRED_DISTRO_FEATURES:imxgpu2d = ""
172REQUIRED_DISTRO_FEATURES:imxgpu3d = "opengl"
173PACKAGECONFIG_OPENGL = "opengl"
174PACKAGECONFIG_OPENGL:imxgpu2d = ""
175PACKAGECONFIG_OPENGL:imxgpu3d = "opengl"
176
177PACKAGECONFIG:remove = "wayland x11"
178PACKAGECONFIG:append = " \
179 rdp \
180 ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL}', d)}"
181
182PACKAGECONFIG:remove:imxfbdev = "kms"
183PACKAGECONFIG:append:imxfbdev = " fbdev clients"
184PACKAGECONFIG:append:imxgpu = " imxgpu"
185PACKAGECONFIG:append:imxgpu2d = " imxg2d"
186
187SIMPLECLIENTS:imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l"
188
189# Override
190PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor"
191# Weston with i.MX GPU support
192PACKAGECONFIG[imxgpu] = "-Dimxgpu=true,-Dimxgpu=false,virtual/egl"
193# Weston with i.MX G2D renderer
194PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d"
195# Weston with OpenGL support
196PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false"
197
198PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev"
199EXTRA_OEMESON:append:imxfbdev = " -Dbackend-default=fbdev"
200
201EXTRA_OEMESON += "-Ddeprecated-wl-shell=true"
202
203PACKAGE_ARCH = "${MACHINE_SOCARCH}"
204COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)"
205
206########### End of i.MX overrides #########