Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
From eb0e14f8a5c414603b2e882df54b9fec138104ec Mon Sep 17 00:00:00 2001
|
||||
From: Dima Krasner <dima@dimakrasner.com>
|
||||
Date: Wed, 12 Nov 2014 23:06:46 +0200
|
||||
Subject: [PATCH] Added musl support to libgpm and the daemon.
|
||||
|
||||
Upstream: https://github.com/telmich/gpm/commit/d88fb1de5803c366ab62f7de9ee5d83207fb2afe
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
src/daemon/open_console.c | 1 +
|
||||
src/prog/display-buttons.c | 1 +
|
||||
src/prog/display-coords.c | 1 +
|
||||
src/prog/gpm-root.y | 4 ++--
|
||||
4 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/daemon/open_console.c b/src/daemon/open_console.c
|
||||
index 98297c9..4d6c0af 100644
|
||||
--- a/src/daemon/open_console.c
|
||||
+++ b/src/daemon/open_console.c
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <fcntl.h> /* open and co. */
|
||||
#include <sys/stat.h> /* stat() */
|
||||
+#include <sys/types.h> /* major() */
|
||||
#include <sys/ioctl.h> /* ioctl */
|
||||
|
||||
/* Linux specific (to be outsourced in gpm2 */
|
||||
diff --git a/src/prog/display-buttons.c b/src/prog/display-buttons.c
|
||||
index de8e5b2..38d2f11 100644
|
||||
--- a/src/prog/display-buttons.c
|
||||
+++ b/src/prog/display-buttons.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <stdio.h> /* printf() */
|
||||
#include <time.h> /* time() */
|
||||
#include <errno.h> /* errno */
|
||||
+#include <sys/select.h> /* fd_set and FD_* */
|
||||
#include <gpm.h> /* gpm information */
|
||||
|
||||
/* display resulting data */
|
||||
diff --git a/src/prog/display-coords.c b/src/prog/display-coords.c
|
||||
index ed15c8a..411283a 100644
|
||||
--- a/src/prog/display-coords.c
|
||||
+++ b/src/prog/display-coords.c
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <stdio.h> /* printf() */
|
||||
#include <time.h> /* time() */
|
||||
#include <errno.h> /* errno */
|
||||
+#include <sys/select.h> /* fd_set and FD_* */
|
||||
#include <gpm.h> /* gpm information */
|
||||
|
||||
/* display resulting data */
|
||||
diff --git a/src/prog/gpm-root.y b/src/prog/gpm-root.y
|
||||
index 069d801..188ae35 100644
|
||||
--- a/src/prog/gpm-root.y
|
||||
+++ b/src/prog/gpm-root.y
|
||||
@@ -1199,9 +1199,9 @@ int main(int argc, char **argv)
|
||||
#if defined(__GLIBC__)
|
||||
__sigemptyset(&childaction.sa_mask);
|
||||
#else /* __GLIBC__ */
|
||||
- childaction.sa_mask=0;
|
||||
+ sigemptyset(&childaction.sa_mask);
|
||||
#endif /* __GLIBC__ */
|
||||
- childaction.sa_flags=SA_INTERRUPT; /* need to break the select() call */
|
||||
+ childaction.sa_flags=0;
|
||||
sigaction(SIGCHLD,&childaction,NULL);
|
||||
|
||||
/*....................................... Connect and get your buffer */
|
||||
--
|
||||
2.1.0
|
||||
|
||||
39
package/gpm/0002-Install-unversioned-solibrary.patch
Normal file
39
package/gpm/0002-Install-unversioned-solibrary.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
From 06b00d53d8bd513ad5d262dc94a016c6fbf2d3aa Mon Sep 17 00:00:00 2001
|
||||
From: Kamil Rytarowski <n54@gmx.com>
|
||||
Date: Sat, 4 May 2013 01:30:17 +0200
|
||||
Subject: [PATCH] Install unversioned solibrary
|
||||
|
||||
Unversioned solibraries are shipped with -devel packages in Linux
|
||||
distros. Generate and install it for the consistency.
|
||||
|
||||
Upstream: https://github.com/telmich/gpm/commit/06b00d53d8bd513ad5d262dc94a016c6fbf2d3aa
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
---
|
||||
src/Makefile.in | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/Makefile.in b/src/Makefile.in
|
||||
index 6b60ad3..7e9e2ef 100644
|
||||
--- a/src/Makefile.in
|
||||
+++ b/src/Makefile.in
|
||||
@@ -79,7 +79,7 @@ prog/%: prog/%.o
|
||||
# | $(SED) '\''s/\($*\)\.o\([ :]*\)/\1.o \1.lo\2/g'\'' > $(DEPDIR)/$@'
|
||||
|
||||
# Do it all!
|
||||
-all: gpm lib/libgpm.so.@abi_lev@ @LIBGPM_A@ $(PROG)
|
||||
+all: gpm lib/libgpm.so.@abi_lev@ lib/libgpm.so @LIBGPM_A@ $(PROG)
|
||||
|
||||
gpm: $(GOBJ)
|
||||
$(CC) @LDFLAGS@ $(LDFLAGS) -o $@ $(GOBJ) @LIBS@ $(LIBS) -lm
|
||||
@@ -168,9 +168,8 @@ lib/libgpm.so.@abi_full@: $(PICS)
|
||||
@LDFLAGS@ $(LDFLAGS) -o lib/libgpm.so.@abi_full@ $^ @LIBS@ @SHARED_LIBS@ $(LIBS)
|
||||
lib/libgpm.so.@abi_lev@: lib/libgpm.so.@abi_full@
|
||||
$(LN_S) -f libgpm.so.@abi_full@ lib/libgpm.so.@abi_lev@
|
||||
-# unneeded, isn't it?
|
||||
-#lib/libgpm.so: lib/libgpm.so.@abi_full@
|
||||
-# $(LN_S) -f libgpm.so.@abi_full@ lib/libgpm.so
|
||||
+lib/libgpm.so: lib/libgpm.so.@abi_full@
|
||||
+ $(LN_S) -f libgpm.so.@abi_full@ lib/libgpm.so
|
||||
|
||||
include $(DEPFILE)
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 5b83edaa20f6ecf97d16e323be1ed555d8fa2c01 Mon Sep 17 00:00:00 2001
|
||||
From: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
Date: Sat, 20 Feb 2016 17:59:52 +0100
|
||||
Subject: [PATCH] src/Makefile.in: Really install unversioned solibrary
|
||||
|
||||
This commit is a follow-up to
|
||||
https://github.com/telmich/gpm/commit/06b00d53d8bd513ad5d262dc94a016c6fbf2d3aa
|
||||
which created libgpm.so but failed to include it in the install target.
|
||||
|
||||
Upstream: https://github.com/telmich/gpm/pull/11
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
[Dario: make the patch to be applied with fuzz factor 0]
|
||||
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
|
||||
---
|
||||
src/Makefile.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/Makefile.in b/src/Makefile.in
|
||||
index b63e4f4489bd..a1838c300312 100644
|
||||
--- a/src/Makefile.in
|
||||
+++ b/src/Makefile.in
|
||||
@@ -115,6 +115,7 @@ install: check
|
||||
if test "x@SHLIB@" != "x" ; then \
|
||||
$(INSTALL_DATA) -m 644 lib/libgpm.so.@abi_full@ $(libdir)/libgpm.so.@abi_full@ ; \
|
||||
cd $(libdir) && $(LN_S) -f libgpm.so.@abi_full@ libgpm.so.@abi_lev@ ; \
|
||||
+ cd $(libdir) && $(LN_S) -f libgpm.so.@abi_full@ libgpm.so ; \
|
||||
echo "WARNING: We installed a lib, you should now call ldconfig" ; \
|
||||
echo "f.i.: ldconfig -n -l $(libdir)/libgpm.so.@abi_full@" ; \
|
||||
echo "Or to update everything just type ldconfig" ; \
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From fdc42770596e25749f7e2ce0ea97882177397167 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sun, 25 Jun 2017 07:25:33 -0700
|
||||
Subject: [PATCH] Use sigemptyset API instead of __sigemptyset
|
||||
|
||||
__sigemptyset has been removed from glibc public
|
||||
API headers in upcoming (2.26) release onwards
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
Upstream: https://github.com/telmich/gpm/commit/fdc42770596e25749f7e2ce0ea97882177397167
|
||||
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
|
||||
---
|
||||
src/prog/gpm-root.y | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
|
||||
diff --git a/src/prog/gpm-root.y b/src/prog/gpm-root.y
|
||||
index 5126c65..76c896c 100644
|
||||
--- a/src/prog/gpm-root.y
|
||||
+++ b/src/prog/gpm-root.y
|
||||
@@ -1196,11 +1196,7 @@ int main(int argc, char **argv)
|
||||
LOG_DAEMON : LOG_USER);
|
||||
/* reap your zombies */
|
||||
childaction.sa_handler=reap_children;
|
||||
-#if defined(__GLIBC__)
|
||||
- __sigemptyset(&childaction.sa_mask);
|
||||
-#else /* __GLIBC__ */
|
||||
sigemptyset(&childaction.sa_mask);
|
||||
-#endif /* __GLIBC__ */
|
||||
childaction.sa_flags=0;
|
||||
sigaction(SIGCHLD,&childaction,NULL);
|
||||
|
||||
--
|
||||
2.14.2
|
||||
|
||||
33
package/gpm/0005-fix-building-w-newer-glibc.patch
Normal file
33
package/gpm/0005-fix-building-w-newer-glibc.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
From b350aee4ea5785a75cb6ad770f6b768c506ebb70 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Frysinger <vapier@gentoo.org>
|
||||
Date: Mon, 14 Mar 2016 15:39:54 -0400
|
||||
Subject: [PATCH] fix building w/newer glibc
|
||||
|
||||
Linux C libraries are looking to disentangle sysmacros.h from the
|
||||
sys/types.h include, so make sure we pull in the header when it is
|
||||
found.
|
||||
|
||||
Upstream: https://github.com/telmich/gpm/commit/b350aee4ea5785a75cb6ad770f6b768c506ebb70
|
||||
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
|
||||
---
|
||||
src/daemon/open_console.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/daemon/open_console.c b/src/daemon/open_console.c
|
||||
index 4d6c0af..6dd43e6 100644
|
||||
--- a/src/daemon/open_console.c
|
||||
+++ b/src/daemon/open_console.c
|
||||
@@ -24,6 +24,10 @@
|
||||
#include <sys/types.h> /* major() */
|
||||
#include <sys/ioctl.h> /* ioctl */
|
||||
|
||||
+#ifdef HAVE_SYS_SYSMACROS_H
|
||||
+#include <sys/sysmacros.h> /* major() w/newer glibc */
|
||||
+#endif
|
||||
+
|
||||
/* Linux specific (to be outsourced in gpm2 */
|
||||
#include <linux/serial.h> /* for serial console check */
|
||||
#include <asm/ioctls.h> /* for serial console check */
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
From f04f24dd5ca5c1c13608b144ab66e2ccd47f106a Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
Date: Sun, 19 Jan 2020 19:53:41 +0000
|
||||
Subject: [PATCH] src/headers/daemon.h: avoid redefinition of
|
||||
'last_selection_time'
|
||||
|
||||
Noticed build failure on gcc-10 as:
|
||||
|
||||
```
|
||||
gcc -L/home/slyfox/dev/git/gpm/src -o gpm mice.o ... report.o tools.o -lm
|
||||
ld: twiddler.o:gpm/src/headers/daemon.h:183:
|
||||
multiple definition of `last_selection_time'; mice.o:gpm/src/headers/daemon.h:183: first defined here
|
||||
ld: synaptics.o:git/gpm/src/headers/daemon.h:183:
|
||||
multiple definition of `last_selection_time'; mice.o:git/gpm/src/headers/daemon.h:183: first defined here
|
||||
```
|
||||
|
||||
gcc-10 will change the default from -fcommon to fno-common:
|
||||
https://gcc.gnu.org/PR85678.
|
||||
|
||||
The error also happens if CFLAGS=-fno-common passed explicitly.
|
||||
|
||||
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
Upstream: https://github.com/telmich/gpm/commit/f04f24dd5ca5c1c13608b144ab66e2ccd47f106a
|
||||
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
|
||||
---
|
||||
src/headers/daemon.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/headers/daemon.h b/src/headers/daemon.h
|
||||
index a8936ad..24a1a97 100644
|
||||
--- a/src/headers/daemon.h
|
||||
+++ b/src/headers/daemon.h
|
||||
@@ -180,7 +180,7 @@ extern struct mouse_features mouse_table[3],
|
||||
extern Gpm_Type mice[];
|
||||
extern Gpm_Type *repeated_type;
|
||||
|
||||
-time_t last_selection_time;
|
||||
+extern time_t last_selection_time;
|
||||
|
||||
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
||||
27
package/gpm/0007-Add-include-string-h.patch
Normal file
27
package/gpm/0007-Add-include-string-h.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
From 2085cab74a0a84df8b965addf007775a7225c9ec Mon Sep 17 00:00:00 2001
|
||||
From: Kurt Nalty <46026992+kurtnalty@users.noreply.github.com>
|
||||
Date: Sat, 29 Dec 2018 23:47:17 -0600
|
||||
Subject: [PATCH] Add include <string.h>
|
||||
|
||||
Added
|
||||
line 28, #include <string.h> /* strcpy, bzero */
|
||||
for musl compilation
|
||||
|
||||
Upstream: https://github.com/telmich/gpm/commit/2085cab74a0a84df8b965addf007775a7225c9ec
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
src/daemon/old_main.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/daemon/old_main.c b/src/daemon/old_main.c
|
||||
index 2581e26..ab7a87f 100644
|
||||
--- a/src/daemon/old_main.c
|
||||
+++ b/src/daemon/old_main.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <signal.h> /* guess again */
|
||||
#include <errno.h> /* guess again */
|
||||
#include <unistd.h> /* unlink */
|
||||
+#include <string.h> /* strcpy, bzero */
|
||||
#include <sys/stat.h> /* chmod */
|
||||
|
||||
#include <linux/kd.h> /* linux hd* */
|
||||
@@ -0,0 +1,236 @@
|
||||
From 436f3f0a75a42dc9e07f2fe85b73eeb4c95e0515 Mon Sep 17 00:00:00 2001
|
||||
From: NHOrus <jy6x2b32pie9@yahoo.com>
|
||||
Date: Tue, 11 Feb 2025 18:42:47 +0400
|
||||
Subject: [PATCH] Avoid shadowing ncurses functions. This fails with GCC-15 and
|
||||
other compilers implementing C23 Added prefix gpm_ to raw() and noraw() used
|
||||
in two files because they are implemented in same two files, and are static.
|
||||
Same with scr_dump() and src_restore() in yacc source file
|
||||
|
||||
Upstream: https://github.com/telmich/gpm/pull/49
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
---
|
||||
src/prog/gpm-root.y | 10 +++++-----
|
||||
src/prog/hltest.c | 11 +++++------
|
||||
src/prog/mouse-test.c | 24 ++++++++++++------------
|
||||
3 files changed, 22 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/src/prog/gpm-root.y b/src/prog/gpm-root.y
|
||||
index d3d064c..7001d6e 100644
|
||||
--- a/src/prog/gpm-root.y
|
||||
+++ b/src/prog/gpm-root.y
|
||||
@@ -939,7 +939,7 @@ static unsigned short clear_sel_args[6]={0, 0,0, 0,0, 4};
|
||||
static unsigned char *clear_sel_arg= (unsigned char *)clear_sel_args+1;
|
||||
|
||||
/*------------*/
|
||||
-static inline void scr_dump(int fd, FILE *f, unsigned char *buffer, int vc)
|
||||
+static inline void gpm_scr_dump(int fd, FILE *f, unsigned char *buffer, int vc)
|
||||
{
|
||||
int dumpfd;
|
||||
char dumpname[20];
|
||||
@@ -958,7 +958,7 @@ static inline void scr_dump(int fd, FILE *f, unsigned char *buffer, int vc)
|
||||
}
|
||||
|
||||
/*------------*/
|
||||
-static inline void scr_restore(int fd, FILE *f, unsigned char *buffer, int vc)
|
||||
+static inline void gpm_scr_restore(int fd, FILE *f, unsigned char *buffer, int vc)
|
||||
{
|
||||
int x,y, dumpfd;
|
||||
char dumpname[20];
|
||||
@@ -1002,7 +1002,7 @@ Posted *postmenu(int fd, FILE *f, Draw *draw, int x, int y, int console)
|
||||
if (!new) return NULL;
|
||||
new->draw=draw;
|
||||
new->dump=dump=malloc(opt_buf);
|
||||
- scr_dump(fd,f,dump,console);
|
||||
+ gpm_scr_dump(fd,f,dump,console);
|
||||
lines=dump[0]; columns=dump[1];
|
||||
i=(columns*dump[3]+dump[2])*2+1; /* where to get it */
|
||||
if (i<0) i=1;
|
||||
@@ -1060,7 +1060,7 @@ Posted *postmenu(int fd, FILE *f, Draw *draw, int x, int y, int console)
|
||||
for (i=0; i<draw->width; i++) PUTC(HORLINE,draw->bord,draw->back);
|
||||
PUTC(LRCORNER,draw->bord,draw->back);
|
||||
|
||||
- scr_restore(fd,f,dump,console);
|
||||
+ gpm_scr_restore(fd,f,dump,console);
|
||||
free(dump);
|
||||
|
||||
#undef PUTC
|
||||
@@ -1077,7 +1077,7 @@ Posted *unpostmenu(int fd, FILE *f, Posted *which, int vc)
|
||||
{
|
||||
Posted *prev=which->prev;
|
||||
|
||||
- scr_restore(fd,f,which->dump, vc);
|
||||
+ gpm_scr_restore(fd,f,which->dump, vc);
|
||||
ioctl(fd,TCXONC,TCOON); /* activate the console */
|
||||
free(which->dump);
|
||||
free(which);
|
||||
diff --git a/src/prog/hltest.c b/src/prog/hltest.c
|
||||
index cce0abc..a916873 100644
|
||||
--- a/src/prog/hltest.c
|
||||
+++ b/src/prog/hltest.c
|
||||
@@ -80,7 +80,6 @@ int wid,hei,vcsize;
|
||||
unsigned short clear_sel_args[6]={0, 0,0, 0,0, 4};
|
||||
unsigned char *clear_sel_arg= (unsigned char *)clear_sel_args+1;
|
||||
|
||||
-
|
||||
static inline int scrdump(char *buf)
|
||||
{
|
||||
clear_sel_arg[0]=2; /* clear_selection */
|
||||
@@ -99,7 +98,7 @@ static inline int scrrestore(char *buf)
|
||||
|
||||
|
||||
/* I don't like curses, so I'm doing low level stuff here */
|
||||
-static void raw(void)
|
||||
+static void gpm_raw(void)
|
||||
{
|
||||
struct termios it;
|
||||
|
||||
@@ -115,7 +114,7 @@ tcsetattr(fileno(stdin),TCSANOW,&it);
|
||||
|
||||
}
|
||||
|
||||
-static void noraw(void)
|
||||
+static void gpm_noraw(void)
|
||||
{
|
||||
struct termios it;
|
||||
|
||||
@@ -136,7 +135,7 @@ void killed(int signo)
|
||||
{
|
||||
CLEAR;
|
||||
fprintf(stderr,"hltest: killed by signal %i\r\n",signo);
|
||||
- noraw();
|
||||
+ gpm_noraw();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -525,7 +524,7 @@ int main(int argc, char **argv)
|
||||
gpm_roi_handler=xhandler;
|
||||
gpm_roi_data=NULL;
|
||||
|
||||
- raw();
|
||||
+ gpm_raw();
|
||||
newmsg(0,NULL); /* init data structures */
|
||||
while((c=Gpm_Getchar())!=EOF) {
|
||||
char s[32];
|
||||
@@ -538,6 +537,6 @@ int main(int argc, char **argv)
|
||||
newmsg(roi ? ((WinInfo *)roi->clientdata)->number : 0,s);
|
||||
}
|
||||
|
||||
- noraw();
|
||||
+ gpm_noraw();
|
||||
exit(0);
|
||||
}
|
||||
diff --git a/src/prog/mouse-test.c b/src/prog/mouse-test.c
|
||||
index 0bb1982..7235bba 100644
|
||||
--- a/src/prog/mouse-test.c
|
||||
+++ b/src/prog/mouse-test.c
|
||||
@@ -106,7 +106,7 @@ return 0;
|
||||
/*-----------------------------------------------------------------------------
|
||||
Place the description here.
|
||||
-----------------------------------------------------------------------------*/
|
||||
-static void raw(void)
|
||||
+static void gpm_raw(void)
|
||||
{
|
||||
struct termios it;
|
||||
|
||||
@@ -125,7 +125,7 @@ static void raw(void)
|
||||
/*-----------------------------------------------------------------------------
|
||||
Place the description here.
|
||||
-----------------------------------------------------------------------------*/
|
||||
-static void noraw(void)
|
||||
+static void gpm_noraw(void)
|
||||
{
|
||||
struct termios it;
|
||||
|
||||
@@ -144,7 +144,7 @@ static void noraw(void)
|
||||
void killed(int signo)
|
||||
{
|
||||
fprintf(stderr,"mouse-test: killed by signal %i\r\n",signo);
|
||||
- noraw();
|
||||
+ gpm_noraw();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ int mousereopen(int oldfd, char *name, Gpm_Type *type)
|
||||
|
||||
int noneofthem(void)
|
||||
{
|
||||
- noraw();
|
||||
+ gpm_noraw();
|
||||
printf("\n\nSomething went wrong, I didn't manage to detect your"
|
||||
"protocol\n\nFeel free to report your problems to the author\n");
|
||||
exit(1);
|
||||
@@ -336,7 +336,7 @@ int main(int argc, char **argv)
|
||||
I_serial=mice->init; /* the first one has I_serial */
|
||||
|
||||
signal(SIGINT,killed); /* control-C kills us */
|
||||
- raw();
|
||||
+ gpm_raw();
|
||||
|
||||
/*====================================== First of all, detect the device */
|
||||
|
||||
@@ -568,7 +568,7 @@ int main(int argc, char **argv)
|
||||
/* why checking and not using return value ??? */
|
||||
CHECKFAIL(typecount);
|
||||
if (typecount==1) {
|
||||
- noraw();
|
||||
+ gpm_noraw();
|
||||
printf("\n\n\nWell, it seems like your mouse is already detected:\n"
|
||||
"it is on the device \"%s\", and speaks the protocol \"%s\"\n",
|
||||
mousename,list->this->name);
|
||||
@@ -587,7 +587,7 @@ int main(int argc, char **argv)
|
||||
} while(i!='y' && i!='n');
|
||||
|
||||
if (i=='n') {
|
||||
- noraw();
|
||||
+ gpm_noraw();
|
||||
printf("\nThen, you should use the \"bare\" protocol on \"%s\"\n",
|
||||
mousename);
|
||||
exit(0);
|
||||
@@ -634,7 +634,7 @@ int main(int argc, char **argv)
|
||||
for (pending=0,i=0;i<got-16;i++)
|
||||
if(!memcmp(buf+i,buf+i+8,8)) pending++;
|
||||
if (pending > 3) {
|
||||
- noraw();
|
||||
+ gpm_noraw();
|
||||
printf("\nYour mouse seems to be a 'mman' one on \"%s\" (%i matches)\n",
|
||||
mousename,pending);
|
||||
exit(0);
|
||||
@@ -660,7 +660,7 @@ int main(int argc, char **argv)
|
||||
continue;
|
||||
}
|
||||
if (pending>3) {
|
||||
- noraw();
|
||||
+ gpm_noraw();
|
||||
printf("\nYour mouse seems to be a '%s' one on \"%s\" (%i matches)\n",
|
||||
cur->this->name,mousename,pending);
|
||||
exit(0);
|
||||
@@ -695,7 +695,7 @@ int main(int argc, char **argv)
|
||||
for (pending=0,i=0;i<got-20;i++)
|
||||
if(!memcmp(buf+i,buf+i+10,10)) pending++;
|
||||
if (pending>3) {
|
||||
- noraw();
|
||||
+ gpm_noraw();
|
||||
printf("\nYour mouse becomes a 3-buttons ('-t msc') one when\n"
|
||||
"gpm gets '-o %s' on it command line, and X gets\n"
|
||||
"%s in XF86Config\nThe device is \"%s\"",
|
||||
@@ -726,7 +726,7 @@ int main(int argc, char **argv)
|
||||
for (pending=0,i=0;i<got-20;i++)
|
||||
if(!memcmp(buf+i,buf+i+10,10)) pending++;
|
||||
if (pending>3) {
|
||||
- noraw();
|
||||
+ gpm_noraw();
|
||||
printf("\nWorked. You should keep the button pressed every time the\n"
|
||||
"computer boots, and run gpm in '-R' mode in order to ignore\n"
|
||||
"such hassle when starting X\n\nStill better, but a better mouse\n"
|
||||
@@ -734,7 +734,7 @@ int main(int argc, char **argv)
|
||||
|
||||
exit(0);
|
||||
}
|
||||
- noraw();
|
||||
+ gpm_noraw();
|
||||
printf("\nI'm lost. Can't tell you how to use your middle button\n");
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
From 4e3d358da1c6066d7a320ffc157ca9e35ed34e49 Mon Sep 17 00:00:00 2001
|
||||
From: NHOrus <jy6x2b32pie9@yahoo.com>
|
||||
Date: Tue, 11 Feb 2025 19:01:48 +0400
|
||||
Subject: [PATCH] Fix function definition in yacc source file until valid C23.
|
||||
Fill empty argument lists with values. Add 0 as third argument for
|
||||
two-argument function, it will be ignored at call site.
|
||||
|
||||
Upstream: https://github.com/telmich/gpm/pull/49
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
---
|
||||
src/prog/gpm-root.y | 14 +++++++-------
|
||||
1 file changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/prog/gpm-root.y b/src/prog/gpm-root.y
|
||||
index 7001d6e..56072ac 100644
|
||||
--- a/src/prog/gpm-root.y
|
||||
+++ b/src/prog/gpm-root.y
|
||||
@@ -128,7 +128,7 @@ typedef struct DrawItem {
|
||||
char *name;
|
||||
char *arg; /* a cmd string */
|
||||
void *clientdata; /* a (Draw *) for menus or whatever */
|
||||
- int (*fun)();
|
||||
+ int (*fun)(int, struct DrawItem *, int);
|
||||
struct DrawItem *next;
|
||||
} DrawItem;
|
||||
|
||||
@@ -159,7 +159,7 @@ int yyerror(char *s);
|
||||
int yylex(void);
|
||||
|
||||
DrawItem *cfg_cat(DrawItem *, DrawItem *);
|
||||
-DrawItem *cfg_makeitem(int mode, char *msg, int(*fun)(), void *detail);
|
||||
+DrawItem *cfg_makeitem(int mode, char *msg, int(*fun)(int, DrawItem *, int), void *detail);
|
||||
|
||||
|
||||
/*===================================================================*
|
||||
@@ -195,7 +195,7 @@ int f_pipe(int mode, DrawItem *self, int uid);
|
||||
char *string;
|
||||
Draw *draw;
|
||||
DrawItem *item;
|
||||
- int (*fun)();
|
||||
+ int (*fun)(int, DrawItem *, int);
|
||||
}
|
||||
|
||||
%token <string> T_STRING
|
||||
@@ -284,7 +284,7 @@ struct tokenName tokenList[] = {
|
||||
struct funcName {
|
||||
char *name;
|
||||
int token;
|
||||
- int (*fun)();
|
||||
+ int (*fun)(int, DrawItem *, int);
|
||||
};
|
||||
struct funcName funcList[] = {
|
||||
{"f.debug",T_FUNC,f_debug},
|
||||
@@ -390,7 +390,7 @@ Draw *cfg_alloc(void)
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* malloc an empty DrawItem and fill it */
|
||||
-DrawItem *cfg_makeitem(int mode, char *msg, int(*fun)(), void *detail)
|
||||
+DrawItem *cfg_makeitem(int mode, char *msg, int(*fun)(int, DrawItem *, int), void *detail)
|
||||
{
|
||||
DrawItem *new=calloc(1,sizeof(DrawItem));
|
||||
|
||||
@@ -405,7 +405,7 @@ DrawItem *cfg_makeitem(int mode, char *msg, int(*fun)(), void *detail)
|
||||
|
||||
case 'F': /* a function without args */
|
||||
new->fun=fun;
|
||||
- if (fun) fun(F_CREATE,new);
|
||||
+ if (fun) fun(F_CREATE,new,0);
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
@@ -1047,7 +1047,7 @@ Posted *postmenu(int fd, FILE *f, Draw *draw, int x, int y, int console)
|
||||
}
|
||||
/* sides and items */
|
||||
for (item=draw->menu; y++, item; item=item->next) {
|
||||
- if (item->fun) (*(item->fun))(F_POST,item);
|
||||
+ if (item->fun) (*(item->fun))(F_POST,item,0);
|
||||
GOTO(x,y); PUTC(VERLINE,draw->bord,draw->back);
|
||||
for (i=0;i<item->pad;i++) PUTC(' ',draw->fore,draw->back);
|
||||
PUTS(item->name,draw->fore,draw->back); i+=strlen(item->name);
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From d6d5168713b1513dc2a780d21bb33dcf16a7a518 Mon Sep 17 00:00:00 2001
|
||||
From: NHOrus <jy6x2b32pie9@yahoo.com>
|
||||
Date: Sat, 22 Feb 2025 01:12:32 +0400
|
||||
Subject: [PATCH] Add incomplete type definition for WINDOW in Gpm_Wgetch()
|
||||
|
||||
Window handle is an opaque pointer that Gpm_Wgetch() passes
|
||||
through straight to ncurses if it's not null and calls getch
|
||||
if it's null. Code doesn't care what's inside the handle
|
||||
as long as it agrees with curses definition.
|
||||
|
||||
Upstream: https://github.com/telmich/gpm/pull/49
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
---
|
||||
src/headers/gpm.h | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/headers/gpm.h b/src/headers/gpm.h
|
||||
index 57dc618..6c53fbf 100644
|
||||
--- a/src/headers/gpm.h
|
||||
+++ b/src/headers/gpm.h
|
||||
@@ -268,7 +268,14 @@ Gpm_Roi * Gpm_LowerRoi(Gpm_Roi *which, Gpm_Roi *after);
|
||||
/* libcurses.c */
|
||||
/* #include <curses.h> Hmm... seems risky */
|
||||
|
||||
-extern int Gpm_Wgetch();
|
||||
+/* Window handle is an opaque pointer that Gpm_Wgetch()
|
||||
+ * passes through to ncurses if it's not null and calls getch
|
||||
+ * if it's null. Code doesn't care what's inside the handle
|
||||
+ * as long as it agrees with curses definition.
|
||||
+*/
|
||||
+typedef struct _win_st WINDOW;
|
||||
+
|
||||
+extern int Gpm_Wgetch(WINDOW *);
|
||||
#define Gpm_Getch() (Gpm_Wgetch(NULL))
|
||||
|
||||
/* libxtra.c */
|
||||
--
|
||||
2.50.1
|
||||
|
||||
26
package/gpm/Config.in
Normal file
26
package/gpm/Config.in
Normal file
@@ -0,0 +1,26 @@
|
||||
config BR2_PACKAGE_GPM
|
||||
bool "gpm"
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_USE_MMU # fork()
|
||||
help
|
||||
"gpm" means general purpose mouse (server) and provides mouse
|
||||
support for Linux virtual consoles.
|
||||
gpm-root (to draw menus in current virtual console; config
|
||||
file in /etc/gpm-root.conf) and disable-paste (to disable
|
||||
paste buffer for security reasons), will also be installed.
|
||||
|
||||
http://www.nico.schottelius.org/software/gpm/
|
||||
|
||||
if BR2_PACKAGE_GPM
|
||||
|
||||
config BR2_PACKAGE_GPM_INSTALL_TEST_TOOLS
|
||||
bool "install test tools"
|
||||
help
|
||||
Install gpm test tools (get-versions, mev, hltest, mouse-test,
|
||||
display-buttons & display-coords).
|
||||
|
||||
endif
|
||||
|
||||
comment "gpm mouse server needs a toolchain w/ dynamic library"
|
||||
depends on BR2_STATIC_LIBS
|
||||
depends on BR2_USE_MMU
|
||||
3
package/gpm/gpm.hash
Normal file
3
package/gpm/gpm.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally computed:
|
||||
sha256 a955053b36556ffa7c628ce18fd6de7d625966573fa412fb08869533d8f7385c gpm-1.20.7.tar.lzma
|
||||
sha256 1b2a567f289f66a143c56353e7b3d4fa5862514a5e3c5cfdf8b02ee5e5aaa953 COPYING
|
||||
72
package/gpm/gpm.mk
Normal file
72
package/gpm/gpm.mk
Normal file
@@ -0,0 +1,72 @@
|
||||
################################################################################
|
||||
#
|
||||
# gpm
|
||||
#
|
||||
################################################################################
|
||||
|
||||
GPM_VERSION = 1.20.7
|
||||
GPM_SOURCE = gpm-$(GPM_VERSION).tar.lzma
|
||||
GPM_SITE = http://www.nico.schottelius.org/software/gpm/archives
|
||||
GPM_LICENSE = GPL-2.0+
|
||||
GPM_LICENSE_FILES = COPYING
|
||||
GPM_SELINUX_MODULES = gpm
|
||||
GPM_INSTALL_STAGING = YES
|
||||
GPM_DEPENDENCIES = host-bison
|
||||
|
||||
# if not already installed in staging dir, gpm Makefile may fail to find some
|
||||
# of the headers needed to generate build dependencies, the first time it is
|
||||
# built. CPPFLAGS is used to pass the right include path to dependency rules.
|
||||
GPM_CONF_ENV = \
|
||||
CPPFLAGS="$(TARGET_CPPFLAGS) -I$(@D)/src/headers/" \
|
||||
ac_cv_path_emacs=no
|
||||
|
||||
# For some reason, Microblaze gcc does not define __ELF__, which gpm
|
||||
# configure script uses to determine whether the architecture uses ELF
|
||||
# binaries and therefore can build shared libraries. We fix this by
|
||||
# telling GPM that ELF is used on Microblaze.
|
||||
ifeq ($(BR2_microblaze),y)
|
||||
GPM_CONF_ENV += itz_cv_sys_elf=yes
|
||||
endif
|
||||
|
||||
# gpm and ncurses have a circular dependency. As gpm function GPM_Wgetch()
|
||||
# (requiring ncurses) is not recommended for use by ncurses people themselves
|
||||
# and as it's better to have gpm support in ncurses that the contrary, we force
|
||||
# gpm to not look after ncurses explicitly.
|
||||
# http://invisible-island.net/ncurses/ncurses.faq.html#using_gpm_lib
|
||||
GPM_CONF_OPTS = --without-curses
|
||||
|
||||
# configure is missing but gpm seems not compatible with our autoreconf
|
||||
# mechanism so we have to do it manually instead of using GPM_AUTORECONF = YES
|
||||
define GPM_RUN_AUTOGEN
|
||||
cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
|
||||
endef
|
||||
GPM_PRE_CONFIGURE_HOOKS += GPM_RUN_AUTOGEN
|
||||
|
||||
GPM_DEPENDENCIES += host-automake host-autoconf host-libtool
|
||||
|
||||
# gpm tries to build/install .info doc even if makeinfo isn't installed on the
|
||||
# host, so we have to disable global doc installation to prevent autobuild
|
||||
# errors.
|
||||
define GPM_DISABLE_DOC_INSTALL
|
||||
$(SED) 's/SUBDIRS = src doc contrib/SUBDIRS = src contrib/' \
|
||||
$(@D)/Makefile.in
|
||||
endef
|
||||
GPM_POST_PATCH_HOOKS += GPM_DISABLE_DOC_INSTALL
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GPM_INSTALL_TEST_TOOLS),)
|
||||
define GPM_REMOVE_TEST_TOOLS_FROM_TARGET
|
||||
for tools in mev hltest mouse-test display-buttons \
|
||||
get-versions display-coords; do \
|
||||
rm -f $(TARGET_DIR)/usr/bin/$$tools ; \
|
||||
done
|
||||
endef
|
||||
GPM_POST_INSTALL_TARGET_HOOKS += GPM_REMOVE_TEST_TOOLS_FROM_TARGET
|
||||
endif
|
||||
|
||||
define GPM_INSTALL_GPM_ROOT_CONF_ON_TARGET
|
||||
$(INSTALL) -m 0644 -D $(@D)/conf/gpm-root.conf $(TARGET_DIR)/etc/
|
||||
endef
|
||||
|
||||
GPM_POST_INSTALL_TARGET_HOOKS += GPM_INSTALL_GPM_ROOT_CONF_ON_TARGET
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user