summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/wayland/weston_9.0.0.imx.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics/wayland/weston_9.0.0.imx.bb')
-rw-r--r--recipes-graphics/wayland/weston_9.0.0.imx.bb192
1 files changed, 192 insertions, 0 deletions
diff --git a/recipes-graphics/wayland/weston_9.0.0.imx.bb b/recipes-graphics/wayland/weston_9.0.0.imx.bb
new file mode 100644
index 00000000..825a1b1c
--- /dev/null
+++ b/recipes-graphics/wayland/weston_9.0.0.imx.bb
@@ -0,0 +1,192 @@
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: 0a882490fe75915c7a119f3498df6750be25f8e0
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=6c53bbbd99273f4f7c4affa855c33c0a"
14
15SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
16 file://weston.png \
17 file://weston.desktop \
18 file://xwayland.weston-start \
19 file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
20 file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \
21"
22
23SRC_URI_append_libc-musl = " file://dont-use-plane-add-prop.patch "
24
25SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe"
26
27UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
28
29inherit meson pkgconfig useradd features_check
30# depends on virtual/egl
31# weston-init requires pam enabled if started via systemd
32REQUIRED_DISTRO_FEATURES = "opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}"
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 += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false"
42
43PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \
44 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
45 ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \
46 ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \
47 launch \
48 image-jpeg \
49 screenshare \
50 shell-desktop \
51 shell-fullscreen \
52 shell-ivi"
53
54#
55# Compositor choices
56#
57# Weston on KMS
58PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev"
59# Weston on Wayland (nested Weston)
60PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2"
61# Weston on X11
62PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo"
63# Headless Weston
64PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false"
65# Weston on framebuffer
66PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev"
67# weston-launch
68PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm"
69# VA-API desktop recorder
70PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva"
71# Weston with EGL support
72PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl"
73# Weston with lcms support
74PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms"
75# Weston with webp support
76PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
77# Weston with systemd-login support
78PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus"
79# Weston with Xwayland support (requires X11 and Wayland)
80PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false"
81# colord CMS support
82PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord"
83# Clients support
84PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
85# Virtual remote output with GStreamer on DRM backend
86PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0"
87# Weston with PAM support
88PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam"
89# Weston with screen-share support
90PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false"
91# Traditional desktop shell
92PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false"
93# Fullscreen shell
94PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false"
95# In-Vehicle Infotainment (IVI) shell
96PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false"
97# JPEG image loading support
98PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg"
99
100do_install_append() {
101 # Weston doesn't need the .la files to load modules, so wipe them
102 rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la
103
104 # If X11, ship a desktop file to launch it
105 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
106 install -d ${D}${datadir}/applications
107 install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
108
109 install -d ${D}${datadir}/icons/hicolor/48x48/apps
110 install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
111 fi
112
113 if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
114 install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
115 fi
116
117 if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
118 chmod u+s ${D}${bindir}/weston-launch
119 fi
120}
121
122PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
123 libweston-${WESTON_MAJOR_VERSION} ${PN}-examples"
124
125FILES_${PN}-dev += "${libdir}/${BPN}/libexec_weston.so"
126FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}"
127
128FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so"
129SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'."
130
131FILES_${PN}-examples = "${bindir}/*"
132
133FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
134RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
135
136RDEPENDS_${PN} += "xkeyboard-config"
137RRECOMMENDS_${PN} = "weston-init liberation-fonts"
138RRECOMMENDS_${PN}-dev += "wayland-protocols"
139
140USERADD_PACKAGES = "${PN}"
141GROUPADD_PARAM_${PN} = "--system weston-launch"
142
143########### End of OE-core copy ###########
144
145########### i.MX overrides ################
146
147SUMMARY = "Weston, a Wayland compositor, i.MX fork"
148
149DEFAULT_PREFERENCE = "-1"
150
151SRCBRANCH = "weston-imx-9.0"
152SRC_URI = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} \
153 file://weston.png \
154 file://weston.desktop \
155 file://xwayland.weston-start \
156 file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
157"
158SRCREV = "a1823f20a1d6e24d2f56e98c5576eda34a94f567"
159S = "${WORKDIR}/git"
160
161# Disable OpenGL for parts with GPU support for 2D but not 3D
162REQUIRED_DISTRO_FEATURES = "opengl"
163REQUIRED_DISTRO_FEATURES_imxgpu2d = ""
164REQUIRED_DISTRO_FEATURES_imxgpu3d = "opengl"
165PACKAGECONFIG_OPENGL = "opengl"
166PACKAGECONFIG_OPENGL_imxgpu2d = ""
167PACKAGECONFIG_OPENGL_imxgpu3d = "opengl"
168
169PACKAGECONFIG_remove = "wayland x11"
170PACKAGECONFIG_append = " ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL}', d)}"
171
172PACKAGECONFIG_remove_imxfbdev = "kms"
173PACKAGECONFIG_append_imxfbdev = " fbdev clients"
174PACKAGECONFIG_append_imxgpu = " imxgpu"
175PACKAGECONFIG_append_imxgpu2d = " imxg2d"
176
177# Clients support
178SIMPLE_CLIENTS = "all"
179SIMPLE_CLIENTS_imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l"
180PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor"
181PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLE_CLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
182# Weston with i.MX GPU support
183PACKAGECONFIG[imxgpu] = "-Dimxgpu=true,-Dimxgpu=false,virtual/egl"
184# Weston with i.MX G2D renderer
185PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d"
186# Weston with OpenGL support
187PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false"
188
189PACKAGE_ARCH = "${MACHINE_SOCARCH}"
190COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)"
191
192########### End of i.MX overrides #########