gpm: new port

This commit is contained in:
Danny Rawlins 2008-01-02 17:04:33 +11:00
parent a75345cf84
commit b543c2a03c
7 changed files with 146 additions and 0 deletions

27
gpm/.footprint Normal file
View File

@ -0,0 +1,27 @@
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/rc.d/
-rwxr-xr-x root/root etc/rc.d/gpm
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/disable-paste
-rwxr-xr-x root/root usr/bin/gpm-root
-rwxr-xr-x root/root usr/bin/hltest
-rwxr-xr-x root/root usr/bin/mev
-rwxr-xr-x root/root usr/bin/mouse-test
drwxr-xr-x root/root usr/include/
-rw-r--r-- root/root usr/include/gpm.h
drwxr-xr-x root/root usr/lib/
-rw-r--r-- root/root usr/lib/libgpm.a
lrwxrwxrwx root/root usr/lib/libgpm.so -> libgpm.so.1.19.0
-rwxr-xr-x root/root usr/lib/libgpm.so.1.19.0
drwxr-xr-x root/root usr/man/
drwxr-xr-x root/root usr/man/man1/
-rw-r--r-- root/root usr/man/man1/gpm-root.1.gz
-rw-r--r-- root/root usr/man/man1/mev.1.gz
-rw-r--r-- root/root usr/man/man1/mouse-test.1.gz
drwxr-xr-x root/root usr/man/man7/
-rw-r--r-- root/root usr/man/man7/gpm-types.7.gz
drwxr-xr-x root/root usr/man/man8/
-rw-r--r-- root/root usr/man/man8/gpm.8.gz
drwxr-xr-x root/root usr/sbin/
-rwxr-xr-x root/root usr/sbin/gpm

5
gpm/.md5sum Normal file
View File

@ -0,0 +1,5 @@
503d4925b891ce0133f0acd3e925bcbe gpm-1.20.1-liblow-segv.patch
68fcdfbcca069516ea181c8b8946bc9f gpm-1.20.1-no-dumb-error-messages.patch
0b999233f10c0ee52a71cee27b1a057b gpm-1.20.1-nodebug.patch
2c63e827d755527950d9d13fe3d87692 gpm-1.20.1.tar.bz2
e8160a72365d3c79064ff76fbb7bfc70 gpm.rc

47
gpm/Pkgfile Normal file
View File

@ -0,0 +1,47 @@
# Description: Console mouse server.
# URL: http://unix.schottelius.org/gpm/
# Maintainer: Danny Rawlins, romster at shortcircuit dot net dot au
# Packager: Han Boetes, han at mijncomputer dot nl
name=gpm
version=1.20.1
release=1
source=(http://unix.schottelius.org/gpm/archives/gpm-$version.tar.bz2 \
gpm-$version-nodebug.patch \
gpm-$version-no-dumb-error-messages.patch \
gpm-$version-liblow-segv.patch \
gpm.rc)
build() {
cd gpm-$version
sed -i \
-e 's/^MAKEINFO.*/MAKEINFO = no/' \
-e '/^EMACS.*/d' Makefile.include.in
# emacs gpm support is included in emacs. xterm-mouse-mode
sed -i \
-e 's/EMACS=.*/EMACS=:/' \
-e 's/ELISP=.*/ELISP=/' configure
patch -p1 -i $SRC/gpm-$version-nodebug.patch
patch -p1 -i $SRC/gpm-$version-no-dumb-error-messages.patch
patch -p1 -i $SRC/gpm-$version-liblow-segv.patch
./configure --prefix=/usr
make LDFLAGS='-lm'
make ROOT=$PKG install
install -D -m 0755 $SRC/gpm.rc $PKG/etc/rc.d/gpm
chmod 0755 $PKG/usr/lib/libgpm.so.*.*.*
rm -r $PKG/usr/etc
if pkginfo -i |grep '^texinfo ' > /dev/null; then
rm -r $PKG/usr/info
fi
}

View File

@ -0,0 +1,12 @@
--- gpm-1.20.1/src/lib/liblow.c.orig 2002-12-24 23:57:16.000000000 +0100
+++ gpm-1.20.1/src/lib/liblow.c 2004-08-19 04:02:13.834170632 +0200
@@ -199,7 +199,8 @@
Gpm_Stst *new = NULL;
char* sock_name = 0;
- option.consolename = NULL;
+ if(!checked_con)
+ option.consolename = NULL;
gpm_report(GPM_PR_DEBUG,"VC: %d",flag);

View File

@ -0,0 +1,20 @@
--- gpm-1.20.1/src/lib/liblow.c.no-dumb-error-messages 2003-07-07 15:42:18.000000000 +0200
+++ gpm-1.20.1/src/lib/liblow.c 2003-07-07 16:33:33.000000000 +0200
@@ -259,7 +259,7 @@ int Gpm_Open(Gpm_Connect *conn, int flag
/* do we really need this check ? */
if(strncmp(tty,option.consolename,strlen(option.consolename)-1)
|| !isdigit(tty[strlen(option.consolename)-1])) {
- gpm_report(GPM_PR_ERR,"strncmp/isdigit/option.consolename failed");
+ /* gpm_report(GPM_PR_ERR,"strncmp/isdigit/option.consolename failed"); */
goto err;
}
@@ -368,7 +368,7 @@ int Gpm_Open(Gpm_Connect *conn, int flag
/*....................................... Error: free all memory */
err:
- gpm_report(GPM_PR_ERR,"Oh, oh, it's an error! possibly I die! ");
+ /* gpm_report(GPM_PR_ERR,"Oh, oh, it's an error! possibly I die! "); */
do {
new=gpm_stack->next;
free(gpm_stack);

View File

@ -0,0 +1,14 @@
--- gpm-1.20.0/src/lib/report-lib.c.foo Wed Mar 27 17:13:24 2002
+++ gpm-1.20.0/src/lib/report-lib.c Wed Mar 27 17:14:08 2002
@@ -27,6 +27,11 @@
{
char *string = NULL;
va_list ap;
+#ifndef DEBUG_VERBOSE
+ if(stat==GPM_STAT_DEBUG)
+ return;
+#endif
+
va_start(ap,text);
switch(stat) {

21
gpm/gpm.rc Normal file
View File

@ -0,0 +1,21 @@
#!/bin/sh
#
# /etc/rc.d/gpm: start/stop console mouse
#
case $1 in
start)
/usr/sbin/gpm -m /dev/input/mouse0 -t ps2
;;
stop)
pkill -f 'gpm -m /dev/input/mouse0'
;;
restart)
pkill -HUP -f 'gpm -m /dev/input/mouse0'
;;
*)
echo "usage: $0 [start|stop|restart]"
;;
esac
# End of file