blob: d6e468497d2f82039184b704eb8ec33a2e8455d7 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "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-meson.build-find-the-native-wayland-scanner-directly.patch \
18 file://0002-Do-not-hardcode-the-path-to-wayland-scanner.patch \
19 file://0001-build-Fix-strndup-detection-on-MinGW.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050020 "
Andrew Geisslerd1e89492021-02-12 15:35:20 -060021SRC_URI[sha256sum] = "baccd902300d354581cd5ad3cc49daa4921d55fb416a5883e218750fef166d15"
Andrew Geissler82c905d2020-04-13 13:39:40 -050022
23UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
24
25inherit meson pkgconfig ptest
26
27PACKAGECONFIG ??= "dtd-validation"
28PACKAGECONFIG[dtd-validation] = "-Ddtd_validation=true,-Ddtd_validation=false,libxml2,,"
29
30EXTRA_OEMESON = "-Ddocumentation=false"
Patrick Williams213cb262021-08-07 19:21:33 -050031EXTRA_OEMESON:class-native = "-Ddocumentation=false -Dlibraries=false"
Andrew Geissler82c905d2020-04-13 13:39:40 -050032
33# Wayland installs a M4 macro for other projects to use, which uses the target
34# pkg-config to find files. Replace pkg-config with pkg-config-native.
Patrick Williams213cb262021-08-07 19:21:33 -050035do_install:append:class-native() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050036 sed -e 's,PKG_CHECK_MODULES(.*),,g' \
37 -e 's,$PKG_CONFIG,pkg-config-native,g' \
38 -i ${D}/${datadir}/aclocal/wayland-scanner.m4
39}
40
41do_install_ptest() {
42 mkdir -p ${D}${PTEST_PATH}/tests/data
43 cp -rf ${B}/tests/*-test ${B}/tests/*-checker ${D}${PTEST_PATH}/tests
44 cp -rf ${B}/tests/*-checker ${D}${PTEST_PATH}
45 cp -rf ${S}/tests/scanner-test.sh ${D}${PTEST_PATH}/tests
46 cp -rf ${S}/tests/data/* ${D}${PTEST_PATH}/tests/data/
47 cp -rf ${S}/egl/wayland-egl-symbols-check ${D}${PTEST_PATH}/tests/
48}
49
Patrick Williams213cb262021-08-07 19:21:33 -050050sysroot_stage_all:append:class-target () {
Andrew Geissler82c905d2020-04-13 13:39:40 -050051 rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4
52 cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/
53}
54
William A. Kennington IIIac69b482021-06-02 12:28:27 -070055PACKAGES += "${PN}-tools"
56
Patrick Williams213cb262021-08-07 19:21:33 -050057FILES:${PN} = "${libdir}/*${SOLIBS}"
58FILES:${PN}-tools += "${bindir} ${datadir}/wayland"
Andrew Geissler82c905d2020-04-13 13:39:40 -050059
60BBCLASSEXTEND = "native nativesdk"
61
Patrick Williams213cb262021-08-07 19:21:33 -050062RDEPENDS:${PN}-ptest += "binutils sed ${PN}-tools"