# This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # . # ./Makefile # ./distinfo # ./files # ./files/patch-utils.h # ./files/patch-utils.c # ./files/patch-tt.h # ./files/patch-tt.c # ./files/patch-Makefile # ./pkg-plist # ./pkg-descr # echo c - . mkdir -p . > /dev/null 2>&1 echo x - ./Makefile sed 's/^X//' >./Makefile << 'END-of-./Makefile' X# New ports collection makefile for: tt X# Date created: 11 Sent 2003 X# Whom: Alexey Dokuchaev X# X# $FreeBSD$ X# X XPORTNAME= tt XPORTVERSION= 14.0 XCATEGORIES= games XMASTER_SITES= http://www.miketaylor.org.uk/tech/tt/ X XMAINTAINER= danfe@regency.nsu.ru XCOMMENT= Tetris for Terminals X XALL_TARGET= tt X Xdo-install: X ${INSTALL_PROGRAM} ${WRKSRC}/tt ${PREFIX}/bin X.if !defined(NOPORTDOCS) X @${MKDIR} ${DOCSDIR} X ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} X.endif X X.include END-of-./Makefile echo x - ./distinfo sed 's/^X//' >./distinfo << 'END-of-./distinfo' XMD5 (tt-14.0.tar.gz) = 9d6c558f07ed5b904e4e8ffcfc6b43c4 END-of-./distinfo echo c - ./files mkdir -p ./files > /dev/null 2>&1 echo x - ./files/patch-utils.h sed 's/^X//' >./files/patch-utils.h << 'END-of-./files/patch-utils.h' X--- utils.h.orig Fri Sep 12 22:12:44 2003 X+++ utils.h Fri Sep 12 22:13:00 2003 X@@ -12,7 +12,7 @@ X \***************************************************************************/ X X extern char *basename (); X-extern char *form (); X+extern char *form (const char *fmt_string, ...); X extern void die (); X extern void get_termcap (); X extern void flush_keyboard (); END-of-./files/patch-utils.h echo x - ./files/patch-utils.c sed 's/^X//' >./files/patch-utils.c << 'END-of-./files/patch-utils.c' X--- utils.c.orig Fri Sep 12 18:01:20 2003 X+++ utils.c Fri Sep 12 22:21:05 2003 X@@ -30,8 +30,7 @@ X # include X #endif X #include X-#undef va_start /* required with Red Hat's ncurses :-P */ X-#include X+#include X #include X #include X #include /* M001 */ X@@ -75,16 +74,13 @@ X \***************************************************************************/ X X /*VARARGS*/ X-char *form (va_alist) X- va_dcl X+char *form (const char *fmt_string, ...) X { X va_list pvar; X- char *fmt_string; X static char result[LINELEN]; X X- va_start (pvar); X- fmt_string = va_arg (pvar, char*); X- (void) vsprintf (result, fmt_string, pvar); X+ va_start (pvar, fmt_string); X+ (void) vsnprintf (result, LINELEN, fmt_string, pvar); X va_end (pvar); X return (result); X } END-of-./files/patch-utils.c echo x - ./files/patch-tt.h sed 's/^X//' >./files/patch-tt.h << 'END-of-./files/patch-tt.h' X--- tt.h.orig Sat Sep 13 09:20:29 2003 X+++ tt.h Sat Sep 13 09:48:57 2003 X@@ -20,7 +20,7 @@ X |* *| X \***************************************************************************/ X X-#undef LOCKF /* Use lockf(3) instead of open(O_EXCL) */ X+#define LOCKF /* Use lockf(3) instead of open(O_EXCL) */ X X /***************************************************************************\ X |* *| X@@ -187,5 +187,5 @@ X /*--------------------------------------------------------------------------*/ X X /* This is probably still the most portable way ... */ X-extern int read(), close(), sleep(), unlink(), write(), getuid(); X-extern void usleep(); X+//extern int read(), close(), sleep(), unlink(), write(), getuid(); X+//extern void usleep(); END-of-./files/patch-tt.h echo x - ./files/patch-tt.c sed 's/^X//' >./files/patch-tt.c << 'END-of-./files/patch-tt.c' X--- tt.c.orig Tue May 27 17:46:22 2003 X+++ tt.c Sat Sep 13 09:55:18 2003 X@@ -21,6 +21,7 @@ X #include X #include X #include X+#include X #include X #include X X@@ -32,19 +33,19 @@ X X /*-------------------------------------------------------------------------*/ X X-extern time_t time (); X-extern char *ctime (); X-extern char *malloc (); X-extern char *getenv (); X-extern char *getlogin (); X-extern struct passwd *getpwuid (); X+//extern time_t time (); X+//extern char *ctime (); X+//extern char *malloc (); X+//extern char *getenv (); X+//extern char *getlogin (); X+//extern struct passwd *getpwuid (); X X static int get_key (); X X /*-------------------------------------------------------------------------*/ X X char *LOCK_FILE = "/home/mike/lib/ttlock/ttlock"; X-char *SCORE_FILE = "/home/mike/lib/ttscores"; X+char *SCORE_FILE = "/var/games/ttscores"; X X /* These four variables determine which game we're playing */ X struct piece *pieces = pieces4; END-of-./files/patch-tt.c echo x - ./files/patch-Makefile sed 's/^X//' >./files/patch-Makefile << 'END-of-./files/patch-Makefile' X--- Makefile.orig Thu Sep 11 15:09:08 2003 X+++ Makefile Fri Sep 12 22:20:35 2003 X@@ -6,10 +6,10 @@ X LINTFLAGS = -abh X X # --- Choose one of these CFLAGS --- X-CFLAGS = $(OPT) # Sun BSD, Red Hat Linux X-#CFLAGS = $(OPT) -DSYSV # SCO System V X-#CFLAGS = $(OPT) -DSYSV -DNO_NAP_SYSCALL # Generic System V? X-#CFLAGS = $(OPT) -DNO_USLEEP_SYSCALL # Generic BSD? X+CFLAGS += $(OPT) # Sun BSD, Red Hat Linux X+#CFLAGS += $(OPT) -DSYSV # SCO System V X+#CFLAGS += $(OPT) -DSYSV -DNO_NAP_SYSCALL # Generic System V? X+#CFLAGS += $(OPT) -DNO_USLEEP_SYSCALL # Generic BSD? X X # --- Choose one of these LDLIBS --- X LDLIBS = -lcurses -ltermcap # Sun and Generic BSD END-of-./files/patch-Makefile echo x - ./pkg-plist sed 's/^X//' >./pkg-plist << 'END-of-./pkg-plist' Xbin/tt X%%PORTDOCS%%%%DOCSDIR%%/README X%%PORTDOCS%%@dirrm %%DOCSDIR%% X@unexec if [ -f /var/games/ttscores ]; then rm /var/games/ttscores; fi END-of-./pkg-plist echo x - ./pkg-descr sed 's/^X//' >./pkg-descr << 'END-of-./pkg-descr' Xtt is an implementation of the well-known game tetris. Quadominoes X(groups of four squares joined orthogonally together) fall slowly down Xthe screen, accumulating at the bottom, and when the pile reaches the Xtop of the screen the game is over. The pieces may be moved to the left Xor right, and rotated as they fall, with the aim of making them Xtessellate with the pieces already at the bottom of the game area. The Xheight of the stack of pieces can be reduced by filling a complete row Xof ten squares, at which point that row will disappear, and those above Xwill fall down into its place. It is possible (and desirable) to destroy Xmultiple rows at once. X XWWW: http://www.miketaylor.org.uk/tech/tt/ END-of-./pkg-descr exit