--- evolver-2.26.orig/evolver.1
+++ evolver-2.26/evolver.1
@@ -72,6 +72,7 @@
 .It  EVOLVERPATH
 Colon-separated list of paths automatically searched for datafiles, included
 files, or help documentation.
+.El                      \" Ends the list
 .Sh FURTHER DOCUMENTATION
 See manual224.pdf in the Evolver distribution, browse evolver.htm in the 
 doc subdirectory of the distribution, or browse the documentation on-line
@@ -81,4 +82,3 @@
 .Sh BUGS
 Send bug reports to brakke@susqu.edu.  Please include the datafile and 
 exact instructions for reproducing the problem.
-
--- evolver-2.26.orig/src/include.h
+++ evolver-2.26/src/include.h
@@ -150,11 +150,13 @@
 #define    MAXALLOC 0x7FFFFFFFL
 /* Some don't declare calloc, getenv, and bsearch in header files */
 /* Commenting these out now, since too many conflicts with headers.
+#ifndef __STDC__
 #ifndef MAC_OS_X
 char *calloc();
 char *getenv();
 char *bsearch();
 #endif
+#endif
 */
 /* PATHCHAR is name-separating character in paths */
 #define PATHCHAR '/'
--- evolver-2.26.orig/src/Makefile
+++ evolver-2.26/src/Makefile
@@ -42,9 +42,9 @@
 # Remove #'s from following 3 lines for LINUX with OpenGL GLUT graphics.
 # The graphics are on a second thread, so pthreads are needed.
 # NOTE: -DPTRHEADS is necessary with glutgraph.o.
-#CFLAGS= -DLINUX -DOOGL -DPTHREADS
-#GRAPH= glutgraph.o 
-#GRAPHLIB= -lGL -lGLU -lglut -lpthread
+CFLAGS= -DLINUX -DOOGL -DPTHREADS
+GRAPH= glutgraph.o 
+GRAPHLIB= -lreadline -lcurses -lGL -lGLU -lglut -lpthread
 # NOTE: It has been reported to me that RedHat 9 needs the following line
 # for GRAPHLIB, but earlier and later versions do okay with the GRAPHLIB
 # line just above.
--- evolver-2.26.orig/src/utility.c
+++ evolver-2.26/src/utility.c
@@ -3045,6 +3045,20 @@
     else env += len+1;
   } 
   
+  /* Try doc and doc/examples directories */
+  if (fd == NULL)
+  {
+    strncpy (path, "/usr/share/doc/evolver-doc/", 27);
+    strncpy (path+27, name, sizeof(path)-27-2);
+    fd = fopen (path, "r");
+  }
+  if (fd == NULL)
+  {
+    strncpy (path, "/usr/share/doc/evolver-doc/examples/", 36);
+    strncpy (path+36, name, sizeof(path)-36-2);
+    fd = fopen (path, "r");
+  }
+
   /* try .fe extension */
   if ( fd == NULL)
   {
--- evolver-2.26.orig/debian/evolver-doc.doc-base
+++ evolver-2.26/debian/evolver-doc.doc-base
@@ -0,0 +1,14 @@
+Document: evolver-doc
+Title: Surface Evolver Documentation
+Author:	Ken Brakke
+Abstract: The Surface Evolver is an interactive program for the study of
+ surfaces shaped by surface tension and other energies, and subject to various
+ constraints.
+Section: Apps/Math
+
+Format: HTML
+Index: /usr/share/doc/evolver-doc/default.htm
+Files: /usr/share/doc/evolver-doc/*.htm
+
+Format: PDF
+Files: /usr/share/doc/evolver-doc/*.pdf.gz
--- evolver-2.26.orig/debian/changelog
+++ evolver-2.26/debian/changelog
@@ -0,0 +1,79 @@
+evolver (2.26-1) unstable; urgency=low
+
+  * New upstream release.
+  * Incorporate Roger Leigh's work with Karl Chen's patch (closes: #317404).
+  * Discarded my evolver man page in favor of new upstream.
+
+ -- Adam C. Powell, IV <hazelsct@debian.org>  Mon, 31 Oct 2005 13:32:23 -0500
+
+evolver (2.23-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * src/include.h: Don't prototype calloc() and friends when building
+    with an ANSI C compiler (Closes: 317404).  Based on a patch by
+    Karl Chen.
+  * debian/control: Build-Depend on libreadline5-dev, rather than
+    the old libreadline4-dev.
+
+ -- Roger Leigh <rleigh@debian.org>  Fri, 22 Jul 2005 21:16:12 +0100
+
+evolver (2.23-1) unstable; urgency=low
+
+  * New upstream release.
+  * Changed Build-Depends from xlibs-dev to libx11-dev (closes: #255962).
+  * Removed "prototypes" including calloc from src/include.h (closes: 258657).
+
+ -- Adam C. Powell, IV <hazelsct@debian.org>  Wed, 11 Aug 2004 12:06:07 -0400
+
+evolver (2.20-1) unstable; urgency=low
+
+  * New upstream (closes: #206787).
+  * Forward-ported patch to include evolver-doc examples dir in default path.
+  * Changed graphics from "crummy X" to GLUT.
+  * Added readline dependency.
+  * Tweaked evolver manpage.
+  * Updated Standards-Version to 3.6.1.0.
+
+ -- Adam C. Powell, IV <hazelsct@debian.org>  Tue, 26 Aug 2003 10:53:22 -0400
+
+evolver (2.14-5) unstable; urgency=low
+
+  * Changed Build-Depends from xlib6g-dev to xlibs-dev (closes: #170172).
+  * Updated Standards-Version to 3.5.8.
+
+ -- Adam C. Powell, IV <hazelsct@debian.org>  Sun, 24 Nov 2002 11:38:11 -0500
+
+evolver (2.14-4) unstable; urgency=low
+
+  * Added symlink from /usr/share/doc/evolver-doc/evolver.htm to default.htm
+    since the former is missing and lots of files link the #doc top anchor
+    which is only present in the latter (closes: #105395).
+  * Bumped Standards-Version since the old one doesn't make sense with
+    DH_COMPAT=2.
+  * Added a manpage for evolver.
+
+ -- Adam C. Powell, IV <hazelsct@debian.org>  Thu, 20 Sep 2001 15:25:41 -0400
+
+evolver (2.14-3) unstable; urgency=low
+
+  * Added xlib6g-dev to Bulid-Depends, not xlibs-dev so it will still build on
+    potato. (closes: #100806)
+
+ -- Adam C. Powell, IV <hazelsct@debian.org>  Thu, 14 Jun 2001 08:03:45 -0400
+
+evolver (2.14-2) unstable; urgency=low
+
+  * Contacted upstream author for a more thorough and acceptable copyright
+    statement.
+
+ -- Adam C. Powell, IV <hazelsct@debian.org>  Tue, 14 Nov 2000 17:20:58 -0500
+
+evolver (2.14-1) unstable; urgency=low
+
+  * Initial Release (Closes: #75003).
+
+ -- Adam C. Powell, IV <hazelsct@debian.org>  Tue,  7 Nov 2000 16:57:55 -0500
+
+Local variables:
+add-log-full-name: "Adam C. Powell, IV"
+End:
--- evolver-2.26.orig/debian/copyright
+++ evolver-2.26/debian/copyright
@@ -0,0 +1,11 @@
+This package was debianized by Adam Powell <hazelsct@mit.edu> on October 17,
+2000.
+
+It was downloaded from
+http://www.susqu.edu/facstaff/b/brakke/evolver/evolver.html
+
+Upstream author: Ken Brakke
+
+Copyright (from personal communication with author November 10, 2000):
+
+"you may copy, modify, and redistribute freely."
--- evolver-2.26.orig/debian/control
+++ evolver-2.26/debian/control
@@ -0,0 +1,23 @@
+Source: evolver
+Section: math
+Priority: extra
+Maintainer: Adam C. Powell, IV <hazelsct@debian.org>
+Standards-Version: 3.6.2.1
+Build-Depends: debhelper (>= 2.1.0), libx11-dev, libglut3-dev | libglut-dev, libreadline5-dev | libreadline-dev
+
+Package: evolver
+Architecture: any
+Section: math
+Depends: ${shlibs:Depends}
+Suggests: evolver-doc, geomview
+Description: Surface Evolver
+ The Surface Evolver is an interactive program for the study of surfaces shaped
+ by surface tension and other energies, and subject to various constraints.
+
+Package: evolver-doc
+Architecture: all
+Section: doc
+Suggests: evolver
+Description: Surface Evolver documentation and examples
+ The Surface Evolver is an interactive program for the study of surfaces shaped
+ by surface tension and other energies, and subject to various constraints.
--- evolver-2.26.orig/debian/rules
+++ evolver-2.26/debian/rules
@@ -0,0 +1,81 @@
+#!/usr/bin/make -f
+# Sample debian/rules file - for GNU Hello (1.3).
+# Copyright 1994,1995 by Ian Jackson.
+# I hereby give you perpetual unlimited permission to copy,
+# modify and relicense this file, provided that you do not remove
+# my name from the file itself.  (I assert my moral right of
+# paternity under the Copyright, Designs and Patents Act 1988.)
+# This file may have to be extensively modified
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This is the debhelper compatability version to use.
+export DH_COMPAT=3
+
+clean:
+	dh_testdir
+	dh_clean
+	rm -f build install install-indep install-arch
+	rm -f src/evolver src/*.o
+
+build:
+	dh_testdir
+	make -C src evolver
+	touch build
+
+# These two are only usefull if you can selectively
+# install for arch and indep stuff.
+install-arch: build
+	dh_installdirs -a
+	install -d debian/evolver/usr/bin
+	cp -p src/evolver debian/evolver/usr/bin/evolver
+	dh_installman evolver.1
+	touch install-arch
+
+install-indep:
+	dh_installdirs -i
+	install -d debian/evolver-doc/usr/share/doc/evolver-doc/examples
+	cp -p doc/* manual226.pdf debian/evolver-doc/usr/share/doc/evolver-doc
+	cp -p fe/* debian/evolver-doc/usr/share/doc/evolver-doc/examples
+	chmod -x debian/evolver-doc/usr/share/doc/evolver-doc/examples/*
+	rm debian/evolver-doc/usr/share/doc/evolver-doc/evolver.htm
+	ln -s default.htm \
+	  debian/evolver-doc/usr/share/doc/evolver-doc/evolver.htm
+	touch install-indep
+
+install: install-arch install-indep
+	touch install
+
+binary-indep: install-indep
+	dh_testdir -i
+	dh_testroot -i
+	dh_installdocs -i
+	dh_installchangelogs -i
+	dh_compress -i
+	dh_fixperms -i
+	dh_installdeb -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+binary-arch: install-arch
+	dh_testdir -a
+	dh_testroot -a
+	dh_installdocs -a
+	dh_installmanpages -a
+	dh_installchangelogs -a
+	dh_strip -a
+	dh_compress -a
+	dh_fixperms -a
+	dh_installdeb -a
+	dh_shlibdeps -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+# Below here is fairly generic really
+
+binary:		binary-indep binary-arch
+
+.PHONY: binary binary-arch binary-indep clean checkroot
