From b1a183a4fc33a998e05fcc37926691e4020a7352 Mon Sep 17 00:00:00 2001 From: Andreas Cord-Landwehr Date: Mon, 28 Apr 2025 20:17:23 +0200 Subject: [PATCH] libinput: backport 1.28.1 from Yocto master --- .../libinput/libinput/run-ptest | 9 ++++ .../libinput/libinput_1.28.1.bb | 49 +++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 recipes-meta-oe-backports/scrathgap-support/libinput/libinput/run-ptest create mode 100644 recipes-meta-oe-backports/scrathgap-support/libinput/libinput_1.28.1.bb diff --git a/recipes-meta-oe-backports/scrathgap-support/libinput/libinput/run-ptest b/recipes-meta-oe-backports/scrathgap-support/libinput/libinput/run-ptest new file mode 100644 index 0000000..d11e6eb --- /dev/null +++ b/recipes-meta-oe-backports/scrathgap-support/libinput/libinput/run-ptest @@ -0,0 +1,9 @@ +#!/bin/sh + +/usr/libexec/libinput/libinput-test-suite -j1 +if [ $? -eq 0 ]; then + echo 'PASS: libinput-test-suite' +else + echo 'FAIL: libinput-test-suite' +fi + diff --git a/recipes-meta-oe-backports/scrathgap-support/libinput/libinput_1.28.1.bb b/recipes-meta-oe-backports/scrathgap-support/libinput/libinput_1.28.1.bb new file mode 100644 index 0000000..767a767 --- /dev/null +++ b/recipes-meta-oe-backports/scrathgap-support/libinput/libinput_1.28.1.bb @@ -0,0 +1,49 @@ +SUMMARY = "Library to handle input devices in Wayland compositors" +DESCRIPTION = "libinput is a library to handle input devices in Wayland \ +compositors and to provide a generic X.Org input driver. It provides \ +device detection, device handling, input device event processing and \ +abstraction so minimize the amount of custom input code compositors need to \ +provide the common set of functionality that users expect." +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/" +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=bab4ac7dc1c10bc0fb037dc76c46ef8a" + +DEPENDS = "libevdev udev mtdev" + +SRC_URI = "git://gitlab.freedesktop.org/libinput/libinput.git;protocol=https;branch=main \ + file://run-ptest \ + " +SRCREV = "4f7b4ef0e4eb5d569df36be387579858eba349bb" +S = "${WORKDIR}/git" + +UPSTREAM_CHECK_REGEX = "libinput-(?P\d+\.\d+\.(?!9\d+)\d+)" + +inherit meson pkgconfig lib_package ptest + +# Patch out build directory, otherwise it leaks into ptest binary +do_configure:append() { + sed -i -e "s,${WORKDIR},,g" config.h + if [ -e "litest-config.h" ]; then + sed -i -e "s,${WORKDIR},,g" litest-config.h + fi +} + +PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" +PACKAGECONFIG[libwacom] = "-Dlibwacom=true,-Dlibwacom=false,libwacom" +PACKAGECONFIG[gui] = "-Ddebug-gui=true,-Ddebug-gui=false,cairo gtk+3 wayland-native" +PACKAGECONFIG[tests] = "-Dtests=true -Dinstall-tests=true,-Dtests=false -Dinstall-tests=false" + +UDEVDIR = "`pkg-config --variable=udevdir udev`" + +EXTRA_OEMESON += "-Dudev-dir=${UDEVDIR} \ + -Ddocumentation=false \ + -Dzshcompletiondir=no" + +# package name changed in 1.8.1 upgrade: make sure package upgrades work +RPROVIDES:${PN} = "libinput" +RREPLACES:${PN} = "libinput" +RCONFLICTS:${PN} = "libinput" + +FILES:${PN}-ptest += "${libexecdir}/libinput/libinput-test-suite"