warp stable port information

Package: warp
Version: 2002.03.12
Revision: 14
Description: Classic space-war game
Source: http://www.engr.usask.ca/~norume/warp/%n-%v-11.tar.gz
SourceDirectory: warp7
License: Artistic
DocFiles: README
#
# Need to get games uid
#
BuildDepends: fink (>= 0.24.12)
Depends: passwd-games
PatchFile: %n.patch
PatchFile-MD5: 3b85bd803284b6072ec51937fda8234b
PatchScript: <<
%{default_script}
perl -ni -e 'print unless m{\.o: /usr/include/}' MacOSX/Makefile
<<
InstallScript: <<
mkdir -p %i/bin
mkdir -p %i/share/man/man1
make -w bin="%i/bin/" privlib="%i/lib/warp/" mansrc="%i/share/man/man1/" install
<<
PostInstScript: <<
chown games %p/bin/warp
chown games %p/lib/warp/{.,warp.doc}
chown games %p/lib/warp/smap.{0,1,2,3,4,5,6,7}
<<
DescUsage: <<
- Running Warp -
1) Start Terminal.app and set the window to 80 columns by 24 lines.
2) Type `warp', (without the quotes) followed by a carriage return.
3) Follow the instructions!

- If you get complaints like `getwd: cannot open ..' when starting warp -
warp runs setuid in order to protect the high-score file and needs r-x
permission on the directory chain leading to the directory from which you
issue the warp command, so you need at least 550 or 555 permission on all
ancestors of the directory from which you run warp. It will probably start
without complaint from either the root directory or your HOME directory.
<<
DescPort: <<
Minor changes to use modern termios routines and to support operation
on local windows (i.e. no serial port delays for timing!).

dmacks removed the list of make dependencies on system headers because
the list appears out-of-date with respect to the sources and relies on
headers that don't exist.

dmacks used system headers instead of local declarations.

nieder fixed --build-as-nobody installation
<<
Maintainer: Eric Norum

Source-MD5: db25e4cce521a9f90731f9e34902c573

warp stable port .patch

diff -Nurd -x'*~' warp7.orig/score.c warp7/score.c
--- warp7.orig/score.c 2001-05-26 22:19:35.000000000 -0400
+++ warp7/score.c 2006-04-06 21:48:01.000000000 -0400
@@ -24,6 +24,7 @@
#include "weapon.h"
#include "INTERN.h"
#include "score.h"
+#include

void
score_init()
diff -Nurd -x'*~' warp7.orig/sm.c warp7/sm.c
--- warp7.orig/sm.c 1998-11-04 13:09:23.000000000 -0500
+++ warp7/sm.c 2006-04-06 21:52:46.000000000 -0400
@@ -9,6 +9,7 @@
#include
#include
#include "config.h"
+#include

main()
{
diff -Nurd -x'*~' warp7.orig/term.h warp7/term.h
--- warp7.orig/term.h 2001-05-27 14:30:05.000000000 -0400
+++ warp7/term.h 2006-04-06 21:34:42.000000000 -0400
@@ -115,7 +115,7 @@
# endif /* lint */
# else /* RDCHK */
# ifndef O_NDELAY /* assert O_NDELAY */
- ??? PENDING isn't defined correctly in warp.h
+ ??? PENDING is not defined correctly in warp.h
# endif
EXT int devtty INIT(0);
# ifndef lint
@@ -126,7 +126,7 @@
# endif /* RDCHK */
# endif /* FIONREAD */
# else /* PENDING */
- ??? warp won't work without PENDING
+ ??? warp will not work without PENDING
# ifndef lint
# define input_pending() (nextin!=nextout)
# else
@@ -154,7 +154,7 @@
# endif /* lint */
# else /* RDCHK */
# ifndef O_NDELAY /* assert O_NDELAY */
- ??? PENDING isn't defined correctly in warp.h
+ ??? PENDING is not defined correctly in warp.h
# endif
EXT int devtty INIT(0);
EXT bool is_input INIT(FALSE);
@@ -168,7 +168,7 @@
# endif /* RDCHK */
# endif /* FIONREAD */
# else /* PENDING */
- ??? warp won't work without PENDING
+ ??? warp will not work without PENDING
# define read_tty(addr,size) read(0,addr,size)
# define input_pending() (FALSE)
# endif /* PENDING */
diff -Nurd -x'*~' warp7.orig/util.c warp7/util.c
--- warp7.orig/util.c 1998-11-04 13:09:09.000000000 -0500
+++ warp7/util.c 2006-04-06 21:57:18.000000000 -0400
@@ -20,6 +20,7 @@
#include "term.h"
#include "INTERN.h"
#include "util.h"
+#include

void
util_init()
@@ -97,7 +98,6 @@
MEM_SIZE size;
{
char *ptr;
- char *malloc();

ptr = malloc(size?size:1); /* malloc(0) is NASTY on our system */
if (ptr != Nullch)
diff -Nurd -x'*~' warp7.orig/util.h warp7/util.h
--- warp7.orig/util.h 2001-05-27 16:21:51.000000000 -0400
+++ warp7/util.h 2006-04-06 21:49:44.000000000 -0400
@@ -6,6 +6,8 @@
*
*/

+#include
+
#if RANDBITS < 15 || defined(lint)
#define rand_mod(m) getpid()
#define RANDRAND 0.0
@@ -15,7 +17,6 @@
#if RANDBITS == 15 /* 15 bits of rand()? */
#define RANDRAND 268435456.0 /* that's 2**28 */
#define HALFRAND 0x4000 /* that's 2**14 */
-int rand();
#define myrand() (rand()&32767)
#define rand_mod(m) ((int)((double)myrand() / 32768.0 * ((double)(m))))
/* pick number in 0..m-1 */
@@ -25,7 +26,6 @@
#if RANDBITS < 31 /* 16 bits of rand()? */
#define RANDRAND 1073741824.0 /* that's 2**30 */
#define HALFRAND 0x8000 /* that's 2**15 */
-unsigned rand();
#define myrand() (rand()&65535)
#define rand_mod(m) ((int)((double)myrand() / 65536.0 * ((double)(m))))
/* pick number in 0..m-1 */
@@ -33,7 +33,6 @@
#else /* assume 31 bits */
#define RANDRAND 1152921504606846976.0 /* that's 2**60 */
#define HALFRAND 0x40000000 /* that's 2**30 */
-long rand();
#define myrand() rand()
#define rand_mod(m) ((myrand() / 37) % (m)) /* pick number in 0..m-1 */
/*
diff -Nurd -x'*~' warp7.orig/version.c warp7/version.c
--- warp7.orig/version.c 1998-11-04 13:09:24.000000000 -0500
+++ warp7/version.c 2006-04-06 21:51:51.000000000 -0400
@@ -9,6 +9,7 @@
#include "patchlevel.h"
#include "INTERN.h"
#include "version.h"
+#include

/* Print out the version number. */

diff -Nurd -x'*~' warp7.orig/warp.h warp7/warp.h
--- warp7.orig/warp.h 2001-05-21 21:46:36.000000000 -0400
+++ warp7/warp.h 2006-04-06 21:36:42.000000000 -0400
@@ -22,6 +22,7 @@
#include
#include
#include
+#include

/* WARPLIB must be readable and writeable by warp, but not by anyone who you
* don't trust. In other words, to set up warp so everyone can play and
@@ -322,16 +323,8 @@

/* various things of type char */

-char *index();
-char *rindex();
-char *getenv();
-char *strcat();
-char *strcpy();
-#ifdef CHARSPRINTF
-char *sprintf();
-#else
-int sprintf();
-#endif
+#include
+#include

EXT char buf[LBUFLEN+1]; /* general purpose line buffer */

@@ -454,7 +447,7 @@

EXT char spbuf[512];

-char *index(), *ttyname(), *malloc(), *ctime(), *strcpy();
+char *index(), *ttyname(), *ctime();
char *getenv(), cmstore(), *tgoto();
long atol();

--- a/MacOSX/Makefile 2012-03-10 15:14:46.000000000 -0500
+++ b/MacOSX/Makefile 2012-03-10 15:21:52.000000000 -0500
@@ -81,7 +81,7 @@
# won't work with csh
export PATH || exit 1
- if test `pwd` != $(bin); then cp $(public) $(bin); fi
- - cd $(bin); chmod 755 $(public); /usr/sbin/chown '$(CHOWNER)' $(public)
+ - cd $(bin); chmod 755 $(public)
- chmod 4711 $(bin)/warp
- chmod 755 makedir
- ./makedir `./filexp $(privlib)`
@@ -92,7 +92,6 @@
- \
cd `./filexp $(privlib)`; \
chmod 755 $(private); \
-/usr/sbin/chown '$(CHOWNER)' . $(private); \
cp /dev/null save.blurfl
- \
if test ! -f `./filexp $(privlib)/warp.news`; then \

warp _unstable_ port .patch