games-server/fbmuck
[portage-squeep] / games-server / fbmuck / files / fbmuck-6.01-gentoo.patch
1 diff -Bru fbmuck-6.01.orig/game/restart.in fbmuck-6.01/game/restart.in
2 --- fbmuck-6.01.orig/game/restart.in 2003-09-11 12:33:35.000000000 -0700
3 +++ fbmuck-6.01/game/restart.in 2004-01-28 20:21:19.000000000 -0800
4 @@ -109,7 +109,7 @@
5
6 PANICDB="${DBOUT}.PANIC"
7 if [ -r $PANICDB ]; then
8 - end=`tail -1 $PANICDB`
9 + end=`tail -n 1 $PANICDB`
10 if [ "x$end" = "x***END OF DUMP***" ]; then
11 mv $PANICDB $DBOUT
12 rm -f $DELTAS
13 @@ -130,7 +130,7 @@
14 exit
15 fi
16
17 -end=`tail -1 $DBIN`
18 +end=`tail -n 1 $DBIN`
19 if [ "x$end" != 'x***END OF DUMP***' ]; then
20 echo "WARNING\! The "$DBIN" file is incomplete and therefore corrupt\!"
21 echo "Restart attempt aborted."
22 @@ -142,16 +142,16 @@
23
24 if [ -r $DELTAS ]; then
25 echo "Restoring from delta."
26 - end=`tail -1 $DELTAS`
27 + end=`tail -n 1 $DELTAS`
28 if [ "x$end" = "x***END OF DUMP***" ]; then
29 cat $DELTAS >> $DBIN
30 else
31 echo "Last delta is incomplete. Truncating to previous dump."
32 - grep -n '^***END OF DUMP***' $DELTAS | tail -1 > .ftmp$$
33 + grep -n '^***END OF DUMP***' $DELTAS | tail -n 1 > .ftmp$$
34 llinum=`cut -d: -f1 < .ftmp$$`
35 llcnt=`wc -l < .ftmp$$`
36 if [ $llcnt -gt 0 ]; then
37 - head -$llinum $DELTAS >> $DBIN
38 + head -n $llinum $DELTAS >> $DBIN
39 else
40 echo "Hmm. No previous delta dump."
41 fi
42 @@ -161,7 +161,7 @@
43 fi
44
45 dbsiz=`ls -1s $DBIN | awk '{print $1}'`
46 -diskfree=`df -k . | tail -1 | awk '{print $4}'`
47 +diskfree=`df -k . | tail -n 1 | awk '{print $4}'`
48
49 diskneeded=`expr $dbsiz \* 3`
50 spacediff=`expr $diskneeded - $diskfree`
51 diff -Bru fbmuck-6.01.orig/src/Makefile.in fbmuck-6.01/src/Makefile.in
52 --- fbmuck-6.01.orig/src/Makefile.in 2003-06-22 17:06:45.000000000 -0700
53 +++ fbmuck-6.01/src/Makefile.in 2004-02-03 14:59:24.291796462 -0800
54 @@ -37,15 +37,15 @@
55 INCLUDE= ${ROOT}/include
56
57 # The root of the directory tree to install to.
58 -prefix=@prefix@
59 +prefix=${D}@prefix@
60 exec_prefix=@exec_prefix@
61 # Destinations for binaries
62 INSTALL_BINDIR=@bindir@
63 INSTALL_SBINDIR=@sbindir@
64 # Destination for helpfiles
65 -INSTALL_HELPDIR=@datadir@/fbmuck
66 +INSTALL_HELPDIR=${D}@datadir@/fbmuck
67 # Destination for starter databases
68 -INSTALL_DBSDIR=@datadir@/fbmuck/starter_dbs
69 +INSTALL_DBSDIR=${D}@datadir@/fbmuck/starter_dbs
70
71 # ${DESTDIR} is used by the Debian packaging system to build the .debs
72 # and is defined by the debian/rules file.
73 @@ -157,7 +157,7 @@
74
75 all: ${TARGETS}
76
77 -fbmuck: ${P} ${COBJ} ${MALLOBJ} interface.o ${LOBJ} mkversion.sh Makefile
78 +fbmuck: ${COBJ} ${MALLOBJ} interface.o ${LOBJ} mkversion.sh Makefile
79 sh mkversion.sh
80 ${PRE} ${CC} ${CFLAGS} ${INCL} ${DEFS} -c version.c
81 if [ -e fbmuck ]; then ${MV} fbmuck fbmuck~ ; fi
82 diff -Bru fbmuck-6.01.orig/src/random.c fbmuck-6.01/src/random.c
83 --- fbmuck-6.01.orig/src/random.c 2003-06-22 16:55:45.000000000 -0700
84 +++ fbmuck-6.01/src/random.c 2004-01-28 15:37:29.000000000 -0800
85 @@ -5,6 +5,7 @@
86 #include <stdio.h>
87 #include <stdlib.h>
88 #include <string.h>
89 +#include <stdint.h>
90
91 /*****************************************************************/
92
93 @@ -25,8 +26,8 @@
94 * will fill a supplied 16-byte array with the digest.
95 */
96
97 -typedef unsigned long word32;
98 -typedef unsigned char byte;
99 +typedef uint32_t word32;
100 +typedef uint8_t byte;
101
102 struct xMD5Context {
103 word32 buf[4];