From stephen@cauchy.math.missouri.edu  Fri Jan 12 19:37:38 2001
Return-Path: <stephen@cauchy.math.missouri.edu>
Received: from cauchy.math.missouri.edu (cauchy.math.missouri.edu [128.206.49.166])
	by hub.freebsd.org (Postfix) with ESMTP id 738FA37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 12 Jan 2001 19:37:38 -0800 (PST)
Received: (from stephen@localhost)
	by cauchy.math.missouri.edu (8.11.1/8.11.1) id f0D3bbE40459;
	Fri, 12 Jan 2001 21:37:37 -0600 (CST)
	(envelope-from stephen)
Message-Id: <200101130337.f0D3bbE40459@cauchy.math.missouri.edu>
Date: Fri, 12 Jan 2001 21:37:37 -0600 (CST)
From: Stephen Montgomery-Smith <stephen@cauchy.math.missouri.edu>
Reply-To: stephen@math.missouri.edu
To: FreeBSD-gnats-submit@freebsd.org
Subject: Configure the synaptics touchpad.
X-Send-Pr-Version: 3.2

>Number:         24299
>Category:       ports
>Synopsis:       New port sysutils/tpconfig: configure the synaptics touchpad.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 12 19:40:00 PST 2001
>Closed-Date:    Sat Apr 16 04:25:41 GMT 2005
>Last-Modified:  Sat Apr 16 04:25:41 GMT 2005
>Originator:     Stephen Montgomery-Smith
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
University of Missouri
>Environment:

Using a synaptics touchpad on a laptop

>Description:


You may like to make various configurations to the touchpad, for
example, to disable the feature that tapping the touchpad is like
a mouse click.

>How-To-Repeat:

>Fix:


     This port will not compile or work unless changes are made to the 
     kernel - this is described at
     http://www.freebsd.org/cgi/query-pr.cgi?pr=20352

     This replaces the PR http://www.freebsd.org/cgi/query-pr.cgi?pr=21520
     which is now out of date (and which was never committed).

     I really hope that one of you guys commits this soon, because I have
     contact with several people who want something like this.


# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	tpconfig
#	tpconfig/Makefile
#	tpconfig/pkg-comment
#	tpconfig/distinfo
#	tpconfig/pkg-descr
#	tpconfig/pkg-plist
#	tpconfig/files
#	tpconfig/files/patch-00
#	tpconfig/files/patch-01
#	tpconfig/files/remouse.sh-sample
#	tpconfig/files/remouse
#	tpconfig/files/patch-10
#
echo c - tpconfig
mkdir -p tpconfig > /dev/null 2>&1
echo x - tpconfig/Makefile
sed 's/^X//' >tpconfig/Makefile << 'END-of-tpconfig/Makefile'
X# New ports collection makefile for:	tpconfig
X# Date created:		12 January 2001
X# Whom:			Stephen Montgomery-Smith <stephen@math.missouri.edu>
X#
X# $FreeBSD$
X#
X
XPORTNAME=		tpconfig
XPORTVERSION=		3.1
XCATEGORIES=		sysutils
XMASTER_SITES=		http://www.compass.com/tpconfig/
X
XMAINTAINER=		stephen@math.missouri.edu
X
XLIB_DEPENDS=		gnugetopt:${PORTSDIR}/devel/libgnugetopt:install
X
XGNU_CONFIGURE=		yes
XCONFIGURE_ENV+=		CFLAGS="${CFLAGS} -I${PREFIX}/include" \
X			LDFLAGS=-L${PREFIX}/lib \
X			LIBS=-lgnugetopt
X
Xpre-patch:
X	${CHMOD} +w ${WRKSRC}/*
X
Xpost-install:
X	strip ${PREFIX}/bin/tpconfig
X	${INSTALL_SCRIPT} ${FILESDIR}/remouse.sh-sample ${PREFIX}/etc/rc.d
X	${INSTALL_SCRIPT} ${FILESDIR}/remouse ${PREFIX}/bin
X
X.include <bsd.port.mk>
END-of-tpconfig/Makefile
echo x - tpconfig/pkg-comment
sed 's/^X//' >tpconfig/pkg-comment << 'END-of-tpconfig/pkg-comment'
XConfigure the synaptics touchpad
END-of-tpconfig/pkg-comment
echo x - tpconfig/distinfo
sed 's/^X//' >tpconfig/distinfo << 'END-of-tpconfig/distinfo'
XMD5 (tpconfig-3.1.tar.gz) = 99b177d2aecc6d9370804c59a2cb2d45
END-of-tpconfig/distinfo
echo x - tpconfig/pkg-descr
sed 's/^X//' >tpconfig/pkg-descr << 'END-of-tpconfig/pkg-descr'
XThis program allows the user to configure a synaptics touchpad -
Xa pointing device used on many laptops.
X
XThe basic program is called tpconfig.  Type tpconfig to see
Xall of its options.  It will not work if any other program
Xis using the mouse (for example moused or X windows).  Also,
Xyou should not touch the touchpad while this program is running.
X
XI have also included a program remouse.  This first kills the
Xmoused daemon, then runs tpconfig with whatever options you have
Xset, and then restarts the moused daemon.
X
XAlso included is a file /usr/local/etc/rc.d/remouse.sh-sample.  You
Xcan make whatever changes you like, and then rename it to
Xremouse.sh, and then remouse will be called upon boot up.
X
XIMPORTANT: this port will not compile or work unless some changes
Xare made to the kernel.  You can find the required changes at
Xhttp://www.freebsd.org/cgi/query-pr.cgi?pr=20352
X
XWWW: http://www.compass.com/synaptics/
X
XStephen Montgomery-Smith
Xstephen@math.missouri.edu
END-of-tpconfig/pkg-descr
echo x - tpconfig/pkg-plist
sed 's/^X//' >tpconfig/pkg-plist << 'END-of-tpconfig/pkg-plist'
Xbin/tpconfig
Xbin/remouse
Xetc/rc.d/remouse.sh-sample
END-of-tpconfig/pkg-plist
echo c - tpconfig/files
mkdir -p tpconfig/files > /dev/null 2>&1
echo x - tpconfig/files/patch-00
sed 's/^X//' >tpconfig/files/patch-00 << 'END-of-tpconfig/files/patch-00'
X--- ../tpconfig-3.1-orig/tpconfig.c	Wed Nov 15 09:37:59 2000
X+++ tpconfig.c	Fri Jan 12 20:06:20 2001
X@@ -123,9 +123,15 @@
X int status;
X if (*fd<0)
X   {
X+#ifdef __FreeBSD__
X+  *fd = open("/dev/psm0", O_RDWR|O_NDELAY);	
X+  if (*fd<0) 
X+    fatal("Could not open PS/2 Port [/dev/psm0]");	
X+#else
X   *fd = open("/dev/psaux", O_RDWR|O_NDELAY);
X   if (*fd < 0)
X     fatal("Could not open PS/2 Port [/dev/psaux]");
X+#endif
X #ifdef __linux
X   /* If AUX_GRAB kernel patch present, use it. */
X   while (ioctl (*fd, AUX_GRAB, 0) < 0)
END-of-tpconfig/files/patch-00
echo x - tpconfig/files/patch-01
sed 's/^X//' >tpconfig/files/patch-01 << 'END-of-tpconfig/files/patch-01'
X--- ../tpconfig-3.1-orig/utils.c	Wed Nov 15 09:41:49 2000
X+++ utils.c	Fri Jan 12 21:32:21 2001
X@@ -73,6 +73,61 @@
X #define TIMEOUT 3.0 /* wait for up to 3 seconds for a reply*/
X 
X /* General Rourines for PS2 port */
X+
X+#ifdef __FreeBSD__
X+
X+#include <sys/ioctl.h>
X+#include <machine/mouse.h>
X+#include <string.h>
X+
X+#define INBUFLEN 100
X+static char inbuffer[INBUFLEN];
X+int inbuflen = 0;
X+
X+print_buf(char s[], struct mousedata data) {
X+  int i;
X+  printf("%s %d:",s,data.len);
X+  for (i=0;i<data.len;i++) printf(" %x",data.buf[i]);
X+  printf("\n");
X+  fflush(stdout);
X+}
X+
X+int ps2_write(int fd,unsigned char *buffer,int num_bytes) {
X+  struct mousedata data;
X+  int i;
X+
X+  assert(num_bytes<=sizeof(data.buf)/sizeof(int));
X+  for (i=0;i<num_bytes;i++) data.buf[i] = (unsigned int) buffer[i];
X+  data.len = num_bytes;
X+  if (ioctl(fd,MOUSE_SENDREADCMD,&data)==-1) {
X+    printf("Failed to read mouse properly\n");
X+    exit(1);
X+  }
X+  assert(inbuflen+1+data.len<=INBUFLEN);
X+  inbuffer[inbuflen] = AUX_ACK;
X+  for (i=0;i<data.len;i++) inbuffer[inbuflen+1+i] = data.buf[i];
X+  inbuflen += 1+data.len;
X+  return num_bytes;
X+}
X+
X+int ps2_read(int fd,unsigned char *buffer,int num_bytes) {
X+  int temp;
X+
X+  if (num_bytes <= inbuflen) {
X+    memcpy(buffer,inbuffer,num_bytes);
X+    inbuflen -= num_bytes;
X+    memcpy(inbuffer,inbuffer+num_bytes,inbuflen);
X+    return num_bytes;
X+  } else {
X+    memcpy(buffer,inbuffer,inbuflen);
X+    temp = inbuflen;
X+    inbuflen = 0;
X+    return temp;
X+  }
X+}
X+
X+#else
X+
X int ps2_write(int fd,unsigned char *buffer,int num_bytes)
X { /* ps2_write */
X int bytes_written;
X@@ -167,7 +222,7 @@
X return(at);
X } /* ps2_read */
X  
X-
X+#endif
X 
X void version_info(void)
X { /* version_info */
END-of-tpconfig/files/patch-01
echo x - tpconfig/files/remouse.sh-sample
sed 's/^X//' >tpconfig/files/remouse.sh-sample << 'END-of-tpconfig/files/remouse.sh-sample'
X#!/bin/sh
Xcase "$1" in
X	start)
X		/usr/local/bin/remouse -t0
X		echo -n ' remouse'
X		;;
X	stop)
X		;;
X	restart)
X		/usr/local/bin/remouse -t0
X		echo -n ' remouse'
X		;;
X	-h)
X		echo "Usage: `basename $0` { start | stop | restart }"
X		;;
X	*)
X		/usr/local/bin/remouse -t0
X		echo -n ' remouse'
X		;;
Xesac
END-of-tpconfig/files/remouse.sh-sample
echo x - tpconfig/files/remouse
sed 's/^X//' >tpconfig/files/remouse << 'END-of-tpconfig/files/remouse'
X#!/bin/sh
X
X# Suck in the configuration variables.
Xif [ -r /etc/defaults/rc.conf ]; then
X	. /etc/defaults/rc.conf
X	source_rc_confs
Xelif [ -r /etc/rc.conf ]; then
X	. /etc/rc.conf
Xfi
X
Xif [ -f /var/run/moused.pid ]; then
X	kill `cat /var/run/moused.pid`
X	rm -f /var/run/moused.pid
Xfi
X
X/usr/local/bin/tpconfig $@
X
Xcase ${moused_enable} in
X[Yy][Ee][Ss])
X	/usr/sbin/moused -p ${moused_port} -t ${moused_type} ${moused_flags}
X	;;
Xesac
END-of-tpconfig/files/remouse
echo x - tpconfig/files/patch-10
sed 's/^X//' >tpconfig/files/patch-10 << 'END-of-tpconfig/files/patch-10'
X--- ALPS.c-orig	Fri Jan 12 21:16:27 2001
X+++ ALPS.c	Fri Jan 12 21:27:31 2001
X@@ -52,7 +52,7 @@
X #include <fcntl.h>
X #include <stdio.h>
X #include <unistd.h>
X-#include <assert.h>
X+#define assert(e) if (!(e)){printf("assertion \"%s\" failed: file \"%s\", line %d\n",#e,__FILE__,__LINE__);exit(1);} /* assert without creating core on error */
X #include <sys/ioctl.h>
X #include <sys/time.h>
X #include <sys/timeb.h>
X--- synaptics.c-orig	Fri Jan 12 21:16:27 2001
X+++ synaptics.c	Fri Jan 12 21:27:29 2001
X@@ -72,7 +72,7 @@
X #include <fcntl.h>
X #include <stdio.h>
X #include <unistd.h>
X-#include <assert.h>
X+#define assert(e) if (!(e)){printf("assertion \"%s\" failed: file \"%s\", line %d\n",#e,__FILE__,__LINE__);exit(1);} /* assert without creating core on error */
X #include <sys/ioctl.h>
X #include <sys/time.h>
X #include <sys/timeb.h>
X--- tpconfig.c-orig	Fri Jan 12 21:16:27 2001
X+++ tpconfig.c	Fri Jan 12 21:27:30 2001
X@@ -88,7 +88,7 @@
X #include <fcntl.h>
X #include <stdio.h>
X #include <unistd.h>
X-#include <assert.h>
X+#define assert(e) if (!(e)){printf("assertion \"%s\" failed: file \"%s\", line %d\n",#e,__FILE__,__LINE__);exit(1);} /* assert without creating core on error */
X #include <sys/ioctl.h>
X #include <sys/time.h>
X #include <sys/timeb.h>
X--- utils.c-orig	Fri Jan 12 21:16:27 2001
X+++ utils.c	Fri Jan 12 21:33:20 2001
X@@ -60,7 +60,7 @@
X #include <fcntl.h>
X #include <stdio.h>
X #include <unistd.h>
X-#include <assert.h>
X+#define assert(e) if (!(e)){printf("assertion \"%s\" failed: file \"%s\", line %d\n",#e,__FILE__,__LINE__);exit(1);} /* assert without creating core on error */
X #include <sys/ioctl.h>
X #include <sys/time.h>
X #include <sys/timeb.h>
END-of-tpconfig/files/patch-10
exit



>Release-Note:
>Audit-Trail:

From: Stephen Montgomery-Smith <stephen@math.missouri.edu>
To: freebsd-gnats-submit@FreeBSD.org, stephen@math.missouri.edu
Cc:  
Subject: Re: ports/24299: Configure the synaptics touchpad.
Date: Sun, 06 May 2001 22:14:13 -0500

 This is a multi-part message in MIME format.
 --------------C3D93D999B87373411579FD3
 Content-Type: text/plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 Probably this port will never be committed (because as I understand
 at some stage the mouse drivers will be overhauled).  But here is
 an update to tpconfig 3.1.2.  Actually there is not advantage to
 this later version as far as I can see, but here it is anyway, as
 an attachment diff.
 --------------C3D93D999B87373411579FD3
 Content-Type: text/plain; charset=us-ascii;
  name="ddd"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="ddd"
 
 diff -ur tpconfig-old/Makefile tpconfig/Makefile
 --- tpconfig-old/Makefile	Fri Jan 12 20:48:05 2001
 +++ tpconfig/Makefile	Sun May  6 15:24:42 2001
 @@ -6,7 +6,7 @@
  #
  
  PORTNAME=		tpconfig
 -PORTVERSION=		3.1
 +PORTVERSION=		3.1.2
  CATEGORIES=		sysutils
  MASTER_SITES=		http://www.compass.com/tpconfig/
  
 @@ -15,6 +15,7 @@
  LIB_DEPENDS=		gnugetopt:${PORTSDIR}/devel/libgnugetopt:install
  
  GNU_CONFIGURE=		yes
 +USE_GMAKE=		yes
  CONFIGURE_ENV+=		CFLAGS="${CFLAGS} -I${PREFIX}/include" \
  			LDFLAGS=-L${PREFIX}/lib \
  			LIBS=-lgnugetopt
 diff -ur tpconfig-old/distinfo tpconfig/distinfo
 --- tpconfig-old/distinfo	Fri Jan 12 20:29:23 2001
 +++ tpconfig/distinfo	Sun May  6 15:27:05 2001
 @@ -1 +1 @@
 -MD5 (tpconfig-3.1.tar.gz) = 99b177d2aecc6d9370804c59a2cb2d45
 +MD5 (tpconfig-3.1.2.tar.gz) = 17031b3b16a71c513e55c71d49394731
 
 --------------C3D93D999B87373411579FD3--
 

From: "David W. Chapman Jr." <dwcjr@inethouston.net>
To: freebsd-gnats-submit@FreeBSD.org, stephen@math.missouri.edu
Cc:  
Subject: Re: ports/24299: Configure the synaptics touchpad.
Date: Sun, 17 Jun 2001 19:41:02 -0500

 Is there any newer news on this pr?
 

From: Stephen Montgomery-Smith <stephen@math.missouri.edu>
To: freebsd-gnats-submit@FreeBSD.org, stephen@math.missouri.edu
Cc:  
Subject: Re: ports/24299: Configure the synaptics touchpad.
Date: Mon, 05 Aug 2002 16:11:01 -0500

 This is a multi-part message in MIME format.
 --------------080207010900020405000106
 Content-Type: text/plain; charset=us-ascii; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Just in case anyone is using it, here is an update to a later version. 
 Probably no functional difference for FreeBSD.  But I did get rid of 
 annoying feature in that the copyright message was missing a space.
 
 -- 
 Stephen Montgomery-Smith
 stephen@math.missouri.edu
 http://www.math.missouri.edu/~stephen
 
 --------------080207010900020405000106
 Content-Type: text/plain;
  name="diff-3.1.2-3.1.3"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="diff-3.1.2-3.1.3"
 
 diff -ur tpconfig-old/Makefile tpconfig/Makefile
 --- tpconfig-old/Makefile	Sun May  6 15:24:42 2001
 +++ tpconfig/Makefile	Mon Aug  5 12:22:50 2002
 @@ -6,7 +6,7 @@
  #
  
  PORTNAME=		tpconfig
 -PORTVERSION=		3.1.2
 +PORTVERSION=		3.1.3
  CATEGORIES=		sysutils
  MASTER_SITES=		http://www.compass.com/tpconfig/
  
 diff -ur tpconfig-old/distinfo tpconfig/distinfo
 --- tpconfig-old/distinfo	Sun May  6 15:27:05 2001
 +++ tpconfig/distinfo	Mon Aug  5 12:32:30 2002
 @@ -1 +1 @@
 -MD5 (tpconfig-3.1.2.tar.gz) = 17031b3b16a71c513e55c71d49394731
 +MD5 (tpconfig-3.1.3.tar.gz) = 50acfa33b3be03aac9d7131edb07373f
 diff -ur tpconfig-old/files/patch-01 tpconfig/files/patch-01
 --- tpconfig-old/files/patch-01	Sun May  6 13:38:12 2001
 +++ tpconfig/files/patch-01	Mon Aug  5 12:31:15 2002
 @@ -71,3 +71,12 @@
   
   void version_info(void)
   { /* version_info */
 +@@ -192,7 +247,7 @@
 +   printf("=                                                                      =\n");
 +   printf("= Copyright (C) 1997 C. Scott Ananian<cananian@alumni.princeton.edu>   =\n");
 +   printf("= Copyright (C) 1998-2001 Bruce Kall <kall@compass.com>                =\n");
 +-  printf("= Last Modified (Version 3.1.3) by Bruce Kall, 2/22/2002              =\n");
 ++  printf("= Last Modified (Version 3.1.3) by Bruce Kall, 2/22/2002               =\n");
 +   printf("=                                                                      =\n");
 +   printf("= tpconfig comes with ABSOLUTELY NO WARRANTY.  This is free software,  =\n");
 +   printf("= and you are welcome to redistribute it under the terms of the GPL.   =\n");
 
 --------------080207010900020405000106--
 

From: Mark Linimon <linimon@lonesome.com>
To: freebsd-gnats-submit@FreeBSD.org, stephen@math.missouri.edu
Cc:  
Subject: Re: ports/24299: Configure the synaptics touchpad.
Date: Mon, 10 Nov 2003 02:58:02 +0000

 This PR is still apparently awaiting the kernel change after
 all this time.  I have submitted a followup to the kernel PR
 asking about its status.
 

From: Stephen Montgomery-Smith <stephen@math.missouri.edu>
To: Mark Linimon <linimon@lonesome.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/24299: Configure the synaptics touchpad.
Date: Mon, 10 Nov 2003 19:04:53 -0600

 Apparently there is some total rehaul of the mouse stuff in the kernel that will 
 take place in the kernel at some time.  After that, the synaptics touchpad port 
 will become redundant.
 
 (Thanks for noticing the port I created.)
 
 
 Mark Linimon wrote:
 > This PR is still apparently awaiting the kernel change after
 > all this time.  I have submitted a followup to the kernel PR
 > asking about its status.
 > 
 > 
 > 
 
 
State-Changed-From-To: open->suspended 
State-Changed-By: linimon 
State-Changed-When: Sun Nov 16 18:58:02 PST 2003 
State-Changed-Why:  
Mark suspended until something happens with kern/20352. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24299 
State-Changed-From-To: suspended->feedback 
State-Changed-By: flz 
State-Changed-When: Fri Apr 15 08:59:55 GMT 2005 
State-Changed-Why:  
kern/20352 is now closed and it seems support for synaptics 
touchpad has been fixed. 

Could you submit an updated version of the port and tell if 
it's working correctly with a quite recent FreeBSD ? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24299 
State-Changed-From-To: feedback->closed 
State-Changed-By: flz 
State-Changed-When: Sat Apr 16 04:23:47 GMT 2005 
State-Changed-Why:  
Closed at submitter's request. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24299 
>Unformatted:
 Stephen Montgomery-Smith
