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