blob: ce59e601d27b0054f027118110eadf7ee07a6125 [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001SUMMARY = "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
Andrew Geissler615f2f12022-07-15 14:00:58 -050015SRC_URI = "https://gitlab.freedesktop.org/wayland/wayland/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz \
Andrew Geissler595f6302022-01-24 19:11:47 +000016 file://run-ptest \
Andrew Geissler595f6302022-01-24 19:11:47 +000017 file://0001-build-Fix-strndup-detection-on-MinGW.patch \
18 "
Andrew Geissler615f2f12022-07-15 14:00:58 -050019SRC_URI[sha256sum] = "6dc64d7fc16837a693a51cfdb2e568db538bfdc9f457d4656285bb9594ef11ac"
Andrew Geissler595f6302022-01-24 19:11:47 +000020
21UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
Andrew Geissler78b72792022-06-14 06:47:25 -050022UPSTREAM_CHECK_REGEX = "wayland-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)"
Andrew Geissler595f6302022-01-24 19:11:47 +000023
24inherit meson pkgconfig ptest
25
26PACKAGECONFIG ??= "dtd-validation"
27PACKAGECONFIG[dtd-validation] = "-Ddtd_validation=true,-Ddtd_validation=false,libxml2,,"
28
29EXTRA_OEMESON = "-Ddocumentation=false"
Andrew Geissler9aee5002022-03-30 16:27:02 +000030EXTRA_OEMESON:class-native = "-Ddocumentation=false"
Andrew Geissler595f6302022-01-24 19:11:47 +000031
32# Wayland installs a M4 macro for other projects to use, which uses the target
33# pkg-config to find files. Replace pkg-config with pkg-config-native.
34do_install:append:class-native() {
35 sed -e 's,PKG_CHECK_MODULES(.*),,g' \
36 -e 's,$PKG_CONFIG,pkg-config-native,g' \
37 -i ${D}/${datadir}/aclocal/wayland-scanner.m4
38}
39
40do_install_ptest() {
41 mkdir -p ${D}${PTEST_PATH}/tests/data
42 cp -rf ${B}/tests/*-test ${B}/tests/*-checker ${D}${PTEST_PATH}/tests
43 cp -rf ${B}/tests/*-checker ${D}${PTEST_PATH}
44 cp -rf ${S}/tests/scanner-test.sh ${D}${PTEST_PATH}/tests
45 cp -rf ${S}/tests/data/* ${D}${PTEST_PATH}/tests/data/
46 cp -rf ${S}/egl/wayland-egl-symbols-check ${D}${PTEST_PATH}/tests/
47}
48
49sysroot_stage_all:append:class-target () {
50 rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4
51 cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/
52}
53
54PACKAGES =+ "${PN}-tools"
55
56FILES:${PN}-tools = "${bindir}/wayland-scanner"
57FILES:${PN}-dev += "${datadir}/${BPN}/wayland-scanner.mk"
58
59BBCLASSEXTEND = "native nativesdk"
60
61RDEPENDS:${PN}-ptest += "binutils sed ${PN}-tools"