Commit 24915c3d authored by Kiyoshi Aman's avatar Kiyoshi Aman Committed by Ariadne Conill

testing/tf: new package

parent 73dc9eda
diff -Nurd tf-50b8/unix/unix.mak
--- tf-50b8/unix/unix.mak 2007-01-13 23:12:39.000000000 +0000
+++ 2018-01-24 09:55:28.039801506 +0000
@@ -87,46 +87,38 @@
-test -z "$(STRIP)" || $(STRIP) tf$(X) || true
- test -d "$(bindir)" || mkdir $(bindir)
- test -d "$(datadir)" || mkdir $(datadir)
+ test -d "$(DESTDIR)$(bindir)" || mkdir -p $(DESTDIR)$(bindir)
+ test -d "$(DESTDIR)$(datadir)" || mkdir -p $(DESTDIR)$(datadir)
install_TF $(TF): tf$(X) $(BUILDERS)
-@rm -f $(TF)
- cp tf$(X) $(TF)
- chmod $(MODE) $(TF)
+ cp tf$(X) $(DESTDIR)$(TF)
+ chmod $(MODE) $(DESTDIR)$(TF)
- test -z "$(SYMLINK)" || { rm -f $(SYMLINK) && ln -s $(TF) $(SYMLINK); }
+ cd $(DESTDIR)$(bindir)
+ ln -s tf tf5
LIBRARY $(TF_LIBDIR): ../tf-lib/tf-help ../tf-lib/tf-help.idx
@echo '## Creating library directory...'
-# @# Overly simplified shell commands, to avoid problems on ultrix
- -@test -n "$(TF_LIBDIR)" || echo "TF_LIBDIR is undefined."
- test -n "$(TF_LIBDIR)"
- test -d "$(TF_LIBDIR)" || mkdir $(TF_LIBDIR)
- -@test -d "$(TF_LIBDIR)" || echo "Can't make $(TF_LIBDIR) directory. See if"
- -@test -d "$(TF_LIBDIR)" || echo "there is already a file with that name."
- test -d "$(TF_LIBDIR)"
-# @#rm -f $(TF_LIBDIR)/*; # wrong: this would remove, etc.
+ test -d "$(DESTDIR)$(TF_LIBDIR)" || mkdir $(DESTDIR)$(TF_LIBDIR)
@echo '## Copying library files...'
cd ../tf-lib; \
for f in *; do test -f $$f && files="$$files $$f"; done; \
- ( cd $(TF_LIBDIR); rm -f $$files; ); \
- cp $$files $(TF_LIBDIR); \
- cd $(TF_LIBDIR); \
+ ( cd $(DESTDIR)$(TF_LIBDIR); rm -f $$files; ); \
+ cp $$files $(DESTDIR)$(TF_LIBDIR); \
+ cd $(DESTDIR)$(TF_LIBDIR); \
chmod $(MODE) $$files; chmod ugo-wx $$files
- chmod $(MODE) $(TF_LIBDIR)/CHANGES; chmod ugo-wx $(TF_LIBDIR)/CHANGES
- chmod $(MODE) $(TF_LIBDIR)
- -@cd $(TF_LIBDIR); old=`ls 2>/dev/null`; \
+ chmod $(MODE) $(DESTDIR)$(TF_LIBDIR)
+ -@cd $(DESTDIR)$(TF_LIBDIR); old=`ls 2>/dev/null`; \
if [ -n "$$old" ]; then \
echo "## WARNING: Obsolete files found in $(TF_LIBDIR): $$old"; \
@echo '## Creating links so old library names still work...'
-# @# note: ln -sf isn't portable.
- @cd $(TF_LIBDIR); \
+ @cd $(DESTDIR)$(TF_LIBDIR); \
rm -f; ln -s; \
rm -f; ln -s; \
rm -f; ln -s; \
From: Russ Allbery <>
Date: Sun, 17 Feb 2008 22:23:24 -0800
Subject: Correct use of va_list
va_copy a va_list before using it in vsprintf so that we don't use the
same va_list repeatedly. Patch taken from the upstream bug tracker
and will apparently be in the next release after 5.0beta8.
src/tfio.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/tfio.c b/src/tfio.c
index 2cd2103..151583e 100644
--- a/src/tfio.c
+++ b/src/tfio.c
@@ -497,6 +497,7 @@ void vSprintf(String *buf, int flags, const char *fmt, va_list ap)
const conString *Sval;
int len, min, max, leftjust, stars;
attr_t attrs = buf->attrs;
+ va_list ap_copy;
if (!(flags & SP_APPEND) && buf->data) Stringtrunc(buf, 0);
while (*fmt) {
@@ -522,7 +523,9 @@ void vSprintf(String *buf, int flags, const char *fmt, va_list ap)
case 'x': case 'X': case 'u': case 'o':
case 'f': case 'e': case 'E': case 'g': case 'G':
case 'p':
- vsprintf(tempbuf, spec, ap);
+ va_copy(ap_copy, ap);
+ vsprintf(tempbuf, spec, ap_copy);
+ va_end(ap_copy);
Stringcat(buf, tempbuf);
/* eat the arguments used by vsprintf() */
while (stars--) (void)va_arg(ap, int);
From: Russ Allbery <>
Date: Sun, 17 Feb 2008 22:17:59 -0800
Subject: Minor man page fixes
Escape hyphens properly, add a better man page header, fix the
placement of punctuation around font changes, and fix a spelling
src/tf.1.nroffman | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/tf.1.nroffman b/src/tf.1.nroffman
index e8daaca..90691db 100644
--- a/src/tf.1.nroffman
+++ b/src/tf.1.nroffman
@@ -1,11 +1,11 @@
.\" $Id: tf.1.nroffman,v 34000.8 2007/01/13 23:12:39 kkeys Exp $
+.TH TF 1 "2007-01-13" "TinyFugue 5.0" "TinyFugue"
tf \- TinyFugue, a MUD client
-.B "tf [-f\fIfile\fB] [-lnq] [\fIworld\fB]"
+.B "tf [\-f\fIfile\fB] [\-lnq] [\fIworld\fB]"
-.B "tf [-f\fIfile\fB] \fIhost\fB \fIport\fB"
+.B "tf [\-f\fIfile\fB] \fIhost\fB \fIport\fB"
\fITinyFugue\fR (also known as "Fugue" or "TF") is a line-based client
designed for connecting to MUD servers (note: LP, DIKU, and other servers
@@ -48,15 +48,15 @@ world and try to connect to it.
The \fBhost\fR may be an IP number or regular name format.
-.IP "-f\fIfile\fR"
+.IP "\-f\fIfile\fR"
Load \fIfile\fR instead of $HOME/.tfrc at startup.
-.IP "-f"
+.IP "\-f"
Do not load any personal configuration file. The library will still be loaded.
-.IP "-l"
+.IP "\-l"
Disable automatic login.
-.IP "-n"
+.IP "\-n"
Do not connect to any world at startup.
-.IP "-q"
+.IP "\-q"
Quiet login (overrides %{quiet} flag).
@@ -109,7 +109,7 @@ Log a session to a file.
Separate LP and Diku style prompts from normal output.
-Page output using a --More-- prompt.
+Page output using a \-\-More\-\- prompt.
Recall previously received text.
@@ -120,14 +120,14 @@ configuration file "", located in TFLIBDIR.
TFLIBDIR is defined when \fITF\fR is installed, and is often
/usr/local/lib/tf.lib, or under the home directory of the installer.
This library contains many macros
-and definitions essential to the correct operation of \fITF.\fR
+and definitions essential to the correct operation of \fITF\fR.
Next, \fITF\fR will attempt to read your personal configuration
file, $HOME/.tfrc, in which you can put any \fITF\fR commands you
want executed automatically at startup. Two of the most useful
commands to use in a \fITF\fR configuration file are /addworld and /load.
-For backward compatability, \fITF\fR will also try
+For backward compatibility, \fITF\fR will also try
to read the \fITinyTalk\fR configuration file.
Its name defautls to $HOME/.tinytalk, or can be defined by the TINYTALK
environment variable.
@@ -140,19 +140,19 @@ the first Tinyclient with any great number of features, including
hiliting and suppression of text, simple triggers, and separating input and
output on the screen.
Leo Plotkin (Grod) made rather extensive modifications to \fITinytalk\fR
-to produce \fITinywar,\fR which was plagued with some
+to produce \fITinywar\fR, which was plagued with some
serious bugs and was never officially released (the phrase "Tinywar
doesn't exist" is often quoted), and is now an unsupported client.
\fITF\fR began when Greg Hudson (Explorer_Bob) merged many of the new
-features of \fITinywar\fR back into \fITinyTalk,\fR
+features of \fITinywar\fR back into \fITinyTalk\fR,
and added many new features of his own, most notably the split screen.
Some of the code in Greg's releases was contributed by Leo Plotkin.
-After Greg moved on to \fIVaporTalk,\fR Ken Keys (Hawkeye) took over design
+After Greg moved on to \fIVaporTalk\fR, Ken Keys (Hawkeye) took over design
and maintenance of \fITF\fR in July 1991, and continues to make improvements
in features and performance.
The code size of \fITF\fR has surpassed 300K (unstripped),
-and is signifigantly larger than \fITinytalk.\fR
+and is signifigantly larger than \fITinytalk\fR.
It is, in fact, more than three times the size of a number of existing servers.
As of version 3.0, it has 66 builtin commands and 57 library commands,
each documented in the helpfile.
@@ -225,8 +225,8 @@ default macro library.
The .tinytalk file may not be supported in the future; use .tfrc instead.
-The '-' command line option in versions prior to 2.0 is no longer supported,
-and has been replaced with '-l'.
+The '\-' command line option in versions prior to 2.0 is no longer supported,
+and has been replaced with '\-l'.
From: Russ Allbery <>
Date: Sun, 14 Aug 2016 14:14:47 -0700
Subject: Fix library install path
The upstream top-level configure script doesn't correctly handle
--program-suffix without this tweak.
--- | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ b/
index e783564..c938531 100644
--- a/
+++ b/
@@ -599,13 +599,13 @@ fi
dnl The "right" way of using program_transform_name, program_prefix, and
dnl program_suffix expects you to use AC_ARG_PROGRAM here and do transformation
dnl in the Makefile, but we want the values now, so we do it ourselves.
test "${program_prefix}" != "NONE" && EXENAME="${program_prefix}${EXENAME}"
test "${program_suffix}" != "NONE" && EXENAME="${EXENAME}${program_suffix}"
if test "${program_transform_name}" != "NONE"; then
EXENAME=`echo "${EXENAME}" | sed "${program_transform_name}"`
if test "$enable_symlink" = "no"; then
@@ -616,6 +616,7 @@ else
From: Russ Allbery <>
Date: Sun, 14 Aug 2016 14:22:52 -0700
Subject: Fix spelling errors
occured -> occurred everywhere
CHANGES | 4 ++--
src/command.c | 2 +-
src/signals.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/CHANGES b/CHANGES
index 037c766..dfc5029 100644
@@ -316,7 +316,7 @@ Renamed BACKGROUND hook to BGTRIG (but old name still works).
Added BGTEXT hook.
Fixed to update for lines generated by /echo -w.
Fixed: ACTIVITY and PREACTIVITY hooks didn't run in the world in which the
- activity occured when caused by /echo -w.
+ activity occurred when caused by /echo -w.
Fixed order of /dc message relative to text already queued on socket.
Fixed: under certain conditions, a dead socket would not go away and could
not be foregrounded.
@@ -972,7 +972,7 @@ Fixed compilation error involving conditional and hstrerror under some
lame compilers (socket.c:788).
Fixed output misdirection during a read() inside a command sub.
Fixed rare bug causing command line to execute in wrong world when a
- simultaneous background trigger occured.
+ simultaneous background trigger occurred.
Fixed /world with no arguments.
Fixed fatal input bug after /histsize -i. (35a21)
Fixed bug which disabled history recording after /recall on an empty history.
diff --git a/src/command.c b/src/command.c
index 0409787..624d03b 100644
--- a/src/command.c
+++ b/src/command.c
@@ -605,7 +605,7 @@ int do_file_load(const char *args, int tinytalk)
!user_result->u.ival && !warned)
eprintf("(This line was implicitly treated as an /addworld "
- "because it occured before the first '/' line and did not "
+ "because it occurred before the first '/' line and did not "
"start with a '/', ';', or '#'.)");
warned = 1;
diff --git a/src/signals.c b/src/signals.c
index bd96b87..a00c70e 100644
--- a/src/signals.c
+++ b/src/signals.c
@@ -410,7 +410,7 @@ static char initial_dir[PATH_MAX+1] = "."; /* default: many users never chdir */
static void coremsg(FILE *dumpfile)
fputs("Also describe what you were doing in tf when this\r\n", stderr);
- fputs("occured, and whether you can repeat it.\r\n\n", stderr);
+ fputs("occurred, and whether you can repeat it.\r\n\n", stderr);
fprintf(dumpfile, "> %.512s\r\n", version);
if (*sysname) fprintf(dumpfile, "> %.256s\r\n", sysname);
fprintf(dumpfile, "> %.256s\r\n", featurestr->data);
diff -Nurd tf-50b8/src/malloc.c
--- tf-50b8/src/malloc.c 2007-01-13 23:12:39.000000000 +0000
+++ 2018-01-24 09:13:08.406519279 +0000
@@ -12,7 +12,7 @@
#include "signals.h"
#include "malloc.h"
-caddr_t mmalloc_base = NULL;
+void *mmalloc_base = NULL;
int low_memory_warning = 0;
static char *reserve = NULL;
diff -Nurd tf-50b8/src/macro.c
--- tf-50b8/src/macro.c 2007-01-13 23:12:39.000000000 +0000
+++ 2018-01-24 09:26:18.479836714 +0000
@@ -893,7 +893,8 @@
spec->attr &= ~F_NONE;
if (spec->nsubattr) {
- int n = pcre_info(spec->trig.ri->re, NULL, NULL);
+ int n = 0;
+ pcre_fullinfo(spec->trig.ri->re, NULL, PCRE_INFO_CAPTURECOUNT, &n);
for (i = 0; i < spec->nsubattr; i++) {
spec->subattr[i].attr &= ~F_NONE;
if (spec->subattr[i].subexp > n) {
diff -Nurd tf-50b8/src/pattern.c
--- tf-50b8/src/pattern.c 2007-01-13 23:12:39.000000000 +0000
+++ 2018-01-24 09:28:21.526500904 +0000
@@ -151,7 +151,7 @@
emsg ? emsg : "unknown error");
goto tf_reg_compile_error;
- n = pcre_info(ri->re, NULL, NULL);
+ pcre_fullinfo(ri->re, NULL, PCRE_INFO_CAPTURECOUNT, &n);
if (n < 0) goto tf_reg_compile_error;
ri->ovecsize = 3 * (n + 1);
ri->ovector = dmalloc(NULL, sizeof(int) * ri->ovecsize, file, line);
diff -Nurd tf-50b8/src/pattern.h
--- tf-50b8/src/pattern.h 2007-01-13 23:12:39.000000000 +0000
+++ 2018-01-24 09:28:36.039833945 +0000
@@ -10,7 +10,7 @@
#ifndef PATTERN_H
#define PATTERN_H
-#include "pcre-2.08/pcre.h"
+#include <pcre.h>
typedef struct RegInfo {
pcre *re;
# Contributor: Kiyoshi Aman <>
# Maintainer: Kiyoshi Aman <>
pkgdesc="Powerful curses-based MUD client"
makedepends="libressl-dev ncurses-dev pcre-dev $depends_dev"
# no testsuite provided
build() {
cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
sha512sums="3b99c039d7a9c6ab7ee7b1040ff7c99fe39cbe991f373333ea7c130d54383f102f14ae33303a415f5419cd43238caffc46114e842c6964329c0999e0f506e3d0 tf-50b8.tar.gz
9fb762886bfbe9e6c205e7a5cde6b17c516711daafba3999bdc4f2d1aa427043d95c6d6fa0a8b057e04222726b7692f0b35622c9d5fe063cfae50d3d9429cb25 0001-Add-DESTDIR-support.patch
7d2b2da0f4213fcfbce86eb9042cb83751c80aba5881861d5f49d4604a4eba52d60b5254c8b119528f0890ae7a68dfe4fea7eb2c94dd0d01676b194bca4db219 0002-Correct-use-of-va_list.patch
1e8f05d2744b60cc78f494283bb5f9ef7a804a6811d16028d5486a7394658a03aed04962adfd5bc60fe1517d3831b41f4ca1c3956a624f09a2a4b14f5ab91608 0003-Minor-man-page-fixes.patch
0066bbb3919e6b157eb276c3975cadc258a195037c0f199c3f9db83868d6035f81b79b9a41a743c99f317fd253a2f670dcf122d5f7c449fc1677c56cfaa8bb6a 0006-Fix-library-install-path.patch
a84aeaf097eb1ec61f9c86f73795ad9f8c111057837b1a0b127905302372e01b6489f9a19f14a29171cef9a787314d511dc98e1140d0c122dd9af5f526eb4bc0 0007-Fix-spelling-errors.patch
f9eadd1ffb2bc51db5d2bd0e9636573ef560bf849a780c8ee99bccb3870463a1b2caeaa1d3005e11d99c7689ae6ecd8f75056db09cf2d3df084058b4a3db32f0 0008-Build-on-musl.patch"
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment