[packages/xorg-driver-input-hyperpen] Rel 12
arekm
arekm at pld-linux.org
Sun Mar 15 12:45:24 CET 2026
commit 6a323137bdf75cc96f75f08434a0dda13a34a426
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sun Mar 15 12:45:17 2026 +0100
Rel 12
xorg-driver-input-hyperpen-write-result.patch | 101 ++++++++++++++++++++++++++
xorg-driver-input-hyperpen.spec | 4 +-
2 files changed, 104 insertions(+), 1 deletion(-)
---
diff --git a/xorg-driver-input-hyperpen.spec b/xorg-driver-input-hyperpen.spec
index c9fea23..b946b4f 100644
--- a/xorg-driver-input-hyperpen.spec
+++ b/xorg-driver-input-hyperpen.spec
@@ -2,12 +2,13 @@ Summary: X.org input driver for Aiptek HyperPen devices
Summary(pl.UTF-8): Sterownik wejściowy X.org dla urządzeń Aiptek HyperPen
Name: xorg-driver-input-hyperpen
Version: 1.4.1
-Release: 11
+Release: 12
License: MIT
Group: X11/Applications
Source0: http://xorg.freedesktop.org/releases/individual/driver/xf86-input-hyperpen-%{version}.tar.bz2
# Source0-md5: 75dc36477a291f8c2f7c808ab78a400a
Patch0: am.patch
+Patch1: %{name}-write-result.patch
URL: http://xorg.freedesktop.org/
BuildRequires: autoconf >= 2.57
BuildRequires: automake
@@ -33,6 +34,7 @@ Aiptek HyperPen 6000.
%prep
%setup -q -n xf86-input-hyperpen-%{version}
%patch -P0 -p1
+%patch -P1 -p1
%build
%{__libtoolize}
diff --git a/xorg-driver-input-hyperpen-write-result.patch b/xorg-driver-input-hyperpen-write-result.patch
new file mode 100644
index 0000000..136dadb
--- /dev/null
+++ b/xorg-driver-input-hyperpen-write-result.patch
@@ -0,0 +1,101 @@
+--- a/src/xf86HyperPen.c 2026-03-15 11:44:48.405254400 +0100
++++ b/src/xf86HyperPen.c 2026-03-15 12:00:56.796564893 +0100
+@@ -66,7 +66,7 @@
+ * read a full packet before returning
+ */
+
+-static char *default_options[] = {
++static const char *default_options[] = {
+ "BaudRate", "9600",
+ "DataBits", "8",
+ "StopBits", "1",
+@@ -113,7 +113,7 @@
+ int stylus;
+
+ typedef struct {
+- char *hypDevice; /* device file name */
++ const char *hypDevice; /* device file name */
+ int hypButTrans; /* button translation flags */
+ int hypOldX; /* previous X position */
+ int hypOldY; /* previous Y position */
+@@ -212,7 +212,7 @@
+ SYSCALL(len = read(pInfo->fd, buffer, sizeof(buffer)));
+
+ if (len <= 0) {
+- Error("error reading HyperPen device");
++ xf86Msg(X_ERROR, "error reading HyperPen device: %s\n", strerror(errno));
+ return;
+ }
+
+@@ -372,14 +372,14 @@
+
+ SYSCALL(err = write(fd, data, strlen(data)));
+ if (err == -1) {
+- Error("HyperPen write");
++ xf86Msg(X_ERROR, "HyperPen write: %s\n", strerror(errno));
+ return NULL;
+ }
+
+ while (numread < len) {
+ err = xf86WaitForInput(fd, 100000);
+ if (err == -1) {
+- Error("HyperPen select");
++ xf86Msg(X_ERROR, "HyperPen select: %s\n", strerror(errno));
+ return NULL;
+ }
+ if (!err) {
+@@ -389,7 +389,7 @@
+
+ SYSCALL(err = read(fd, buffer + numread++, 1));
+ if (err == -1) {
+- Error("HyperPen read");
++ xf86Msg(X_ERROR, "HyperPen read: %s\n", strerror(errno));
+ return NULL;
+ }
+ if (!err) {
+@@ -431,7 +431,7 @@
+
+ pInfo->fd = xf86OpenSerial(pInfo->options);
+ if (pInfo->fd == -1) {
+- Error(priv->hypDevice);
++ xf86Msg(X_ERROR, "%s: %s\n", priv->hypDevice, strerror(errno));
+ return !Success;
+ }
+ DBG(2, ErrorF("%s opened as fd %d\n", priv->hypDevice, pInfo->fd));
+@@ -443,13 +443,16 @@
+
+ /* Send reset to the tablet */
+
+- write(pInfo->fd, SS_RESET, strlen(SS_RESET));
++ SYSCALL(err = write(pInfo->fd, SS_RESET, strlen(SS_RESET)));
++ if (err == -1) {
++ xf86Msg(X_ERROR, "HyperPen write: %s\n", strerror(errno));
++ }
+ WAIT(1000);
+
+ /* Put it in prompt mode so it doesn't say anything before we're ready */
+ SYSCALL(err = write(pInfo->fd, SS_PROMPT_MODE, strlen(SS_PROMPT_MODE)));
+ if (err == -1) {
+- Error("HyperPen write");
++ xf86Msg(X_ERROR, "HyperPen write: %s\n", strerror(errno));
+ return !Success;
+ }
+ /* Clear any pending input */
+@@ -578,7 +581,7 @@
+ SYSCALL(err = write(pInfo->fd, buffer, idx));
+
+ if (err == -1) {
+- Error("HyperPen write");
++ xf86Msg(X_ERROR, "HyperPen write: %s\n", strerror(errno));
+ return !Success;
+ }
+
+@@ -819,7 +822,7 @@
+ int flags)
+ {
+ HyperPenDevicePtr priv = malloc(sizeof(HyperPenDeviceRec));
+- char *s;
++ const char *s;
+ int rc = Success;
+
+ if (!priv) {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xorg-driver-input-hyperpen.git/commitdiff/6a323137bdf75cc96f75f08434a0dda13a34a426
More information about the pld-cvs-commit
mailing list