--- tclex-1.2a1.orig/debian/changelog
+++ tclex-1.2a1/debian/changelog
@@ -0,0 +1,160 @@
+tclex (1.2a1-15) unstable; urgency=low
+
+ * Don't allow to load tcLex package into Tcl 8.5 and newer because of
+ changes in Tcl internal structures which break binary compatibility.
+ After Tcl 8.5 will become a default Tcl version tcLex will be rebuilt
+ with 8.5 and will loose compatibility with 8.4 (closes: #487549).
+ * Bumped standards version to 3.8.0.
+
+ -- Sergei Golovan <sgolovan@debian.org> Fri, 18 Jul 2008 00:42:21 +0400
+
+tclex (1.2a1-14) unstable; urgency=low
+
+ * Fixed clean target to work with debhelper 7.0 (made dh_clean the last
+ command, so debhelper logs are removed now).
+ * Protected quilt invocation in debian/rules to make it possible to convert
+ bwidget source package to 3.0 (quilt) format (closes: #484914).
+
+ -- Sergei Golovan <sgolovan@debian.org> Mon, 09 Jun 2008 21:01:32 +0400
+
+tclex (1.2a1-13) unstable; urgency=low
+
+ * Removed README.Debian because the information in it is no longer relevant.
+ * Bumped standards version to 3.7.3.
+ * Added a copyright notice.
+ * Changed section in doc-base to Programming.
+
+ -- Sergei Golovan <sgolovan@debian.org> Sun, 18 May 2008 13:36:50 +0400
+
+tclex (1.2a1-12) unstable; urgency=low
+
+ * New maintainer Debian Tcl/Tk Packagers
+ <pkg-tcltk-devel@lists.alioth.debian.org> (closes: #406135).
+ * Adopted the package to the current Debian Tcl/Tk policy. This also fixed
+ FTBFS (closes: #450474).
+ * Fixed lintian complain on ignoring make distclean errors.
+ * Switched to quilt for patch management.
+ * Bumped debhelper compatibility level to 5.
+
+ -- Sergei Golovan <sgolovan@debian.org> Fri, 30 Nov 2007 20:41:40 +0300
+
+tclex (1.2a1-11) unstable; urgency=low
+
+ * QA upload.
+ * Port to Tcl 8.4. Closes: #420183.
+ - src/tcLex.c: Use Command->flags instead of Command->deleted.
+ - src/tcLex.c: Conform more closely to the Tcl_GetIndexFromObj(3tcl)
+ prototype.
+ * Remove unnecessary dependency on Tk.
+ * debian/rules: Install changes.txt as the upstream changelog.
+ * debian/changelog: Add colon after `closes' to placate Lintian.
+ * debian/copyright: Update upstream URL.
+ * debian/watch: Add.
+
+ -- Matej Vela <vela@debian.org> Fri, 20 Apr 2007 19:32:23 +0200
+
+tclex (1.2a1-10) unstable; urgency=low
+
+ * QA upload. (ACK NMU; Closes: #359579)
+ * Set maintainer to QA Group; Orphaned: #406135
+ * Bump compat level, depend on at least dh 4.0
+ * Conforms with latest Standards Version 3.7.2
+
+ -- Michael Ablassmeier <abi@debian.org> Tue, 23 Jan 2007 08:52:27 +0100
+
+tclex (1.2a1-9.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Get rid of the /usr/doc link in postinst (Closes: #359579).
+
+ -- Amaya Rodrigo Sastre <amaya@debian.org> Mon, 17 Jul 2006 23:46:03 +0200
+
+tclex (1.2a1-9) unstable; urgency=low
+
+ * Changed dependencies to tcl/tk8.3 rather than 8.2. Closes: #183802
+
+ -- David A. van Leeuwen <vleeuwen@debian.org> Sun, 28 Sep 2003 23:43:25 +0200
+
+tclex (1.2a1-8) unstable testing; urgency=high
+
+ * I _really_ need to get the change of 1.2a1-6 into testing or frozen
+ or whatever makes it go into woody. Otherwise it leaves a broken
+ package transcriber! Sorry for the messy uploads... Do I have to
+ file an RC bug against myself?
+
+ -- David A. van Leeuwen <vleeuwen@debian.org> Fri, 15 Mar 2002 17:26:49 +0100
+
+tclex (1.2a1-7) unstable; urgency=low
+
+ * changed priority from `optional' to `extra', in order to compy with
+ override file.
+
+ * Changed typo in control, which actually closes: bug#125414, but hey,
+ I'm not going to make this urgent.
+
+ * Changed my email address. Will this ever reduce spam?
+
+ -- David A. van Leeuwen <vleeuwen@debian.org> Fri, 15 Mar 2002 17:01:53 +0100
+
+tclex (1.2a1-6) frozen; urgency=high
+
+ * Changed build-dependency back to (tcl,tk)8.2-dev only, since `sid' has
+ different location of tclConfig.sh than `woody'. (closes: Bug#125414)
+ * Put ../tcl8.2/ in `file' variables in configure.in and configure,
+ for the same reason.
+
+ -- David A. van Leeuwen <vleeuwen@debian.org> Mon, 11 Mar 2002 10:03:40 +0100
+
+tclex (1.2a1-5testing) testing; urgency=high
+
+ * Changed build-dependency on (tcl,tk)8.0-dev only, since `sid' has
+ different location of tclConfig.sh than `woody'. (closes: Bug#125414)
+ * Removed ../tcl8.0/ in `file' variables in configure.in and configure,
+ for the same reason.
+ * Not that this change should _not_ go in unstable.
+
+ -- David A. van Leeuwen <david@tm.tno.nl> Fri, 28 Dec 2001 13:47:57 +0100
+
+tclex (1.2a1-5) unstable; urgency=low
+
+ * Removed debmake build-depends, added debhelper (i was confused)
+ * added tk8.0-dev|tk8.2-dev (i was lazy) (closes: Bug#109497)
+
+ -- David A. van Leeuwen <david@tm.tno.nl> Tue, 21 Aug 2001 17:45:45 +0200
+
+tclex (1.2a1-4) unstable testing; urgency=low
+
+ * Update with transcriber-1.4.3 and snack-2.0.7
+
+ * (Build-)Depends on tcl8.2|tcl8.0 etc.
+
+ -- David A. van Leeuwen <david@tm.tno.nl> Mon, 20 Aug 2001 17:52:17 +0200
+
+tclex (1.2a1-3) unstable testing; urgency=low
+
+ * moving towards debhelper
+
+ * made doc-base entry; it seems not to work with me.
+
+ * Changed /usr/doc files to /usr/share/doc, according to FHS; (closes:
+ Bug#91674)
+
+ * Added Build-Depends: tcl8.0-dev, demake to control
+
+ * Changed Standards-version to 3.5.2.0
+
+ -- David A. van Leeuwen <david@tm.tno.nl> Tue, 27 Mar 2001 12:38:27 +0200
+
+tclex (1.2a1-2) unstable; urgency=low
+
+ * Adapted debian/rules to compile on Alpha (tcl8.0-dev source problem)
+ solves critical release-bug 47810.
+
+ -- David A. van Leeuwen <david@tm.tno.nl> Fri, 12 Nov 1999 10:45:11 +0100
+
+tclex (1.2a1-1) unstable; urgency=low
+
+ * Initial Release.
+
+ -- David A. van Leeuwen <david@tm.tno.nl> Thu, 23 Sep 1999 17:34:33 +0200
+
--- tclex-1.2a1.orig/debian/prerm
+++ tclex-1.2a1/debian/prerm
@@ -0,0 +1,10 @@
+#!/bin/sh
+if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/tclex ]; then
+ rm -f /usr/doc/tclex
+ if command -v install-docs > /dev/null 2>&1; then
+ install-docs -r tclex-manual
+ fi
+
+fi
+
+#DEBHELPER#
--- tclex-1.2a1.orig/debian/rules
+++ tclex-1.2a1/debian/rules
@@ -0,0 +1,83 @@
+#!/usr/bin/make -f
+# Made with the aid of debmake, by Christoph Lameter,
+# based on the sample debian/rules file for GNU hello by Ian Jackson.
+
+export QUILT_PATCHES := debian/patches
+
+package=tclex
+
+unpatch:
+ dh_testdir
+ quilt pop -a || test $$? = 2
+ rm -rf patch-stamp .pc
+
+patch: patch-stamp
+patch-stamp:
+ dh_testdir
+ quilt push -a || test $$? = 2
+ touch patch-stamp
+
+build: build-stamp
+build-stamp: patch-stamp
+ dh_testdir
+ cd src; \
+ chmod +x configure; \
+ ./configure --prefix=/usr
+ $(MAKE) -C src
+ touch build-stamp
+
+clean: clean-patched unpatch
+ dh_testdir
+ dh_testroot
+ dh_clean
+
+clean-patched: patch-stamp
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
+ [ ! -f src/Makefile ] || $(MAKE) -C src distclean
+ rm -f src/*.so
+ rm -f `find . -name "*~"`
+ rm -rf debian/tclex debian/files* core debian/substvars
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ $(MAKE) -C src install TCL_PREFIX=../debian/tclex/usr
+ mv debian/tclex/usr/lib/tcLex* debian/tclex/usr/lib/tcltk/
+
+binary-indep: build install
+# There are no architecture-independent files to be uploaded
+# generated by this package. If there were any they would be
+# made here.
+
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs changes.txt
+ dh_installdocs README.txt
+ dh_installexamples
+# be an irritating wise-a** and change .htm in .html where possible
+ for a in `cd doc/en; ls *.htm`; do \
+ cat doc/en/$$a | perl -pe 's/("\w+)\.htm\b/\1.html/g' \
+ >debian/tclex/usr/share/doc/$(package)/html/$${a}l; \
+ done
+ dh_installman
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+# dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ tcltk-depends
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+# dpkg --build debian/tclex ..
+
+binary: binary-indep binary-arch
+
+.PHONY: patch unpatch clean-patched binary binary-arch binary-indep clean
--- tclex-1.2a1.orig/debian/dirs
+++ tclex-1.2a1/debian/dirs
@@ -0,0 +1,2 @@
+usr/lib/tcltk
+usr/share/doc/tclex/html
--- tclex-1.2a1.orig/debian/postinst
+++ tclex-1.2a1/debian/postinst
@@ -0,0 +1,12 @@
+#!/bin/sh
+if [ "$1" = "configure" ]; then
+ if [ -d /usr/doc -a -h /usr/doc/tclex -a -d /usr/share/doc/tclex ]; then
+ rm -f /usr/doc/tclex
+ fi
+
+ if command -v install-docs > /dev/null 2>&1; then
+ install-docs -i /usr/share/doc-base/tclex-manual
+ fi
+fi
+
+#DEBHELPER#
--- tclex-1.2a1.orig/debian/watch
+++ tclex-1.2a1/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://membres.lycos.fr/fbonnet/pub/tcLex(.*)\.tar\.gz
--- tclex-1.2a1.orig/debian/copyright
+++ tclex-1.2a1/debian/copyright
@@ -0,0 +1,65 @@
+This package was debianized by David A. van Leeuwen david@tm.tno.nl on
+Thu, 23 Sep 1999 17:34:33 +0200.
+
+It was downloaded from http://membres.lycos.fr/fbonnet/pub/
+
+Copyright 1999 Frederic Bonnet <frederic.bonnet@mim.lu>
+
+Copyright:
+
+[file adaptated from the Tcl license]
+
+This software is copyrighted by Frederic BONNET
+<frederic.bonnet@mim.lu>. 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. Modifications to this software may be copyrighted by their authors
+and need not follow the licensing terms described here, provided that
+the new terms are clearly indicated on the first page of each file where
+they apply.
+
+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.
+These include earthquakes, volcanoes, tsunami, traffic jams, stupid
+TV programs, brain damage resulting of attempts to read and understand:
+the code, my bad english, the present license, or all-caps legalese.
+
+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.
+
+GOVERNMENT USE: If you are acquiring this software on behalf of the
+U.S. government, the Government shall have only "Restricted Rights"
+in the software and related documentation as defined in the Federal
+Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
+are acquiring the software on behalf of the Department of Defense, the
+software shall be classified as "Commercial Computer Software" and the
+Government shall have only "Restricted Rights" as defined in Clause
+252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
+authors grant the U.S. Government and others acting in its behalf
+permission to use and distribute the software in accordance with the
+terms specified in this license.
+
+SPECIAL NOTES (the beerware clause):
+
+This software is freeware. However, it also falls under the beerware
+special category. That is, if you find this software useful, or use it
+every day, or want to grant me for my modest contribution to the Tcl
+community, feel free to send me a beer from one of your local brewery.
+My preference goes to Belgium abbey beers, Corona mexican cerveza,
+and irish stout (Guiness for strength!), but I also appreciate exotic,
+rare or original beers from everywhere (note: I live in France),
+especialy those with a nice packaging or original taste.
+
--- tclex-1.2a1.orig/debian/compat
+++ tclex-1.2a1/debian/compat
@@ -0,0 +1 @@
+5
--- tclex-1.2a1.orig/debian/control
+++ tclex-1.2a1/debian/control
@@ -0,0 +1,54 @@
+Source: tclex
+Section: interpreters
+Priority: extra
+Maintainer: Tcl/Tk Debian Packagers <pkg-tcltk-devel@lists.alioth.debian.org>
+Uploaders: Sergei Golovan <sgolovan@debian.org>
+Build-Depends: tcl-dev, debhelper (>= 5.0.0), quilt
+Standards-Version: 3.8.0
+
+Package: tclex
+Architecture: any
+Depends: ${shlibs:Depends}, ${tclsh:Depends}
+Description: A lexical analyzer generator for Tcl
+ tcLex is a lexer (lexical analyzer) generator extension to Tcl. It is
+ inspired by Unix and GNU lex and flex, which are "tools for
+ generating programs that perform pattern-matching on text". tcLex is
+ very similar to these programs, except it uses Tcl philosophy and
+ syntax, whereas the others use their own syntax and are used in
+ conjunction with the C language. People used to lex or flex should
+ then feel familiar with tcLex. tcLex is a small extension (the
+ Windows compiled version is about 20kb, and the source is about
+ 150kb), because it extensively uses the Tcl library. However, the
+ current doesn't use Tcl's regexp code anymore but a patched version
+ is now included in tcLex, which makes it slightly bigger (by a few
+ KB). tcLex should work with Tcl 8.0 and later. tcLex will NEVER work
+ with earlier versions, because it uses Tcl 8.0's "object" system for
+ performance. The most interesting features are:
+ .
+ * cross-platform support, thanks to Tcl. Though it has been
+ developed on Windows and tested on Windows and Unix only, it
+ should work on other platforms as long as Tcl exists on these
+ platforms. Supported Tcl platforms are Windows 95/NT, Unix (Linux,
+ Solaris...) and Macintosh. Other platforms are VMS, OS/2,
+ NeXTStep, Amiga...
+ .
+ * unlike lex and flex, which only generate static lexers written in
+ C and intended to be compiled, tcLex dynamically generates Tcl
+ commands that can be used like other C commands or Tcl procedures
+ from within Tcl scripts or C programs.
+ .
+ * it uses Tcl regular expressions. That means you don't have to
+ learn another regexp language.
+ .
+ * it works with Tcl namespaces
+ .
+ * the generated lexer commands can be used in one pass or
+ incrementally, because they maintain state information. That way,
+ several instances of the same lexer (eg a HTML parser) can run at
+ the same time in distinct call frames and maintain distinct states
+ (local variables...). Lexer need not be specially designed in
+ order to be used incrementally, the same lexer can transparently
+ be used in one pass or incrementally. This feature is especially
+ useful when processing text from a file or an Internet socket (Web
+ pages for example), when data is not necessarily available at the
+ beginning of the processing.
--- tclex-1.2a1.orig/debian/doc-base
+++ tclex-1.2a1/debian/doc-base
@@ -0,0 +1,9 @@
+Document: tclex-manual
+Title: tcLex online documentation
+Author: Frederic Bonnet
+Abstract: This manual describes the Tcl lexical analyzer
+Section: Programming
+
+Format: HTML
+Index: /usr/share/doc/tclex/html/index.html
+Files: /usr/share/doc/tclex/html/*.html
--- tclex-1.2a1.orig/debian/patches/types.diff
+++ tclex-1.2a1/debian/patches/types.diff
@@ -0,0 +1,75 @@
+
+--- tclex-1.2a1.orig/src/tcLex.c
++++ tclex-1.2a1/src/tcLex.c
+@@ -1194,7 +1198,7 @@
+ Tcl_Obj *CONST objv[];
+ int start;
+ {
+- static char * options[] = {
++ static const char * options[] = {
+ "-inclusiveconditions", "-ic",
+ "-exclusiveconditions", "-ec",
+ "-resultvariable",
+@@ -1271,7 +1275,7 @@
+ * Get the switch
+ */
+
+- if (Tcl_GetIndexFromObj(interp, objv[i], options, "switch", 0, &optionIndex) == TCL_ERROR)
++ if (Tcl_GetIndexFromObj(interp, objv[i], options, "switch", 0, (int *) &optionIndex) == TCL_ERROR)
+ return TCL_ERROR;
+
+ switch (optionIndex) {
+@@ -1444,7 +1448,7 @@
+ int objc;
+ Tcl_Obj *CONST objv[];
+ {
+- static char * options[] = {
++ static const char * options[] = {
+ "create", "current",
+ NULL
+ };
+@@ -1469,7 +1473,7 @@
+ * Get the switch
+ */
+
+- if (Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, &optionIndex) == TCL_ERROR) {
++ if (Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, (int *) &optionIndex) == TCL_ERROR) {
+ /*
+ * For now, an unknown subcommand is interpreted as the name of a new lexer
+ * to create. This is for compatibility issues, and is likely to change when
+@@ -2533,7 +2537,7 @@
+ {
+ TcLex_Lexer *lexer = (TcLex_Lexer *)clientData;
+ TcLex_State *statePtr = lexer->states[lexer->curState];
+- static char *options[] = {
++ static const char *options[] = {
+ "-current",
+ NULL};
+ static enum {
+@@ -2562,7 +2566,7 @@
+ * Switch to distinct subfunctions depending on the option
+ */
+
+- if (Tcl_GetIndexFromObj(interp, objv[2], options, "option", 0, &optionIndex) == TCL_ERROR)
++ if (Tcl_GetIndexFromObj(interp, objv[2], options, "option", 0, (int *) &optionIndex) == TCL_ERROR)
+ return TCL_ERROR;
+
+ switch (optionIndex) {
+@@ -2896,7 +2900,7 @@
+ Tcl_Obj *CONST objv[];
+ {
+ TcLex_Lexer *lexer = (TcLex_Lexer *)clientData;
+- static char *options[] = {
++ static const char *options[] = {
+ "eval", "start", "continue", "finish",
+ "begin", "end",
+ "conditions", "reject",
+@@ -2935,7 +2939,7 @@
+ * Get the subcommand
+ */
+
+- if (Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, &optionIndex) == TCL_ERROR)
++ if (Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, (int *) &optionIndex) == TCL_ERROR)
+ return TCL_ERROR;
+
+ /*
--- tclex-1.2a1.orig/debian/patches/pkgindex.diff
+++ tclex-1.2a1/debian/patches/pkgindex.diff
@@ -0,0 +1,25 @@
+
+--- tclex-1.2a1.orig/src/Makefile
++++ tclex-1.2a1/src/Makefile
+@@ -55,7 +55,8 @@
+ (if test -f $(PROJECTDIR)/pkgIndex.tcl; \
+ then grep -v $(PROJECT_VERSION) $(PROJECTDIR)/pkgIndex.tcl; \
+ else true; fi;) | \
+- echo 'package ifneeded $(PROJECT) $(PROJECT_VERSION) [list load [file join $$dir $(DLL).$(PROJECT_VERSION)] $(PROJECT)]' > pkgIndex.tcl
++ echo 'if {[package vcompare [info tclversion] 8.5] >= 0} return' > pkgIndex.tcl && \
++ echo 'package ifneeded $(PROJECT) $(PROJECT_VERSION) [list load [file join $$dir $(DLL).$(PROJECT_VERSION)] $(PROJECT)]' >> pkgIndex.tcl
+
+ install: all
+ if test ! -d $(PROJECTDIR); then mkdir $(PROJECTDIR); fi
+--- tclex-1.2a1.orig/src/Makefile.in
++++ tclex-1.2a1/src/Makefile.in
+@@ -54,7 +54,8 @@
+ (if test -f $(PROJECTDIR)/pkgIndex.tcl; \
+ then grep -v $(PROJECT_VERSION) $(PROJECTDIR)/pkgIndex.tcl; \
+ else true; fi;) | \
+- echo 'package ifneeded $(PROJECT) $(PROJECT_VERSION) [list load [file join $$dir $(DLL).$(PROJECT_VERSION)] $(PROJECT)]' > pkgIndex.tcl
++ echo 'if {[package vcompare [info tclversion] 8.5] >= 0} return' > pkgIndex.tcl && \
++ echo 'package ifneeded $(PROJECT) $(PROJECT_VERSION) [list load [file join $$dir $(DLL).$(PROJECT_VERSION)] $(PROJECT)]' >> pkgIndex.tcl
+
+ install: all
+ if test ! -d $(PROJECTDIR); then mkdir $(PROJECTDIR); fi
--- tclex-1.2a1.orig/debian/patches/flags.diff
+++ tclex-1.2a1/debian/patches/flags.diff
@@ -0,0 +1,15 @@
+
+--- tclex-1.2a1.orig/src/tcLex.c
++++ tclex-1.2a1/src/tcLex.c
+@@ -1145,7 +1145,11 @@
+
+ currentLexer = LexerGetCurrent(interp);
+ if (currentLexer) {
++#ifdef CMD_IS_DELETED
++ if (((Command*)currentLexer->command)->flags & CMD_IS_DELETED)
++#else
+ if (((Command*)currentLexer->command)->deleted)
++#endif
+ /* If command has been deleted, the token is meaningless. Return no result */
+ Tcl_ResetResult(interp);
+ else
--- tclex-1.2a1.orig/debian/patches/series
+++ tclex-1.2a1/debian/patches/series
@@ -0,0 +1,3 @@
+types.diff
+flags.diff
+pkgindex.diff