From aee6a9e4508f0bba8275c2304551e29e72c4e015 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 2 Oct 2025 15:36:28 -0700 Subject: [PATCH] touchpademulator: Add recipe Signed-off-by: Khem Raj --- ...e-CC-instead-of-hardcoding-gcc-calls.patch | 29 ++++++++++++++++ ...mulator.sh-Demand-sh-instead-of-bash.patch | 25 ++++++++++++++ .../touchpademulator/touchpademulator_git.bb | 34 +++++++++++++++++++ 3 files changed, 88 insertions(+) create mode 100644 meta-oe/recipes-support/touchpademulator/touchpademulator/0001-makefile-Use-CC-instead-of-hardcoding-gcc-calls.patch create mode 100644 meta-oe/recipes-support/touchpademulator/touchpademulator/0002-LaunchTouchpadEmulator.sh-Demand-sh-instead-of-bash.patch create mode 100644 meta-oe/recipes-support/touchpademulator/touchpademulator_git.bb diff --git a/meta-oe/recipes-support/touchpademulator/touchpademulator/0001-makefile-Use-CC-instead-of-hardcoding-gcc-calls.patch b/meta-oe/recipes-support/touchpademulator/touchpademulator/0001-makefile-Use-CC-instead-of-hardcoding-gcc-calls.patch new file mode 100644 index 0000000000..062adc9665 --- /dev/null +++ b/meta-oe/recipes-support/touchpademulator/touchpademulator/0001-makefile-Use-CC-instead-of-hardcoding-gcc-calls.patch @@ -0,0 +1,29 @@ +From 37284f7208e43da34cac64b419219c5d4e20b36e Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 2 Oct 2025 15:25:50 -0700 +Subject: [PATCH] makefile: Use CC instead of hardcoding gcc calls + +This helps to cross-compile it using infrastructure like yocto + +Upstream-Status: Submitted [https://gitlab.com/CalcProgrammer1/TouchpadEmulator/-/merge_requests/4] + +Signed-off-by: Khem Raj +--- + Makefile | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index adf39a6..4cebaa6 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,9 @@ ++CC ?= gcc ++ + default: TouchpadEmulator + + TouchpadEmulator: TouchpadEmulator.c +- gcc -Wall $(shell pkg-config --cflags dbus-1 dbus-glib-1) TouchpadEmulator.c -ldbus-1 -ldbus-glib-1 -lpthread -o TouchpadEmulator ++ $(CC) -Wall $(shell pkg-config --cflags dbus-1 dbus-glib-1) TouchpadEmulator.c -ldbus-1 -ldbus-glib-1 -lpthread -o TouchpadEmulator + + clean: + git clean -dfx diff --git a/meta-oe/recipes-support/touchpademulator/touchpademulator/0002-LaunchTouchpadEmulator.sh-Demand-sh-instead-of-bash.patch b/meta-oe/recipes-support/touchpademulator/touchpademulator/0002-LaunchTouchpadEmulator.sh-Demand-sh-instead-of-bash.patch new file mode 100644 index 0000000000..999c557d54 --- /dev/null +++ b/meta-oe/recipes-support/touchpademulator/touchpademulator/0002-LaunchTouchpadEmulator.sh-Demand-sh-instead-of-bash.patch @@ -0,0 +1,25 @@ +From 5b715a6741a7a2fcd0dc04e31c682a0183a49fa6 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 2 Oct 2025 15:27:09 -0700 +Subject: [PATCH] LaunchTouchpadEmulator.sh: Demand sh instead of bash + +This script does not really use any bash specific extentions +so asking for simple /bin/sh should be good and makes it more +portable + +Upstream-Status: Submitted [https://gitlab.com/CalcProgrammer1/TouchpadEmulator/-/merge_requests/4] +Signed-off-by: Khem Raj +--- + LaunchTouchpadEmulator.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/LaunchTouchpadEmulator.sh b/LaunchTouchpadEmulator.sh +index d12fc27..63134cd 100755 +--- a/LaunchTouchpadEmulator.sh ++++ b/LaunchTouchpadEmulator.sh +@@ -1,4 +1,4 @@ +-#! /bin/bash ++#! /bin/sh + + if [ "$1" = "--autostart" ] ; then + mkdir -p ~/.config/autostart diff --git a/meta-oe/recipes-support/touchpademulator/touchpademulator_git.bb b/meta-oe/recipes-support/touchpademulator/touchpademulator_git.bb new file mode 100644 index 0000000000..e7b0387f7e --- /dev/null +++ b/meta-oe/recipes-support/touchpademulator/touchpademulator_git.bb @@ -0,0 +1,34 @@ +SUMMARY = "Emulate a touchpad mouse device using a touchscreen on Linux" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f744a106227710d355bcc787e464ba2d \ + file://debian/copyright;md5=7bed05b78c0e4abec501cf82c4b85d9c" + +SRC_URI = "git://gitlab.com/CalcProgrammer1/TouchpadEmulator;protocol=https;branch=master \ + file://0001-makefile-Use-CC-instead-of-hardcoding-gcc-calls.patch \ + file://0002-LaunchTouchpadEmulator.sh-Demand-sh-instead-of-bash.patch \ + " + +PV = "0.3+git" +SRCREV = "7800f4c3af4defaf1be1083c93983ed4ff0e3b32" + +inherit pkgconfig + +DEPENDS += "dbus dbus-glib" + +# Fixes: +# File /usr/bin/TouchpadEmulator in package touchpademulator doesn't have GNU_HASH (didn't pass LDFLAGS?) [ldflags] +TARGET_CC_ARCH += "${LDFLAGS}" + +do_configure () { + : +} + +do_compile () { + oe_runmake +} + +do_install () { + oe_runmake install 'DESTDIR=${D}' +} + +FILES:${PN} += "${datadir}/icons"