diff options
Diffstat (limited to 'recipes-graphics/wayland/weston_12.0.3.imx.bb')
-rw-r--r-- | recipes-graphics/wayland/weston_12.0.3.imx.bb | 194 |
1 files changed, 194 insertions, 0 deletions
diff --git a/recipes-graphics/wayland/weston_12.0.3.imx.bb b/recipes-graphics/wayland/weston_12.0.3.imx.bb new file mode 100644 index 00000000..8114ddbb --- /dev/null +++ b/recipes-graphics/wayland/weston_12.0.3.imx.bb | |||
@@ -0,0 +1,194 @@ | |||
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: 92a460b55e7290ec0006365219189761f7226f7c | ||
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://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${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[sha256sum] = "eb686a7cf00992a23b17f192fca9a887313e92c346ee35d8575196983d656b4a" | ||
24 | |||
25 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" | ||
26 | UPSTREAM_CHECK_REGEX = "weston-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)" | ||
27 | |||
28 | inherit meson pkgconfig useradd | ||
29 | |||
30 | # depends on virtual/egl | ||
31 | # | ||
32 | require ${THISDIR}/required-distro-features.inc | ||
33 | |||
34 | DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" | ||
35 | DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" | ||
36 | |||
37 | LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}" | ||
38 | |||
39 | WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" | ||
40 | |||
41 | EXTRA_OEMESON += "-Dpipewire=false" | ||
42 | |||
43 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms wayland egl clients', '', d)} \ | ||
44 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ | ||
45 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \ | ||
46 | ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ | ||
47 | launcher-libseat \ | ||
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' | ||
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 libxcursor" | ||
68 | # Headless Weston | ||
69 | PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" | ||
70 | # Weston on RDP | ||
71 | PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp" | ||
72 | # VA-API desktop recorder | ||
73 | PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" | ||
74 | # Weston with EGL support | ||
75 | PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" | ||
76 | # Weston with lcms support | ||
77 | PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" | ||
78 | # Weston with webp support | ||
79 | PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" | ||
80 | # Weston with systemd support | ||
81 | PACKAGECONFIG[systemd] = "-Dsystemd=true,-Dsystemd=false,systemd dbus" | ||
82 | # Weston with Xwayland support (requires X11 and Wayland) | ||
83 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcb libxcursor xcb-util-cursor xwayland" | ||
84 | # colord CMS support | ||
85 | PACKAGECONFIG[colord] = "-Ddeprecated-color-management-colord=true,-Ddeprecated-color-management-colord=false,colord" | ||
86 | # Clients support | ||
87 | PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" | ||
88 | # Virtual remote output with GStreamer on DRM backend | ||
89 | PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" | ||
90 | # Weston with screen-share support | ||
91 | PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" | ||
92 | # Traditional desktop shell | ||
93 | PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false" | ||
94 | # Fullscreen shell | ||
95 | PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false" | ||
96 | # In-Vehicle Infotainment (IVI) shell | ||
97 | PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" | ||
98 | # Kiosk shell | ||
99 | PACKAGECONFIG[shell-kiosk] = "-Dshell-kiosk=true,-Dshell-kiosk=false" | ||
100 | # JPEG image loading support | ||
101 | PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" | ||
102 | # support libseat based launch | ||
103 | PACKAGECONFIG[launcher-libseat] = "-Dlauncher-libseat=true,-Dlauncher-libseat=false,seatd" | ||
104 | # deprecated and superseded by libseat launcher | ||
105 | PACKAGECONFIG[launcher-logind] = "-Ddeprecated-launcher-logind=true,-Ddeprecated-launcher-logind=false," | ||
106 | # screencasting via PipeWire | ||
107 | PACKAGECONFIG[pipewire] = "-Dbackend-pipewire=true,-Dbackend-pipewire=false,pipewire" | ||
108 | # VNC remote screensharing | ||
109 | PACKAGECONFIG[vnc] = "-Dbackend-vnc=true,-Dbackend-vnc=false,neatvnc" | ||
110 | |||
111 | |||
112 | do_install:append() { | ||
113 | # Weston doesn't need the .la files to load modules, so wipe them | ||
114 | rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la | ||
115 | |||
116 | # If X11, ship a desktop file to launch it | ||
117 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then | ||
118 | install -d ${D}${datadir}/applications | ||
119 | install ${WORKDIR}/weston.desktop ${D}${datadir}/applications | ||
120 | |||
121 | install -d ${D}${datadir}/icons/hicolor/48x48/apps | ||
122 | install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps | ||
123 | fi | ||
124 | |||
125 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then | ||
126 | install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland | ||
127 | fi | ||
128 | |||
129 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then | ||
130 | install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify | ||
131 | fi | ||
132 | |||
133 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then | ||
134 | chmod u+s ${D}${bindir}/weston-launch | ||
135 | fi | ||
136 | } | ||
137 | |||
138 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ | ||
139 | libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" | ||
140 | |||
141 | FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" | ||
142 | FILES:${PN} = "${sysconfdir} ${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" | ||
143 | |||
144 | FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" | ||
145 | SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." | ||
146 | |||
147 | FILES:${PN}-examples = "${bindir}/*" | ||
148 | |||
149 | FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" | ||
150 | RDEPENDS:${PN}-xwayland += "xwayland" | ||
151 | |||
152 | RDEPENDS:${PN} += "xkeyboard-config" | ||
153 | RRECOMMENDS:${PN} = "weston-init liberation-fonts" | ||
154 | RRECOMMENDS:${PN}-dev += "wayland-protocols" | ||
155 | |||
156 | USERADD_PACKAGES = "${PN}" | ||
157 | GROUPADD_PARAM:${PN} = "--system weston-launch" | ||
158 | |||
159 | ########### End of OE-core copy ########### | ||
160 | |||
161 | ########### i.MX overrides ################ | ||
162 | |||
163 | SUMMARY = "Weston, a Wayland compositor, i.MX fork" | ||
164 | LIC_FILES_CHKSUM:remove = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70" | ||
165 | LIC_FILES_CHKSUM += "file://LICENSE;md5=d79ee9e66bb0f95d3386a7acae780b70" | ||
166 | |||
167 | DEFAULT_PREFERENCE = "-1" | ||
168 | |||
169 | SRC_URI:remove = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz" | ||
170 | SRC_URI:prepend = "git://github.com/nxp-imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} " | ||
171 | SRC_URI += "file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch" | ||
172 | SRCBRANCH = "weston-imx-12.0.3" | ||
173 | SRCREV = "b0d890915ee191ceb10e79ea9a830281f5c6258f" | ||
174 | S = "${WORKDIR}/git" | ||
175 | |||
176 | PACKAGECONFIG_IMX_REMOVALS ?= "wayland x11" | ||
177 | PACKAGECONFIG:remove = "${PACKAGECONFIG_IMX_REMOVALS}" | ||
178 | |||
179 | PACKAGECONFIG:append = " ${PACKAGECONFIG_G2D}" | ||
180 | PACKAGECONFIG_G2D ??= "" | ||
181 | PACKAGECONFIG_G2D:imxgpu2d ??= "imxg2d" | ||
182 | PACKAGECONFIG_G2D:mx93-nxp-bsp ??= "imxg2d" | ||
183 | |||
184 | # Weston with i.MX G2D renderer | ||
185 | PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d" | ||
186 | |||
187 | # links with imx-gpu libs which are pre-built for glibc | ||
188 | # gcompat will address it during runtime | ||
189 | LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined" | ||
190 | |||
191 | PACKAGE_ARCH = "${MACHINE_SOCARCH}" | ||
192 | COMPATIBLE_MACHINE = "(imx-nxp-bsp)" | ||
193 | |||
194 | ########### End of i.MX overrides ######### | ||