--- tktable-2.9-2.9.orig/doc/tkTable.n
+++ tktable-2.9-2.9/doc/tkTable.n
@@ -233,7 +233,7 @@
 .de UL
 \\$1\l'|0\(ul'\\$2
 ..
-.TH table n 2.8 Tk "Tk Table Extension"
+.TH table "3" "2.8 Tk" "Tk Table Extension"
 .HS table tk
 .BS
 .SH NAME
@@ -322,7 +322,7 @@
 \fBtag col\fR widget method.  If no tag is found, it will evaluate the named
 procedure passing the column number in question as the sole argument.  The
 procedure is expected to return the name of a tag to use, or a null string.
-Errors occuring during the evaluation of the procedure, or the return of an
+Errors occurring during the evaluation of the procedure, or the return of an
 invalid tag name are silently ignored.
 .OP \-colwidth colWidth ColWidth
 Default column width, interpreted as characters in the default font when
@@ -1028,7 +1028,7 @@
 .TP
 \fIpathName \fBinsert active\fR \fIindex value\fR
 The \fIvalue\fR is a text string which is inserted at the \fIindex\fR
-postion of the active cell.  The cursor is then positioned after the
+position of the active cell.  The cursor is then positioned after the
 new text. \fIindex\fR can be a number, \fBinsert\fR or \fBend\fR.
 .TP
 \fIpathName \fBinsert cols\fR ?\fIswitches\fR? \fIindex\fR ?\fIcount\fR?
--- tktable-2.9-2.9.orig/tclconfig/tcl.m4
+++ tktable-2.9-2.9/tclconfig/tcl.m4
@@ -773,7 +773,7 @@
 	    # results, and the version is kept in special file).
 	
 	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print $3}' /etc/.relid'`
+		system=MP-RAS-`awk '{print $3}' /etc/.relid`
 	    fi
 	    if test "`uname -s`" = "AIX" ; then
 		system=AIX-`uname -v`.`uname -r`
@@ -2148,7 +2148,7 @@
 	    # results, and the version is kept in special file).
 	
 	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-		system=MP-RAS-`awk '{print $3}' /etc/.relid'`
+		system=MP-RAS-`awk '{print $3}' /etc/.relid`
 	    fi
 	    if test "`uname -s`" = "AIX" ; then
 		system=AIX-`uname -v`.`uname -r`
--- tktable-2.9-2.9.orig/debian/changelog
+++ tktable-2.9-2.9/debian/changelog
@@ -0,0 +1,121 @@
+tktable-2.9 (2.9-2) unstable; urgency=low
+
+  * Sponsored upload.
+  * Redo most of the package
+  * Rename the library, since upstream doesn't guarantee any kind of A[BP]I
+    compatibility, any new release will probably require rebuilding at least.
+  * Reupload and rename tktable-2.9 orig tarball; this used to be a native
+    package.
+  * Patch tcl.m4 and run autoconf at buildtime; thanks to David Watson
+    <david@planetwatson.co.uk> for the useful patch.
+    Closes: #356062, and maybe #324143 too.
+  * Correct manpage typos; Thanks A Costa <agcosta@gis.net>.
+    Closes: #320551
+  * Remove README.Debian, since saods9 also depends on tktable.
+  * ./debian/control:
+    - Build-Conflict with old autoconf.
+    - Add myself as an uploader; hopefully I'm progressing through NM
+      sufficiently quickly for this to be meaningful.
+    - Bump standards-version to 3.6.2; no changes.
+    - End the long description with a period, and indent homepage field on a
+      new line, as per DevRef 6.2.4.
+    - Trim Build-Depends, since {tcl,tk}8.4-dev packages depend on the precise
+      versions of the runtime packages.
+  * ./debian/copyright: Fully document the copyright holder, including years.
+  * Document a P/D license for Debian .diff in ./debian/rules and
+    ./debian/copyright; okayed by Lars.
+  * Update to debhelper 4 from, uh, 1.
+  * ./debian/rules:
+    - Remove strange symlinks from /usr/lib/.. to /usr/lib/tktable/..
+      Closes: #339056
+    - Hack options to ./configure to find tcl includes, fixing probably
+      FTBFS;
+      Closes: #343138.
+    - build-stamp target now touches $@ to avoid recompilations instead of
+      causing them.
+    - Remove double calls to ./configure in clean target; instead, only
+      distclean if Makefile exits (addressing an issue mentioned in #324143).
+    - Remove call to strip, this is already handled by dh_strip, which also
+      supports DEB_BUILD_OPTIONS=nostrip.
+    - dh_installman now installs the manpage, rather than cp -a, and
+      dh_installdoc installs the html documentation, rather than mv;
+      dh_examples now installs ./demos.
+    - Remove obsolete targets 'source' and 'diff'.
+  * Add a watchfile.
+
+ -- Justin Pryzby <justinpryzby@users.sourceforge.net>  Mon, 27 Mar 2006 02:00:04 -0500
+
+tktable (2.9-1) unstable; urgency=low
+
+  * New upstream release (closes: Bug#262668)
+
+ --  Lars Steinke (Debian Developer) <lss@debian.org>  Wed, 16 Feb 2004 17:51:05 +0200
+
+tktable (2.8-2) unstable; urgency=low
+
+  * Fixed build dependencies
+  * Fixed clean target in debian/rules (closes: Bug#194055)
+
+ -- Lars Steinke <lss@debian.org>  Wed,  4 Jun 2003 17:51:05 +0200
+
+tktable (2.8-1) unstable; urgency=low
+
+  * New upstream release (closes: Bug#173668)
+  * Fixed dependencies (closes: Bug#191311)
+
+ -- Lars Steinke <lss@debian.org>  Tue, 20 May 2003 14:29:23 +0200
+
+tktable (2.7-2) unstable; urgency=low
+
+  * Fix overrides
+
+ -- Lars Steinke <lss@debian.org>  Mon, 11 Mar 2002 20:29:23 +0200
+
+tktable (2.7-1) unstable; urgency=low
+
+  * New upstream release with bugfixes (closes: Bug#128376)
+
+ -- Lars Steinke <lss@debian.org>  Sun, 10 Mar 2002 20:29:23 +0200
+ 
+tktable (2.6-3) unstable; urgency=low
+
+  * Fixed build dependency on debhelper (closes: Bug#94827)
+
+ -- Lars Steinke <lss@debian.org>  Mon, 23 Apr 2001 11:29:23 +0200
+
+tktable (2.6-2) unstable; urgency=low
+
+  * Miscellaneous fixes (closes #93730, #93735) 
+
+ -- Lars Steinke <lss@debian.org>  Wed, 18 Apr 2001 20:36:56 +0200
+
+tktable (2.6-1) unstable; urgency=low
+
+  * New upstream release
+  * Fixed build dependencies (closes #85308)
+
+ -- Lars Steinke <lss@debian.org>  Wed,  7 Mar 2001 17:58:55 +0100
+
+tktable (2.5-3) unstable; urgency=low
+
+  * Fixed linitan messages
+
+ -- Lars Steinke <lss@debian.org>  Wed, 15 Mar 2000 13:30:54 +0100
+
+tktable (2.5-2) unstable; urgency=low
+
+  * Recompiled for Tk/Tcl 8.2
+
+ -- Lars Steinke <lss@debian.org>  Tue,  5 Oct 1999 12:54:34 +0200
+
+tktable (2.5-1) unstable; urgency=low
+
+  * New upstream version
+
+ -- Lars Steinke <lss@debian.org>  Tue, 17 Aug 1999 15:55:51 +0200
+
+tktable (2.3-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Lars Steinke <lss@debian.org>  Fri, 21 Aug 1998 16:58:57 +0200
--- tktable-2.9-2.9.orig/debian/rules
+++ tktable-2.9-2.9/debian/rules
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# Made with the aid of dh_make, by Craig Small
+# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
+# Debian-specific changes are a work of Lars Steinke <lss@debian.org>
+# during the years 1998-2004, and Justin Pryzby
+# <pryzbyj@justinpryzby.com> during 2005-2006; they are hereby
+# released into the public domain.
+
+ver=2.9
+pkg=libtktable
+lib=$(pkg)-$(ver)
+dev=$(lib)-dev
+
+base=Tktable
+lbase=lib$(base)
+libfst=lib$(base)$(ver).a
+libfsh=lib$(base)$(ver).so
+
+DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+# FOR AUTOCONF 2.52 AND NEWER ONLY
+CONFIGURE = ./configure
+ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+	CONFIGURE += --build $(DEB_HOST_GNU_TYPE)
+else
+	CONFIGURE += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+endif
+
+CFLAGS=-W -Wall -g
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+export DH_COMPAT=4
+
+build: build-stamp
+
+# --x-includes=/usr/include/tcl8.4 --x-includes=/usr/include/tk8.4
+build-stamp: CONFIGURE+=--with-tcl=/usr/lib/tcl8.4 --with-tk=/usr/lib/tk8.4 --with-tclinclude=/usr/include/tcl8.4 --enable-threads
+build-stamp:
+	dh_testdir
+	autoconf
+# First build the static library
+	$(CONFIGURE) --disable-shared CFLAGS="$(CFLAGS)"
+	$(MAKE)
+# Now rebuild for the shared library, with -fPIC.
+	find -name '*.o' -type f |xargs $(RM)
+	$(CONFIGURE) --enable-shared CFLAGS="$(CFLAGS)"
+	$(MAKE)
+
+	touch "$@"
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+
+	set -e; [ ! -f ./Makefile ] || $(MAKE) distclean;
+	dh_clean $(libfst) $(libfsh) config.log configure doc/tkTable.html
+
+binary-indep: build
+binary-arch: build
+	dh_testdir
+	dh_testroot
+	dh_clean
+	dh_installdirs -a usr/lib/$(base)$(ver)
+	dh_installchangelogs ChangeLog
+	dh_installdocs	-p$(dev) README.blt README.txt TODO.txt UPGRADING.txt
+	dh_installexamples -p$(dev) ./demos/*
+	dh_install	-p$(lib) ./library/tkTable.tcl ./pkgIndex.tcl $(lbase)$(ver).so usr/lib/$(base)$(ver)
+	dh_install	-p$(dev) $(lbase)$(ver).a usr/lib/$(base)$(ver)
+	cd ./debian/$(dev)/usr/share/doc/$(dev)/examples/ && chmod 0644 tcllogo.gif loadtable.tcl
+	dh_installman	-p$(dev) doc/tkTable.n
+	dh_link -a
+	dh_strip -a
+	dh_compress -a
+	dh_fixperms -a
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary
--- tktable-2.9-2.9.orig/debian/watch
+++ tktable-2.9-2.9/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://sf.net/tktable/ Tktable(.*)\.tar\.gz debian uupdate
--- tktable-2.9-2.9.orig/debian/control
+++ tktable-2.9-2.9/debian/control
@@ -0,0 +1,26 @@
+Source: tktable-2.9
+Priority: optional
+Maintainer: Lars Steinke <lss@debian.org>
+Uploaders: Justin Pryzby <justinpryzby@users.sf.net>
+Build-Depends: debhelper (>> 4.0.0), autoconf, tcl8.4-dev, tk8.4-dev
+Build-Conflicts: autoconf2.13
+Standards-Version: 3.6.2
+Section: interpreters
+
+Package: libtktable-2.9-dev
+Section: libdevel
+Architecture: any
+Depends: libtktable-2.9 (= ${Source-Version}), libc6-dev, tcl8.4-dev|tcl8.3-dev, tk8.4-dev|tk8.3-dev
+Description: Development files for tkTable
+ Static library, demos and documentation for tkTable.  Note that
+ linking against tkTable doesn't actually require this package, since
+ the unversioned .so library is included in the runtime package.
+
+Package: libtktable-2.9
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, tcl|tcl8.4|tcl8.3, tk|tk8.4|tk8.3
+Description: Table extension for Tcl/Tk
+ Provides support for tables and matrices in Tcl/Tk.
+ .
+  Homepage: http://tktable.sourceforge.net/
--- tktable-2.9-2.9.orig/debian/copyright
+++ tktable-2.9-2.9/debian/copyright
@@ -0,0 +1,53 @@
+This package was first debianized by Lars Steinke <steinke@lsweb.de> on
+Fri, 21 Aug 1998 16:58:57 +0200.
+
+Debian-specific changes are a work of Lars Steinke <lss@debian.org>
+during the years 1998-2004, and Justin Pryzby
+<pryzbyj@justinpryzby.com> during 2005-2006; they are hereby released
+into the public domain.
+
+It was downloaded from http://tktable.sourceforge.net
+
+Copyright 1997-2002, Jeffrey Hobbs (jeff@hobbs.org)
+
+		   * COPYRIGHT AND LICENSE TERMS *
+
+(This file blatantly stolen from Tcl/Tk license and adapted - thus assume
+it falls under similar license terms).
+
+This software is copyrighted by Jeffrey Hobbs <jeff.hobbs@acm.org>.  The
+following terms apply to all files associated with the software unless
+explicitly disclaimed in individual files.
+
+The authors hereby grant permission to use, copy, modify, distribute, and
+license this software and its documentation for any purpose, provided that
+existing copyright notices are retained in all copies and that this notice
+is included verbatim in any distributions.  No written agreement, license,
+or royalty fee is required for any of the authorized uses.
+
+IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
+DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
+OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
+EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE IS
+PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO
+OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
+MODIFICATIONS.
+
+RESTRICTED RIGHTS: Use, duplication or disclosure by the U.S. government
+is subject to the restrictions as set forth in subparagraph (c) (1) (ii)
+of the Rights in Technical Data and Computer Software Clause as DFARS
+252.227-7013 and FAR 52.227-19.
+
+SPECIAL NOTES:
+
+This software also falls under the bourbon_ware clause:
+
+    Should you find this software useful in your daily work, you should
+    feel obliged to take the author out for a drink if the opportunity
+    presents itself.  The user may feel exempt from this clause if they
+    are under 21 or think the author has already partaken of too many
+    drinks.
