xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-graphics/wayland/wayland_1.20.0.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1SUMMARY = "Wayland, a protocol between a compositor and clients"
2DESCRIPTION = "Wayland is a protocol for a compositor to talk to its clients \
3as well as a C library implementation of that protocol. The compositor can be \
4a standalone display server running on Linux kernel modesetting and evdev \
5input devices, an X application, or a wayland client itself. The clients can \
6be traditional applications, X servers (rootless or fullscreen) or other \
7display servers."
8HOMEPAGE = "http://wayland.freedesktop.org"
9LICENSE = "MIT"
10LIC_FILES_CHKSUM = "file://COPYING;md5=b31d8f53b6aaf2b4985d7dd7810a70d1 \
11                    file://src/wayland-server.c;endline=24;md5=b8e046164a766bb1ede8ba38e9dcd7ce"
12
13DEPENDS = "expat libffi wayland-native"
14
15SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
16           file://run-ptest \
17           file://0002-Do-not-hardcode-the-path-to-wayland-scanner.patch \
18           file://0001-build-Fix-strndup-detection-on-MinGW.patch \
19           file://CVE-2021-3782.patch \
20           "
21
22SRC_URI[sha256sum] = "b8a034154c7059772e0fdbd27dbfcda6c732df29cae56a82274f6ec5d7cd8725"
23
24UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
25
26inherit meson pkgconfig ptest
27
28PACKAGECONFIG ??= "dtd-validation"
29PACKAGECONFIG[dtd-validation] = "-Ddtd_validation=true,-Ddtd_validation=false,libxml2,,"
30
31EXTRA_OEMESON = "-Ddocumentation=false"
32EXTRA_OEMESON:class-native = "-Ddocumentation=false"
33
34# Wayland installs a M4 macro for other projects to use, which uses the target
35# pkg-config to find files.  Replace pkg-config with pkg-config-native.
36do_install:append:class-native() {
37  sed -e 's,PKG_CHECK_MODULES(.*),,g' \
38      -e 's,$PKG_CONFIG,pkg-config-native,g' \
39      -i ${D}/${datadir}/aclocal/wayland-scanner.m4
40}
41
42do_install_ptest() {
43    mkdir -p ${D}${PTEST_PATH}/tests/data
44    cp -rf ${B}/tests/*-test ${B}/tests/*-checker ${D}${PTEST_PATH}/tests
45    cp -rf ${B}/tests/*-checker ${D}${PTEST_PATH}
46    cp -rf ${S}/tests/scanner-test.sh ${D}${PTEST_PATH}/tests
47    cp -rf ${S}/tests/data/* ${D}${PTEST_PATH}/tests/data/
48    cp -rf ${S}/egl/wayland-egl-symbols-check ${D}${PTEST_PATH}/tests/
49}
50
51sysroot_stage_all:append:class-target () {
52	rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4
53	cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/
54}
55
56PACKAGES =+ "${PN}-tools"
57
58FILES:${PN}-tools = "${bindir}/wayland-scanner"
59FILES:${PN}-dev += "${datadir}/${BPN}/wayland-scanner.mk"
60
61BBCLASSEXTEND = "native nativesdk"
62
63RDEPENDS:${PN}-ptest += "binutils sed ${PN}-tools"
64