tf stable port information

Package: tf
Version: 40s1
Revision: 1022
Source: http://ftp.tcp.com/pub/mud/Clients/tinyfugue/tf-%v.tar.gz
Source-MD5: db6fa9a1aac0b7f199567d81c4b5c81d
GCC: 4.0
CompileScript: true
InstallScript: <<
mkdir %i/bin
mkdir %i/lib
mkdir -p %i/share/man/man1
(export FINK_BUILD=%i FINK_LIBDIR=%P/lib/%n-%v-lib ; ./unixmake)
ln -s %n-%v %i/bin/%n
<<
#PostRmScript: rm %p/bin/%n
#PostInstScript: ln -s %p/bin/%n-%v %p/bin/%n
DocFiles: README CHANGES COPYING CREDITS
BuildDepends: fink (>= 0.24.12-1)
PatchFile: %n.patch
PatchFile-MD5: 95f005e612359a9782aa845ca43f9840
#
Description: TinyFugue, a popular MUSH and MUD client
DescDetail: <<
TinyFugue, aka "tf", is a flexible, screen-oriented MUD client, for
use with any type of MUD. TinyFugue is one of the most popular and
powerful mud clients.
<<
DescPackaging: This program does not use a standard configure / make system and required a little bit of patching to the build scripts in order to work well with fink. This is my first attempt at making a fink package.
License: GPL
Homepage: http://tf.tcp.com/~hawkeye/tf/
Maintainer: Avram Cherry

tf stable port .patch

diff -Naur tf-40s1old/unix/Config tf-40s1/unix/Config
--- tf-40s1old/unix/Config Sat Mar 6 14:43:28 1999
+++ tf-40s1/unix/Config Fri Apr 19 00:19:26 2002
@@ -33,9 +33,9 @@
# even if an old version is currently in use. You can remove
# the old version manually later when it is no longer in use.

-# TF="/usr/local/bin/tf-${TFVER}"
-# LIBDIR="/usr/local/lib/tf-${TFVER}-lib"
-# SYMLINK="/usr/local/bin/tf"
+TF="${FINK_BUILD}/bin/tf-${TFVER}"
+LIBDIR="${FINK_BUILD}/lib/tf-${TFVER}-lib"
+#SYMLINK="${FINK_BUILD}/bin/tf"


### Manual Page.
@@ -44,8 +44,8 @@
# uses nroff format; set MANTYPE=cat if your man uses pre-formatted
# vt100 "catman" pages. Default is "cat".

-# MANTYPE="nroff"
-# MANPAGE="/usr/local/man/man1/tf.1"
+MANTYPE="nroff"
+MANPAGE="${FINK_BUILD}/share/man/man1/tf.1"


### Flags.
@@ -109,8 +109,8 @@
# If unixmake told you to set CC=cc, be sure to uncomment the line below
# by removing the leading "#".

-# CC=cc
-# CCFLAGS="-g"
+CC=cc
+CCFLAGS="-g -no-cpp-precomp"


### Stripping.
diff -Naur tf-40s1old/unix/tfconfig tf-40s1/unix/tfconfig
--- tf-40s1old/unix/tfconfig Sat Mar 6 14:43:28 1999
+++ tf-40s1/unix/tfconfig Fri Apr 19 01:18:01 2002
@@ -45,7 +45,7 @@
TF="${TFDEV_TF}"
FLAGS=''
GNU_C=0
-LIBDIR="${TFDEV_LIBDIR}"
+LIBDIR="${FINK_LIBDIR}"
LIBS=''
MAILDIR=''
# MAKE='' ;# Use the value from the environment if there is one.
@@ -224,6 +224,7 @@

echo 'To change these locations type "n" now and edit the unix/Config file.'
while [ -z "$ans" ]; do
+ break
echo 'Continue? (y/n)'
read ans;
case "$ans" in
@@ -238,7 +239,7 @@

rm -f ../src/Makefile ${AOUT}

-echo "#define LIBDIR \"${LIBDIR}\"" >&4
+echo "#define LIBDIR \"${FINK_LIBDIR}\"" >&4
if [ -n "$MAILDIR" ]; then
echo "#define MAILDIR \"${MAILDIR}\"" >&4
else
diff -ur tf-40s1.bak/src/history.c tf-40s1/src/history.c
--- tf-40s1.bak/src/history.c 1999-03-06 14:43:24.000000000 -0800
+++ tf-40s1/src/history.c 2005-06-13 16:28:37.000000000 -0700
@@ -38,18 +38,6 @@
#define LOCALSIZE 100 /* local history size */
#define INPUTSIZE 100 /* command history buffer size */

-typedef struct History { /* circular list of Alines, and logfile */
- struct Aline **alines;
- int size; /* actual number of lines currently saved */
- int maxsize; /* maximum number of lines that can be saved */
- int first; /* position of first line in circular array */
- int last; /* position of last line in circular array */
- int index; /* current recall position */
- int total; /* total number of lines ever saved */
- TFILE *logfile;
- CONST char *logname;
-} History;
-
#define empty(hist) (!(hist)->alines || !(hist)->size)

static void FDECL(alloc_history,(History *hist, int maxsize));
diff -ur tf-40s1.bak/src/history.h tf-40s1/src/history.h
--- tf-40s1.bak/src/history.h 1999-03-06 14:43:24.000000000 -0800
+++ tf-40s1/src/history.h 2005-06-13 16:28:47.000000000 -0700
@@ -12,6 +12,18 @@

# ifndef NO_HISTORY

+typedef struct History { /* circular list of Alines, and logfile */
+ struct Aline **alines;
+ int size; /* actual number of lines currently saved */
+ int maxsize; /* maximum number of lines that can be saved */
+ int first; /* position of first line in circular array */
+ int last; /* position of last line in circular array */
+ int index; /* current recall position */
+ int total; /* total number of lines ever saved */
+ TFILE *logfile;
+ CONST char *logname;
+} History;
+
extern void NDECL(init_histories);
extern struct History *FDECL(init_history,(struct History *hist, int maxsize));
extern void FDECL(free_history,(struct History *hist));

tf _unstable_ port .patch