diff --git a/temp/evtest/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/temp/evtest/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch new file mode 100644 index 000000000..6cac54c03 --- /dev/null +++ b/temp/evtest/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch @@ -0,0 +1,44 @@ +Upstream: yes, https://gitlab.freedesktop.org/libevdev/evtest/-/commit/648f5c1a9e07843e185782d207bc1bcbe6586f6e +From 648f5c1a9e07843e185782d207bc1bcbe6586f6e Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 30 Nov 2019 11:58:58 -0800 +Subject: [PATCH] Fix build on 32bit arches with 64bit time_t + +time element is deprecated on new input_event structure in kernel's +input.h [1] + +[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f + +Signed-off-by: Khem Raj +--- + evtest.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/evtest.c b/evtest.c +index be5e42c..d00437f 100644 +--- a/evtest.c ++++ b/evtest.c +@@ -62,6 +62,11 @@ + #include + #include /* PATH_MAX */ + ++#ifndef input_event_sec ++#define input_event_sec time.tv_sec ++#define input_event_usec time.tv_usec ++#endif ++ + #define BITS_PER_LONG (sizeof(long) * 8) + #define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1) + #define OFF(x) ((x)%BITS_PER_LONG) +@@ -1141,7 +1146,7 @@ static int print_events(int fd) + type = ev[i].type; + code = ev[i].code; + +- printf("Event: time %ld.%06ld, ", ev[i].time.tv_sec, ev[i].time.tv_usec); ++ printf("Event: time %ld.%06ld, ", ev[i].input_event_sec, ev[i].input_event_usec); + + if (type == EV_SYN) { + if (code == SYN_MT_REPORT) +-- +2.20.1 + diff --git a/temp/evtest/APKBUILD b/temp/evtest/APKBUILD new file mode 100644 index 000000000..74a480971 --- /dev/null +++ b/temp/evtest/APKBUILD @@ -0,0 +1,36 @@ +# Forked from Alpine with 32-bit fix, until it's built (and published!) in Alpine +# https://gitlab.com/postmarketOS/build.postmarketos.org/-/issues/72#note_387377513 +pkgname=evtest +pkgver=1.34 +pkgrel=1 +pkgdesc="monitor input layer events" +options="!check" # No testsuite +url="https://cgit.freedesktop.org/evtest/" +arch="all !ppc64le" +license="GPL-2.0" +makedepends="linux-headers autoconf automake libtool" +source="https://src.fedoraproject.org/repo/pkgs/evtest/evtest-$pkgver.tar.bz2/sha512/94f9ff2642abbd0393d7583edd10f83487a1985963bf3186a0c957bf1d56cef30501bb38ac4df0312eab59f633a606e25638a09e43dc6f3bc31f49aa3c7cec52/evtest-$pkgver.tar.bz2 + fix-ppc64le-musl.patch + 0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch + " + +prepare() { + default_prepare + autoreconf -fi +} + +build() { + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr + make +} + +package() { + make install DESTDIR="$pkgdir" +} + +sha512sums="94f9ff2642abbd0393d7583edd10f83487a1985963bf3186a0c957bf1d56cef30501bb38ac4df0312eab59f633a606e25638a09e43dc6f3bc31f49aa3c7cec52 evtest-1.34.tar.bz2 +da2d7f44235e270e19b352c04e2d53a17839bdc93d942f7481c6162037e2f71d714dde9193643498641a2e941da69c2b2b8cb005f2951d4e584fb4796c57412b fix-ppc64le-musl.patch +2ab94d569eb23f0c9991b22403e1360aa31826f8b6e3111fab8c67802290102a9f0a0a78f1882a1baa5dbfc1b1d6e87929e7d9c19f7402fc25cca4f6c88990b4 0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch" diff --git a/temp/evtest/fix-ppc64le-musl.patch b/temp/evtest/fix-ppc64le-musl.patch new file mode 100644 index 000000000..74216fc96 --- /dev/null +++ b/temp/evtest/fix-ppc64le-musl.patch @@ -0,0 +1,15 @@ +diff --git a/evtest.c b/evtest.c +index 37d4f85..018d1ac 100644 +--- a/evtest.c ++++ b/evtest.c +@@ -59,6 +59,9 @@ + #include + #include + #include ++#ifndef PATH_MAX ++#include /* for PATH_MAX */ ++#endif + + #define BITS_PER_LONG (sizeof(long) * 8) + #define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1) +