diff options
Diffstat (limited to 'recipes-graphics/wayland/weston_10.0.0.imx.bb')
-rw-r--r-- | recipes-graphics/wayland/weston_10.0.0.imx.bb | 206 |
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 | |||
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 | |||
38 | LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}" | ||
39 | |||
40 | WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" | ||
41 | |||
42 | EXTRA_OEMESON += "-Dpipewire=false" | ||
43 | |||
44 | PACKAGECONFIG ??= "${@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' | ||
56 | SIMPLECLIENTS ?= "all" | ||
57 | |||
58 | # | ||
59 | # Compositor choices | ||
60 | # | ||
61 | # Weston on KMS | ||
62 | PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" | ||
63 | # Weston on Wayland (nested Weston) | ||
64 | PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" | ||
65 | # Weston on X11 | ||
66 | PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo" | ||
67 | # Headless Weston | ||
68 | PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" | ||
69 | # Weston on framebuffer | ||
70 | PACKAGECONFIG[fbdev] = "-Ddeprecated-backend-fbdev=true,-Ddeprecated-backend-fbdev=false,udev mtdev" | ||
71 | # Weston on RDP | ||
72 | PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp" | ||
73 | # weston-launch | ||
74 | PACKAGECONFIG[launch] = "-Ddeprecated-weston-launch=true,-Ddeprecated-weston-launch=false,drm" | ||
75 | # VA-API desktop recorder | ||
76 | PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" | ||
77 | # Weston with EGL support | ||
78 | PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" | ||
79 | # Weston with lcms support | ||
80 | PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" | ||
81 | # Weston with webp support | ||
82 | PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" | ||
83 | # Weston with systemd-login support | ||
84 | PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" | ||
85 | # Weston with Xwayland support (requires X11 and Wayland) | ||
86 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" | ||
87 | # colord CMS support | ||
88 | PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" | ||
89 | # Clients support | ||
90 | PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" | ||
91 | # Virtual remote output with GStreamer on DRM backend | ||
92 | PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" | ||
93 | # Weston with screen-share support | ||
94 | PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" | ||
95 | # Traditional desktop shell | ||
96 | PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false" | ||
97 | # Fullscreen shell | ||
98 | PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false" | ||
99 | # In-Vehicle Infotainment (IVI) shell | ||
100 | PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" | ||
101 | # JPEG image loading support | ||
102 | PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" | ||
103 | # support libseat based launch | ||
104 | PACKAGECONFIG[launcher-libseat] = "-Dlauncher-libseat=true,-Dlauncher-libseat=false,seatd" | ||
105 | |||
106 | do_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 | |||
132 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ | ||
133 | libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" | ||
134 | |||
135 | FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" | ||
136 | FILES:${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" | ||
137 | |||
138 | FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" | ||
139 | SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." | ||
140 | |||
141 | FILES:${PN}-examples = "${bindir}/*" | ||
142 | |||
143 | FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" | ||
144 | RDEPENDS:${PN}-xwayland += "xwayland" | ||
145 | |||
146 | RDEPENDS:${PN} += "xkeyboard-config" | ||
147 | RRECOMMENDS:${PN} = "weston-init liberation-fonts" | ||
148 | RRECOMMENDS:${PN}-dev += "wayland-protocols" | ||
149 | |||
150 | USERADD_PACKAGES = "${PN}" | ||
151 | GROUPADD_PARAM:${PN} = "--system weston-launch" | ||
152 | |||
153 | ########### End of OE-core copy ########### | ||
154 | |||
155 | ########### i.MX overrides ################ | ||
156 | |||
157 | SUMMARY = "Weston, a Wayland compositor, i.MX fork" | ||
158 | |||
159 | DEFAULT_PREFERENCE = "-1" | ||
160 | |||
161 | SRC_URI:remove = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz" | ||
162 | SRC_URI:prepend = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} " | ||
163 | SRC_URI += "file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch" | ||
164 | SRCBRANCH = "weston-imx-10.0" | ||
165 | SRCREV = "c8c6e3106b03441db1037afa995f95fcb2f9f17d" | ||
166 | |||
167 | S = "${WORKDIR}/git" | ||
168 | |||
169 | # Disable OpenGL for parts with GPU support for 2D but not 3D | ||
170 | REQUIRED_DISTRO_FEATURES = "opengl" | ||
171 | REQUIRED_DISTRO_FEATURES:imxgpu2d = "" | ||
172 | REQUIRED_DISTRO_FEATURES:imxgpu3d = "opengl" | ||
173 | PACKAGECONFIG_OPENGL = "opengl" | ||
174 | PACKAGECONFIG_OPENGL:imxgpu2d = "" | ||
175 | PACKAGECONFIG_OPENGL:imxgpu3d = "opengl" | ||
176 | |||
177 | PACKAGECONFIG:remove = "wayland x11" | ||
178 | PACKAGECONFIG:append = " \ | ||
179 | rdp \ | ||
180 | ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL}', d)}" | ||
181 | |||
182 | PACKAGECONFIG:remove:imxfbdev = "kms" | ||
183 | PACKAGECONFIG:append:imxfbdev = " fbdev clients" | ||
184 | PACKAGECONFIG:append:imxgpu = " imxgpu" | ||
185 | PACKAGECONFIG:append:imxgpu2d = " imxg2d" | ||
186 | |||
187 | SIMPLECLIENTS:imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l" | ||
188 | |||
189 | # Override | ||
190 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor" | ||
191 | # Weston with i.MX GPU support | ||
192 | PACKAGECONFIG[imxgpu] = "-Dimxgpu=true,-Dimxgpu=false,virtual/egl" | ||
193 | # Weston with i.MX G2D renderer | ||
194 | PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d" | ||
195 | # Weston with OpenGL support | ||
196 | PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false" | ||
197 | |||
198 | PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" | ||
199 | EXTRA_OEMESON:append:imxfbdev = " -Dbackend-default=fbdev" | ||
200 | |||
201 | EXTRA_OEMESON += "-Ddeprecated-wl-shell=true" | ||
202 | |||
203 | PACKAGE_ARCH = "${MACHINE_SOCARCH}" | ||
204 | COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" | ||
205 | |||
206 | ########### End of i.MX overrides ######### | ||