aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2021-09-16 00:02:49 +0200
committerJakub Jirutka <jakub@jirutka.cz>2021-09-16 00:06:49 +0200
commit17f62c3c73b95c2d050c4e6bd944fb93f4f94b15 (patch)
tree980fc88b0d07d9f073c08bc977091d6448653a32
parent51a4d42b825105edfa0040329b6db008e59110c5 (diff)
downloadaports-17f62c3c73b95c2d050c4e6bd944fb93f4f94b15.tar.gz
aports-17f62c3c73b95c2d050c4e6bd944fb93f4f94b15.tar.bz2
aports-17f62c3c73b95c2d050c4e6bd944fb93f4f94b15.tar.xz
testing/keyd: fix on 32-bit arches (musl time64) and build with -pedantic
-rw-r--r--testing/keyd/APKBUILD9
-rw-r--r--testing/keyd/musl-time64.patch28
-rw-r--r--testing/keyd/obey-build-flags.patch2
3 files changed, 34 insertions, 5 deletions
diff --git a/testing/keyd/APKBUILD b/testing/keyd/APKBUILD
index edd5664dbf..8bf8fa1f3e 100644
--- a/testing/keyd/APKBUILD
+++ b/testing/keyd/APKBUILD
@@ -2,17 +2,17 @@
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=keyd
pkgver=1.1.2
-pkgrel=0
+pkgrel=1
pkgdesc="A key remapping daemon for Linux"
url="https://github.com/rvaiya/keyd"
-# arm*, x86: fails to build
-arch="all !armhf !armv7 !x86"
+arch="all"
license="MIT"
makedepends="eudev-dev linux-headers"
subpackages="$pkgname-doc $pkgname-openrc"
source="https://github.com/rvaiya/keyd/archive/v$pkgver/keyd-$pkgver.tar.gz
ungit.patch
obey-build-flags.patch
+ musl-time64.patch
$pkgname.initd
"
options="!check" # no tests provided
@@ -32,6 +32,7 @@ package() {
sha512sums="
c8a3287e6f6b3b778b8db63fd1c0005ed2e93706f659c8e9c5029791e1b226eea9e73e72602607a21a5121b74776f7dc941327ea00d6f38e7201349c8221052c keyd-1.1.2.tar.gz
de80226c88e782fd39ea930dc6ac218584c62f3847251c3c506df3c461261ec87e2cfffdcb50a8e854d66ea333a3a1ae7f7c837b048d61798cfc07b65b01ef19 ungit.patch
-c77df804ee5f665cd7f19efd6abe2364161c6715271d31a55bb1d1155fb5dc58ca824e8d8800a2cf650946c3a7cd751a2c22353238f481442d6319426dcbe4fe obey-build-flags.patch
+3e9fc40aae80db120d90835cc51a21b9830f7587bf97c25bd6d509d0b2e17080a244665ead87d77bd1af49ccb9248c939c2de4bf9df68792405dbbc1193a010c obey-build-flags.patch
+9b68b6f2fdc7a52eb076ea68976ab0ea26ea077f5a412300cc846f79999519d58ebd2dc3884c2947d2870b6462ac44ddda6eb0df6354a45bade31c1c6670922d musl-time64.patch
9e909d7d5468e717d8ca3c165bb3846f17f03bb7d1f19c424d7cc0e5ac282f1bad156c34c12b019a00100574e53b21d4245c028e13c662cad7048b3a956ede2c keyd.initd
"
diff --git a/testing/keyd/musl-time64.patch b/testing/keyd/musl-time64.patch
new file mode 100644
index 0000000000..cc1a143b85
--- /dev/null
+++ b/testing/keyd/musl-time64.patch
@@ -0,0 +1,28 @@
+Fix compatibility with musl's time64 on 32-bit arches.
+
+See https://gitlab.alpinelinux.org/alpine/aports/-/commit/1d4742aaaea19666bffb2a71a4312da0dcc41f72#note_180127
+
+--- a/src/main.c
++++ b/src/main.c
+@@ -220,8 +220,8 @@
+ struct input_event ev = {
+ .type = EV_KEY,
+ .value = 2,
+- .time.tv_sec = 0,
+- .time.tv_usec = 0
++ .input_event_sec = 0,
++ .input_event_usec = 0
+ };
+
+ //Inefficient, but still reasonably fast (<100us)
+@@ -242,8 +242,8 @@
+ ev.type = EV_KEY;
+ ev.code = code;
+ ev.value = is_pressed;
+- ev.time.tv_sec = 0;
+- ev.time.tv_usec = 0;
++ ev.input_event_sec = 0;
++ ev.input_event_usec = 0;
+
+ write(ufd, &ev, sizeof(ev));
+
diff --git a/testing/keyd/obey-build-flags.patch b/testing/keyd/obey-build-flags.patch
index 96d092e708..ba49a6f5c3 100644
--- a/testing/keyd/obey-build-flags.patch
+++ b/testing/keyd/obey-build-flags.patch
@@ -10,7 +10,7 @@
all:
mkdir -p bin
- $(CC) $(CFLAGS) -O3 src/*.c -o bin/keyd -ludev
-+ $(CC) $(CFLAGS) $(LDFLAGS) src/*.c -o bin/keyd -ludev
++ $(CC) $(CFLAGS) $(LDFLAGS) -Wall -Wextra -pedantic src/*.c -o bin/keyd -ludev
debug:
mkdir -p bin
- $(CC) $(CFLAGS) -Wall -Wextra -pedantic -DDEBUG -g src/*.c -o bin/keyd -ludev