summaryrefslogtreecommitdiffstats
path: root/recipes-graphics
diff options
context:
space:
mode:
authorRicardo Salveti <ricardo@foundries.io>2023-06-27 11:44:56 -0300
committerRicardo Salveti <ricardo@foundries.io>2023-06-27 17:05:41 -0300
commit60510fbb0ebf471f798fb77e880ac0a7acbdcc50 (patch)
tree63e954d128c58c29796a0a9fa7186d49f6a7abff /recipes-graphics
parentbdc72f97e1ed56f3dba7fb12f59d0446abf30647 (diff)
downloadmeta-freescale-60510fbb0ebf471f798fb77e880ac0a7acbdcc50.tar.gz
wayland: make local copy of the 1.22.0 recipe
Current xwayland 23.1.1 release is not compatible with the wayland version available in kirkstone (1.20.0). Make a local copy of the 1.22.0 recipe from oe-core master b73784851 but for imx, with default preference set as -1, following how xwayland was also imported from oe-core. Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
Diffstat (limited to 'recipes-graphics')
-rw-r--r--recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch41
-rw-r--r--recipes-graphics/wayland/wayland/run-ptest17
-rw-r--r--recipes-graphics/wayland/wayland_1.22.0.imx.bb67
3 files changed, 125 insertions, 0 deletions
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 00000000..bc753de1
--- /dev/null
+++ b/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch
@@ -0,0 +1,41 @@
1From b4c64b6f07743e3fb63ce52359bc664ab7d60df0 Mon Sep 17 00:00:00 2001
2From: Joshua Watt <JPEWhacker@gmail.com>
3Date: Thu, 20 Feb 2020 15:20:45 -0600
4Subject: [PATCH] build: Fix strndup detection on MinGW
5
6GCC and meson conspire together to incorrectly detect that strndup()
7exists on MinGW as __builtin_strndup, when no such function exists. As a
8work around, meson will skip looking for __builtin functions if an
9'#include' is in the prefix, so add '#include <string.h>' when looking
10for strndup().
11
12See: https://github.com/mesonbuild/meson/issues/3672
13
14Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/wayland/merge_requests/63]
15
16Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
17Signed-off-by: Denys Dmytriyenko <denis@denix.org>
18---
19 meson.build | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/meson.build b/meson.build
23index 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--
402.7.4
41
diff --git a/recipes-graphics/wayland/wayland/run-ptest b/recipes-graphics/wayland/wayland/run-ptest
new file mode 100644
index 00000000..7e8d9de0
--- /dev/null
+++ b/recipes-graphics/wayland/wayland/run-ptest
@@ -0,0 +1,17 @@
1#!/bin/sh
2
3export WAYLAND_SCANNER=wayland-scanner
4export TEST_DATA_DIR=tests/data
5export TEST_OUTPUT_DIR=tests/output
6export SED=sed
7export WAYLAND_EGL_LIB=/usr/lib/libwayland-egl.so.1
8export NM=nm
9
10for 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
17done
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 00000000..eb1066c8
--- /dev/null
+++ b/recipes-graphics/wayland/wayland_1.22.0.imx.bb
@@ -0,0 +1,67 @@
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://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 "
19SRC_URI[sha256sum] = "1540af1ea698a471c2d8e9d288332c7e0fd360c8f1d12936ebb7e7cbc2425842"
20BP_ORIGINAL = "${BPN}-1.22.0"
21S = "${WORKDIR}/${BP_ORIGINAL}"
22
23UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
24UPSTREAM_CHECK_REGEX = "wayland-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)"
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
65PACKAGE_ARCH = "${MACHINE_SOCARCH}"
66
67DEFAULT_PREFERENCE = "-1"