diff options
Diffstat (limited to 'recipes-graphics/wayland/weston_11.0.3.imx.bb')
-rw-r--r-- | recipes-graphics/wayland/weston_11.0.3.imx.bb | 188 |
1 files changed, 188 insertions, 0 deletions
diff --git a/recipes-graphics/wayland/weston_11.0.3.imx.bb b/recipes-graphics/wayland/weston_11.0.3.imx.bb new file mode 100644 index 00000000..67eae268 --- /dev/null +++ b/recipes-graphics/wayland/weston_11.0.3.imx.bb | |||
@@ -0,0 +1,188 @@ | |||
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: 7f1932cb5a408320a5b542e20ba2807718349e8f | ||
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/uploads/f5648c818fba5432edc3ea63c4db4813/${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] = "a413f68c252957fc3191c3650823ec356ae8c124ccc0cb440da5cdc4e2cb9e57" | ||
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 | ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'sysvinit', 'launcher-libseat', '', d)} \ | ||
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 libxcb libxcursor cairo" | ||
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-login support | ||
81 | PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" | ||
82 | # Weston with Xwayland support (requires X11 and Wayland) | ||
83 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,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 | |||
105 | do_install:append() { | ||
106 | # Weston doesn't need the .la files to load modules, so wipe them | ||
107 | rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la | ||
108 | |||
109 | # If X11, ship a desktop file to launch it | ||
110 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then | ||
111 | install -d ${D}${datadir}/applications | ||
112 | install ${WORKDIR}/weston.desktop ${D}${datadir}/applications | ||
113 | |||
114 | install -d ${D}${datadir}/icons/hicolor/48x48/apps | ||
115 | install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps | ||
116 | fi | ||
117 | |||
118 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then | ||
119 | install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland | ||
120 | fi | ||
121 | |||
122 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then | ||
123 | install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify | ||
124 | fi | ||
125 | |||
126 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then | ||
127 | chmod u+s ${D}${bindir}/weston-launch | ||
128 | fi | ||
129 | } | ||
130 | |||
131 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ | ||
132 | libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" | ||
133 | |||
134 | FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" | ||
135 | FILES:${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" | ||
136 | |||
137 | FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" | ||
138 | SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." | ||
139 | |||
140 | FILES:${PN}-examples = "${bindir}/*" | ||
141 | |||
142 | FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" | ||
143 | RDEPENDS:${PN}-xwayland += "xwayland" | ||
144 | |||
145 | RDEPENDS:${PN} += "xkeyboard-config" | ||
146 | RRECOMMENDS:${PN} = "weston-init liberation-fonts" | ||
147 | RRECOMMENDS:${PN}-dev += "wayland-protocols" | ||
148 | |||
149 | USERADD_PACKAGES = "${PN}" | ||
150 | GROUPADD_PARAM:${PN} = "--system weston-launch" | ||
151 | |||
152 | ########### End of OE-core copy ########### | ||
153 | |||
154 | ########### i.MX overrides ################ | ||
155 | |||
156 | SUMMARY = "Weston, a Wayland compositor, i.MX fork" | ||
157 | LIC_FILES_CHKSUM:remove = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70" | ||
158 | LIC_FILES_CHKSUM += "file://LICENSE;md5=d79ee9e66bb0f95d3386a7acae780b70" | ||
159 | |||
160 | DEFAULT_PREFERENCE = "-1" | ||
161 | |||
162 | SRC_URI:remove = "https://gitlab.freedesktop.org/wayland/weston/uploads/f5648c818fba5432edc3ea63c4db4813/${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 | SRCBRANCH = "weston-imx-11.0.3" | ||
166 | SRCREV = "a509c319b7bfc72638c9b9d8f5e4b6259aba0ab7" | ||
167 | S = "${WORKDIR}/git" | ||
168 | |||
169 | PACKAGECONFIG_IMX_REMOVALS ?= "wayland x11" | ||
170 | PACKAGECONFIG:remove = "${PACKAGECONFIG_IMX_REMOVALS}" | ||
171 | |||
172 | PACKAGECONFIG:append:imxgpu2d = " imxg2d" | ||
173 | PACKAGECONFIG:append:mx93-nxp-bsp = " imxg2d" | ||
174 | |||
175 | # Override | ||
176 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor xwayland" | ||
177 | |||
178 | # Weston with i.MX G2D renderer | ||
179 | PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d" | ||
180 | |||
181 | # links with imx-gpu libs which are pre-built for glibc | ||
182 | # gcompat will address it during runtime | ||
183 | LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined" | ||
184 | |||
185 | PACKAGE_ARCH = "${MACHINE_SOCARCH}" | ||
186 | COMPATIBLE_MACHINE = "(imx-nxp-bsp)" | ||
187 | |||
188 | ########### End of i.MX overrides ######### | ||