diff options
| author | Otavio Salvador <otavio@ossystems.com.br> | 2023-06-27 17:26:20 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-27 17:26:20 -0300 |
| commit | 3020a028398859634adc1dfcc648c823be751dbd (patch) | |
| tree | 63e954d128c58c29796a0a9fa7186d49f6a7abff | |
| parent | bdc72f97e1ed56f3dba7fb12f59d0446abf30647 (diff) | |
| parent | 60510fbb0ebf471f798fb77e880ac0a7acbdcc50 (diff) | |
| download | meta-freescale-3020a028398859634adc1dfcc648c823be751dbd.tar.gz | |
Merge pull request #1589 from ricardosalveti/master
wayland: make local copy of the 1.22.0 recipe
4 files changed, 127 insertions, 0 deletions
diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc index bbc6cf6d5..5cc1c4762 100644 --- a/conf/machine/include/imx-base.inc +++ b/conf/machine/include/imx-base.inc | |||
| @@ -527,6 +527,8 @@ PREFERRED_VERSION_wayland-protocols:mx7-nxp-bsp ??= "1.31.imx" | |||
| 527 | PREFERRED_VERSION_wayland-protocols:mx8-nxp-bsp ??= "1.31.imx" | 527 | PREFERRED_VERSION_wayland-protocols:mx8-nxp-bsp ??= "1.31.imx" |
| 528 | PREFERRED_VERSION_wayland-protocols:mx9-nxp-bsp ??= "1.31.imx" | 528 | PREFERRED_VERSION_wayland-protocols:mx9-nxp-bsp ??= "1.31.imx" |
| 529 | 529 | ||
| 530 | PREFERRED_VERSION_wayland:imx-nxp-bsp ??= "1.22.0.imx" | ||
| 531 | PREFERRED_VERSION_wayland-native:imx-nxp-bsp ??= "1.22.0.imx" | ||
| 530 | PREFERRED_VERSION_xwayland:imx-nxp-bsp ??= "23.1.1.imx" | 532 | PREFERRED_VERSION_xwayland:imx-nxp-bsp ??= "23.1.1.imx" |
| 531 | 533 | ||
| 532 | # Use i.MX libdrm Version | 534 | # Use i.MX libdrm Version |
diff --git a/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch b/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch new file mode 100644 index 000000000..bc753de11 --- /dev/null +++ b/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | From b4c64b6f07743e3fb63ce52359bc664ab7d60df0 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Joshua Watt <JPEWhacker@gmail.com> | ||
| 3 | Date: Thu, 20 Feb 2020 15:20:45 -0600 | ||
| 4 | Subject: [PATCH] build: Fix strndup detection on MinGW | ||
| 5 | |||
| 6 | GCC and meson conspire together to incorrectly detect that strndup() | ||
| 7 | exists on MinGW as __builtin_strndup, when no such function exists. As a | ||
| 8 | work around, meson will skip looking for __builtin functions if an | ||
| 9 | '#include' is in the prefix, so add '#include <string.h>' when looking | ||
| 10 | for strndup(). | ||
| 11 | |||
| 12 | See: https://github.com/mesonbuild/meson/issues/3672 | ||
| 13 | |||
| 14 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/wayland/merge_requests/63] | ||
| 15 | |||
| 16 | Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> | ||
| 17 | Signed-off-by: Denys Dmytriyenko <denis@denix.org> | ||
| 18 | --- | ||
| 19 | meson.build | 2 +- | ||
| 20 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 21 | |||
| 22 | diff --git a/meson.build b/meson.build | ||
| 23 | index 3bc25c9..adde7b9 100644 | ||
| 24 | --- a/meson.build | ||
| 25 | +++ b/meson.build | ||
| 26 | @@ -38,11 +38,11 @@ have_funcs = [ | ||
| 27 | 'prctl', | ||
| 28 | 'memfd_create', | ||
| 29 | 'mremap', | ||
| 30 | - 'strndup', | ||
| 31 | ] | ||
| 32 | foreach f: have_funcs | ||
| 33 | config_h.set('HAVE_' + f.underscorify().to_upper(), cc.has_function(f)) | ||
| 34 | endforeach | ||
| 35 | +config_h.set('HAVE_STRNDUP', cc.has_function('strndup') and cc.has_header_symbol('string.h', 'strndup')) | ||
| 36 | config_h.set10('HAVE_XUCRED_CR_PID', cc.has_member('struct xucred', 'cr_pid', prefix : '#include <sys/ucred.h>')) | ||
| 37 | have_broken_msg_cmsg_cloexec = false | ||
| 38 | if host_machine.system() == 'freebsd' | ||
| 39 | -- | ||
| 40 | 2.7.4 | ||
| 41 | |||
diff --git a/recipes-graphics/wayland/wayland/run-ptest b/recipes-graphics/wayland/wayland/run-ptest new file mode 100644 index 000000000..7e8d9de04 --- /dev/null +++ b/recipes-graphics/wayland/wayland/run-ptest | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | export WAYLAND_SCANNER=wayland-scanner | ||
| 4 | export TEST_DATA_DIR=tests/data | ||
| 5 | export TEST_OUTPUT_DIR=tests/output | ||
| 6 | export SED=sed | ||
| 7 | export WAYLAND_EGL_LIB=/usr/lib/libwayland-egl.so.1 | ||
| 8 | export NM=nm | ||
| 9 | |||
| 10 | for i in `ls tests/*-test tests/wayland-egl-symbols-check tests/scanner-test.sh`; do | ||
| 11 | $i | ||
| 12 | if [ $? -eq 0 ]; then | ||
| 13 | echo "PASS: $i" | ||
| 14 | else | ||
| 15 | echo "FAIL: $i" | ||
| 16 | fi | ||
| 17 | done | ||
diff --git a/recipes-graphics/wayland/wayland_1.22.0.imx.bb b/recipes-graphics/wayland/wayland_1.22.0.imx.bb new file mode 100644 index 000000000..eb1066c82 --- /dev/null +++ b/recipes-graphics/wayland/wayland_1.22.0.imx.bb | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | SUMMARY = "Wayland, a protocol between a compositor and clients" | ||
| 2 | DESCRIPTION = "Wayland is a protocol for a compositor to talk to its clients \ | ||
| 3 | as well as a C library implementation of that protocol. The compositor can be \ | ||
| 4 | a standalone display server running on Linux kernel modesetting and evdev \ | ||
| 5 | input devices, an X application, or a wayland client itself. The clients can \ | ||
| 6 | be traditional applications, X servers (rootless or fullscreen) or other \ | ||
| 7 | display servers." | ||
| 8 | HOMEPAGE = "http://wayland.freedesktop.org" | ||
| 9 | LICENSE = "MIT" | ||
| 10 | LIC_FILES_CHKSUM = "file://COPYING;md5=b31d8f53b6aaf2b4985d7dd7810a70d1 \ | ||
| 11 | file://src/wayland-server.c;endline=24;md5=b8e046164a766bb1ede8ba38e9dcd7ce" | ||
| 12 | |||
| 13 | DEPENDS = "expat libffi wayland-native" | ||
| 14 | |||
| 15 | SRC_URI = "https://gitlab.freedesktop.org/wayland/wayland/-/releases/1.22.0/downloads/${BP_ORIGINAL}.tar.xz \ | ||
| 16 | file://run-ptest \ | ||
| 17 | file://0001-build-Fix-strndup-detection-on-MinGW.patch \ | ||
| 18 | " | ||
| 19 | SRC_URI[sha256sum] = "1540af1ea698a471c2d8e9d288332c7e0fd360c8f1d12936ebb7e7cbc2425842" | ||
| 20 | BP_ORIGINAL = "${BPN}-1.22.0" | ||
| 21 | S = "${WORKDIR}/${BP_ORIGINAL}" | ||
| 22 | |||
| 23 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" | ||
| 24 | UPSTREAM_CHECK_REGEX = "wayland-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)" | ||
| 25 | |||
| 26 | inherit meson pkgconfig ptest | ||
| 27 | |||
| 28 | PACKAGECONFIG ??= "dtd-validation" | ||
| 29 | PACKAGECONFIG[dtd-validation] = "-Ddtd_validation=true,-Ddtd_validation=false,libxml2,," | ||
| 30 | |||
| 31 | EXTRA_OEMESON = "-Ddocumentation=false" | ||
| 32 | EXTRA_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. | ||
| 36 | do_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 | |||
| 42 | do_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 | |||
| 51 | sysroot_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 | |||
| 56 | PACKAGES =+ "${PN}-tools" | ||
| 57 | |||
| 58 | FILES:${PN}-tools = "${bindir}/wayland-scanner" | ||
| 59 | FILES:${PN}-dev += "${datadir}/${BPN}/wayland-scanner.mk" | ||
| 60 | |||
| 61 | BBCLASSEXTEND = "native nativesdk" | ||
| 62 | |||
| 63 | RDEPENDS:${PN}-ptest += "binutils sed ${PN}-tools" | ||
| 64 | |||
| 65 | PACKAGE_ARCH = "${MACHINE_SOCARCH}" | ||
| 66 | |||
| 67 | DEFAULT_PREFERENCE = "-1" | ||
