From d40372a7a005d4c9d27e1e4ae39e66ab745f42a9 Mon Sep 17 00:00:00 2001 From: iretq Date: Mon, 27 Apr 2026 00:14:10 -0300 Subject: [PATCH] ports: drop xf86-input-{keyboard,mouse} --- distro-files/etc/xorg.conf | 7 +- .../jinx-working-patch.patch | 224 ------------------ .../xf86-input-mouse/jinx-working-patch.patch | 139 ----------- recipes/xf86-input-keyboard | 18 -- recipes/xf86-input-mouse | 18 -- source-recipes/xf86-input-keyboard | 9 - source-recipes/xf86-input-mouse | 9 - 7 files changed, 2 insertions(+), 422 deletions(-) delete mode 100644 patches/xf86-input-keyboard/jinx-working-patch.patch delete mode 100644 patches/xf86-input-mouse/jinx-working-patch.patch delete mode 100644 recipes/xf86-input-keyboard delete mode 100644 recipes/xf86-input-mouse delete mode 100644 source-recipes/xf86-input-keyboard delete mode 100644 source-recipes/xf86-input-mouse diff --git a/distro-files/etc/xorg.conf b/distro-files/etc/xorg.conf index 295d4a32..bc7f2f84 100644 --- a/distro-files/etc/xorg.conf +++ b/distro-files/etc/xorg.conf @@ -7,9 +7,6 @@ Section "Device" Driver "fbdev" EndSection -Section "InputDevice" -Identifier "Keyboard" -Driver "kbd" -Option "Device" "/dev/keyboard" -Option "Protocol" "Standard" +Section "Module" + Load "evdev" EndSection diff --git a/patches/xf86-input-keyboard/jinx-working-patch.patch b/patches/xf86-input-keyboard/jinx-working-patch.patch deleted file mode 100644 index 8fb32c71..00000000 --- a/patches/xf86-input-keyboard/jinx-working-patch.patch +++ /dev/null @@ -1,224 +0,0 @@ -diff --git xf86-input-keyboard-clean/configure.ac xf86-input-keyboard-workdir/configure.ac -index 0f71ce3..024edd3 100644 ---- xf86-input-keyboard-clean/configure.ac -+++ xf86-input-keyboard-workdir/configure.ac -@@ -57,6 +57,11 @@ AC_SUBST(inputdir) - - # The keyboard driver code is O/S specific - case $host_os in -+ -+ astral*) -+ IS_ASTRAL="yes" -+ ;; -+ - linux*) - AC_MSG_ERROR([This is not the keyboard driver you are looking for. Use evdev or libinput.]) - ;; -@@ -95,6 +100,7 @@ case $host_os in - esac - AC_SUBST([OS_FLAGS]) - -+AM_CONDITIONAL(ASTRAL, [test "x$IS_ASTRAL" = xyes]) - AM_CONDITIONAL(BSD, [test "x$IS_BSD" = xyes]) - AM_CONDITIONAL(SOLARIS, [test "x$IS_SOLARIS" = xyes]) - AM_CONDITIONAL(HURD, [test "x$IS_HURD" = xyes]) -diff --git xf86-input-keyboard-clean/src/Makefile.am xf86-input-keyboard-workdir/src/Makefile.am -index 52f5f4d..3899868 100644 ---- xf86-input-keyboard-clean/src/Makefile.am -+++ xf86-input-keyboard-workdir/src/Makefile.am -@@ -26,10 +26,15 @@ kbd_drv_la_SOURCES = kbd.c xf86OSKbd.h xf86Keymap.h atKeynames.h - kbd_drv_la_LIBADD = $(XORG_LIBS) - kbd_drv_ladir = @inputdir@ - -+ASTRAL_SRCS = astral_kbd.c at_scancode.c - BSD_SRCS = bsd_KbdMap.c bsd_kbd.c bsd_kbd.h at_scancode.c - HURD_SRCS = hurd_kbd.c at_scancode.c - SOLARIS_SRCS = sun_kbd.c sun_kbd.h sun_kbdMap.c - -+if ASTRAL -+kbd_drv_la_SOURCES += $(ASTRAL_SRCS) -+endif -+ - if BSD - kbd_drv_la_SOURCES += $(BSD_SRCS) - endif -@@ -42,4 +47,4 @@ if HURD - kbd_drv_la_SOURCES += $(HURD_SRCS) - endif - --EXTRA_DIST = $(BSD_SRCS) $(HURD_SRCS) $(SOLARIS_SRCS) -+EXTRA_DIST = $(ASTRAL_SRCS) $(BSD_SRCS) $(HURD_SRCS) $(SOLARIS_SRCS) -diff --git xf86-input-keyboard-workdir/src/astral_KbdMap.c xf86-input-keyboard-workdir/src/astral_KbdMap.c -new file mode 100644 -index 0000000..2ca19fd ---- /dev/null -+++ xf86-input-keyboard-workdir/src/astral_KbdMap.c -@@ -0,0 +1,27 @@ -+#ifdef HAVE_CONFIG_H -+#include -+#endif -+ -+#include -+#include -+ -+#include "compiler.h" -+ -+#include "xf86.h" -+#include "xf86Priv.h" -+#include "xf86_OSlib.h" -+ -+#include "xf86Xinput.h" -+#include "xf86OSKbd.h" -+#include "atKeynames.h" -+#include "xf86Keymap.h" -+ -+#include -+#include -+ -+void getmap(InputInfoPtr info, KeySymsPtr syms, CARD8 *map){ -+ syms->map = map; -+ syms->mapWidth = GLYPHS_PER_KEY; -+ syms->minKeyCode = MIN_KEYCODE; -+ syms->maxKeyCode = MAX_KEYCODE; -+} -diff --git xf86-input-keyboard-workdir/src/astral_kbd.c xf86-input-keyboard-workdir/src/astral_kbd.c -new file mode 100644 -index 0000000..9de5fa7 ---- /dev/null -+++ xf86-input-keyboard-workdir/src/astral_kbd.c -@@ -0,0 +1,135 @@ -+#ifdef HAVE_CONFIG_H -+#include -+#endif -+ -+#include -+#include -+ -+#include "compiler.h" -+ -+#include "xf86.h" -+#include "xf86Priv.h" -+#include "xf86_OSlib.h" -+ -+#include "xf86Xinput.h" -+#include "xf86OSKbd.h" -+#include "atKeynames.h" -+#include "xf86Keymap.h" -+ -+#include -+#include -+ -+// astral stuff -+ -+#define KBPACKET_FLAGS_RELEASED 1 -+#define KBPACKET_FLAGS_LEFTCTRL 2 -+#define KBPACKET_FLAGS_CAPSLOCK 4 -+#define KBPACKET_FLAGS_LEFTALT 8 -+#define KBPACKET_FLAGS_RIGHTALT 16 -+#define KBPACKET_FLAGS_LEFTSHIFT 32 -+#define KBPACKET_FLAGS_RIGHTCTRL 64 -+#define KBPACKET_FLAGS_RIGHTSHIFT 128 -+ -+#define KEYCODE_KEYPADENTER 96 -+#define KEYCODE_RIGHTCTRL 97 -+#define KEYCODE_KEYPADSLASH 98 -+#define KEYCODE_SYSREQ 99 -+#define KEYCODE_RIGHTALT 100 -+#define KEYCODE_LINEFEED 101 -+#define KEYCODE_HOME 102 -+#define KEYCODE_UP 103 -+#define KEYCODE_PAGEUP 104 -+#define KEYCODE_LEFT 105 -+#define KEYCODE_RIGHT 106 -+#define KEYCODE_END 107 -+#define KEYCODE_DOWN 108 -+#define KEYCODE_PAGEDOWN 109 -+#define KEYCODE_INSERT 110 -+#define KEYCODE_DELETE 111 -+ -+typedef struct { -+ char ascii; -+ uintmax_t keycode; -+ int flags; -+} kbpacket_t; -+ -+ -+// interface -+ -+static int nop(){ -+ return Success; -+} -+ -+static int keycodeMap[] = { -+ KEYCODE_KEYPADENTER, KEY_KP_Enter, -+ KEYCODE_RIGHTCTRL, KEY_RCtrl, -+ KEYCODE_KEYPADSLASH, KEY_KP_Divide, -+ KEYCODE_RIGHTALT, KEY_AltLang, -+ KEYCODE_LINEFEED, KEY_KP_Enter, -+ KEYCODE_HOME, KEY_Home, -+ KEYCODE_UP, KEY_Up, -+ KEYCODE_PAGEUP, KEY_PgUp, -+ KEYCODE_LEFT, KEY_Left, -+ KEYCODE_RIGHT, KEY_Right, -+ KEYCODE_END, KEY_End, -+ KEYCODE_DOWN, KEY_Down, -+ KEYCODE_PAGEDOWN, KEY_PgDown, -+ KEYCODE_INSERT, KEY_Insert, -+ KEYCODE_DELETE, KEY_Delete -+}; -+ -+#define KEYCODE_MAP_SIZE (sizeof(keycodeMap) / sizeof(int)) -+ -+static int getleds(InputInfoPtr pInfo){return 0;} -+ -+static int init(InputInfoPtr, int){return Success;} -+ -+static void kbdread(InputInfoPtr info){ -+ KbdDevPtr kbd = (KbdDevPtr) info->private; -+ kbpacket_t packet; -+ -+ while (read(info->fd, &packet, sizeof(kbpacket_t))) { -+ int keycode = packet.keycode; -+ -+ // is it a keycode that isn't in the AT keymap? -+ for (int i = 0; i < KEYCODE_MAP_SIZE; i += 2) { -+ if (keycode == keycodeMap[i]) { -+ keycode = keycodeMap[i + 1]; -+ break; -+ } -+ } -+ -+ kbd->PostEvent(info, keycode, (packet.flags & KBPACKET_FLAGS_RELEASED) ? FALSE : TRUE); -+ } -+ -+} -+ -+static Bool openkeyboard(InputInfoPtr info){ -+ char *kbdPath = xf86SetStrOption(info->options, "Device", "/dev/keyboard0"); -+ info->fd = open("/dev/keyboard0", O_NONBLOCK | O_RDONLY); -+ if(info->fd == -1) -+ FatalError("Failed to open keyboard (%s)\n",strerror(errno)); -+ -+ info->read_input = kbdread; -+ -+ return TRUE; -+} -+ -+Bool xf86OSKbdPreInit(InputInfoPtr info){ -+ -+ KbdDevPtr kbd = info->private; -+ -+ kbd->KbdInit = init; -+ kbd->KbdOn = nop; -+ kbd->KbdOff = nop; -+ kbd->Bell = nop; -+ kbd->SetLeds = nop; -+ kbd->GetLeds = getleds; -+ kbd->KbdGetMapping = nop; -+ kbd->RemapScanCode = 0; -+ kbd->OpenKeyboard = openkeyboard; -+ -+ kbd->private = NULL; -+ -+ return TRUE; -+} diff --git a/patches/xf86-input-mouse/jinx-working-patch.patch b/patches/xf86-input-mouse/jinx-working-patch.patch deleted file mode 100644 index 86bdf03c..00000000 --- a/patches/xf86-input-mouse/jinx-working-patch.patch +++ /dev/null @@ -1,139 +0,0 @@ -diff --git xf86-input-mouse-clean/configure.ac xf86-input-mouse-workdir/configure.ac -index 6c453cd..e27bdcb 100644 ---- xf86-input-mouse-clean/configure.ac -+++ xf86-input-mouse-workdir/configure.ac -@@ -84,6 +84,9 @@ case $host_os in - gnu*) - OS_MOUSE_NAME=hurd - ;; -+ astral*) -+ OS_MOUSE_NAME=astral -+ ;; - esac - AC_SUBST([OS_MOUSE_NAME]) - -diff --git xf86-input-mouse-workdir/src/astral_mouse.c xf86-input-mouse-workdir/src/astral_mouse.c -new file mode 100644 -index 0000000..d3a4a60 ---- /dev/null -+++ xf86-input-mouse-workdir/src/astral_mouse.c -@@ -0,0 +1,119 @@ -+#ifdef HAVE_XORG_CONFIG_H -+#include -+#endif -+ -+#include -+#include -+#include -+#include "inputstr.h" -+#include "scrnintstr.h" -+#include "mipointer.h" -+ -+#include "xf86.h" -+#include "xf86Xinput.h" -+#include "mouse.h" -+#include "xf86_OSlib.h" -+#include "xisb.h" -+ -+#include -+#include -+#include -+ -+#include -+ -+#define MOUSE_FLAG_RB 1 -+#define MOUSE_FLAG_MB 2 -+#define MOUSE_FLAG_LB 4 -+#define MOUSE_FLAG_B4 8 -+#define MOUSE_FLAG_B5 16 -+ -+typedef struct { -+ int flags; -+ int x,y,z; -+} mousepacket_t; -+ -+static void astralReadInput(InputInfoPtr pInfo) { -+ MouseDevPtr mouse = pInfo->private; -+ mousepacket_t packet; -+ -+ while(read(pInfo->fd, &packet, sizeof(packet)) == sizeof(packet)){ -+ int b = mouse->lastButtons; -+ b &= ~0x7; -+ b |= (packet.flags & MOUSE_FLAG_RB) ? 1 : 0; -+ b |= (packet.flags & MOUSE_FLAG_MB) ? 2 : 0; -+ b |= (packet.flags & MOUSE_FLAG_LB) ? 4 : 0; -+ -+ mouse->PostEvent(pInfo, b, packet.x, -packet.y, packet.z, 0); -+ } -+} -+ -+static Bool astralPreInit(InputInfoPtr pInfo, const char* proto, int flag) { -+ MouseDevPtr mouse; -+ -+ mouse = pInfo->private; -+ -+ mouse->protocol = proto; -+ -+ xf86ProcessCommonOptions(pInfo, pInfo->options); -+ -+ pInfo->fd = xf86OpenSerial(pInfo->options); -+ if(pInfo->fd == -1){ -+ xf86Msg(X_ERROR, "%s: cannot open mouse device!\n", pInfo->name); -+ return FALSE; -+ } -+ -+ mouse->CommonOptions(pInfo); -+ pInfo->read_input = astralReadInput; -+ return true; -+} -+ -+#define DEVPATH "/dev/mouse0" -+ -+static const char* getdevice(InputInfoPtr pInfo, const char* proto, int flag){ -+ struct stat st; -+ -+ if(stat(DEVPATH, &st) == -1) -+ return NULL; -+ -+ pInfo->options = xf86AddNewOption(pInfo->options, "Device", DEVPATH); -+ -+ return DEVPATH; -+} -+ -+static int interfacesupport() { -+ return MSE_PS2; -+} -+ -+static const char* names[] = { -+ "AstralMouseDev", NULL -+}; -+ -+static const char** protonames() { -+ return names; -+} -+ -+static const char* defaultproto() { -+ return "AstralMouseDev"; -+} -+ -+static Bool isdefault(const char *protocol) { -+ return strcmp(protocol, defaultproto()) == 0; -+} -+ -+OSMouseInfoPtr OSMouseInit(int flag) { -+ OSMouseInfoPtr p; -+ -+ p = calloc(sizeof(OSMouseInfoRec), 1); -+ -+ if (!p) -+ return NULL; -+ -+ p->SupportedInterfaces = interfacesupport; -+ p->BuiltinNames = protonames; -+ p->FindDevice = getdevice; -+ p->DefaultProtocol = defaultproto; -+ p->CheckProtocol = isdefault; -+ p->PreInit = astralPreInit; -+ return p; -+} -+ diff --git a/recipes/xf86-input-keyboard b/recipes/xf86-input-keyboard deleted file mode 100644 index eee118b5..00000000 --- a/recipes/xf86-input-keyboard +++ /dev/null @@ -1,18 +0,0 @@ -name=xf86-input-keyboard -revision=1 -from_source=xf86-input-keyboard -imagedeps="gcc" -hostdeps="xgcc xbinutils pkgconfig automake autoconf util-macros libtool" -deps="base xorg-server" - -configure() { - CFLAGS="$CFLAGS -Wno-error=incompatible-pointer-types" SYSROOT=${sysroot_dir} ${source_dir}/configure --prefix=${prefix} --host=x86_64-astral --disable-static -} - -build() { - make -j${parallelism} -} - -package() { - make DESTDIR=${dest_dir} install -} diff --git a/recipes/xf86-input-mouse b/recipes/xf86-input-mouse deleted file mode 100644 index fd7f696a..00000000 --- a/recipes/xf86-input-mouse +++ /dev/null @@ -1,18 +0,0 @@ -name=xf86-input-mouse -revision=1 -from_source=xf86-input-mouse -imagedeps="gcc" -hostdeps="xgcc xbinutils pkgconfig automake autoconf util-macros libtool" -deps="base xorg-server" - -configure() { - SYSROOT=${sysroot_dir} ${source_dir}/configure --prefix=${prefix} --host=x86_64-astral --disable-static -} - -build() { - make -j${parallelism} -} - -package() { - make DESTDIR=${dest_dir} install -} diff --git a/source-recipes/xf86-input-keyboard b/source-recipes/xf86-input-keyboard deleted file mode 100644 index 08328879..00000000 --- a/source-recipes/xf86-input-keyboard +++ /dev/null @@ -1,9 +0,0 @@ -name=xf86-input-keyboard -version=2.0.0 -source_method=tarball -tarball_url="https://xorg.freedesktop.org/archive/individual/driver/xf86-input-keyboard-${version}.tar.gz" -tarball_sha512=2243d6b93315c0fdd97e57f62f86fcb26117a512817bfee0a5af76f686d5f8a5c8ea7b3f4e543e2d8ffc8d52129b6b575b9dc2a59e42fa8b23d8ba223544715a -hostdeps="autoconf automake libtool pkgconfig util-macros" -prepare() { - autoreconf -fvi -} diff --git a/source-recipes/xf86-input-mouse b/source-recipes/xf86-input-mouse deleted file mode 100644 index 1d839575..00000000 --- a/source-recipes/xf86-input-mouse +++ /dev/null @@ -1,9 +0,0 @@ -name=xf86-input-mouse -version=1.9.4 -source_method=tarball -tarball_url="https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/archive/xf86-input-mouse-1.9.4/xf86-input-mouse-xf86-input-mouse-1.9.4.tar.gz" -tarball_sha512=50b9c57bac762bbebf644af8f2220b69eb13de99df12e6d69feed93feb86d3f079e809b2f2d0f45514248005b411f6a817b003610470de920f3b92927a9bf8e8 -hostdeps="autoconf automake libtool pkgconfig util-macros" -prepare() { - autoreconf -fvi -}