diff options
author | andreas <andreas@FreeBSD.org> | 1997-09-18 14:21:06 +0000 |
---|---|---|
committer | andreas <andreas@FreeBSD.org> | 1997-09-18 14:21:06 +0000 |
commit | 4d164db3125ec84c1e022b48e175db1f0a3b7d64 (patch) | |
tree | 1db0392d6e918df7fa86e1ef7bbfa28837bc7c83 /games/crossfire/files | |
parent | 0aa4519643fcee86514c399ed6126e3b31056736 (diff) | |
download | FreeBSD-ports-4d164db3125ec84c1e022b48e175db1f0a3b7d64.zip FreeBSD-ports-4d164db3125ec84c1e022b48e175db1f0a3b7d64.tar.gz |
many changes by Dave:
- Fix the password problem so passwords are actually checked.
- Change some default options like SAVE_HOMEDIR, XPM_PIX (you hade
the port requiring xpm but CF wasn't configured to link it in),
ForceCCOPTIONS, EXPLORE_MODE, etc.
- Remove the empty ${CFDIR}/lib/shutdown from the Makefile and the
PLIST. This file just causes the program to exit without saying
why until the user manually removes the file.
- Fix "crossfire -o" to call uname correctly.
- Set logfile to be line buffered (instead of block buffered) since they
hardly ever call fflush(3).
Submitted by: Dave Chapeskie <dchapes@golden.net>
Diffstat (limited to 'games/crossfire/files')
-rw-r--r-- | games/crossfire/files/patch-aa | 25 | ||||
-rw-r--r-- | games/crossfire/files/patch-ab | 31 | ||||
-rw-r--r-- | games/crossfire/files/patch-ag | 51 | ||||
-rw-r--r-- | games/crossfire/files/patch-ak | 11 | ||||
-rw-r--r-- | games/crossfire/files/patch-al | 11 | ||||
-rw-r--r-- | games/crossfire/files/patch-am | 14 | ||||
-rw-r--r-- | games/crossfire/files/patch-an | 12 |
7 files changed, 128 insertions, 27 deletions
diff --git a/games/crossfire/files/patch-aa b/games/crossfire/files/patch-aa index d693a14..8035616 100644 --- a/games/crossfire/files/patch-aa +++ b/games/crossfire/files/patch-aa @@ -1,15 +1,18 @@ ---- config/crosssite.def.orig Sat Jan 25 12:16:24 1997 -+++ config/crosssite.def Sat Jan 25 12:20:45 1997 -@@ -38,7 +38,7 @@ +--- config/crosssite.def.orig Sun Jan 5 19:59:48 1997 ++++ config/crosssite.def Wed Sep 17 15:55:13 1997 +@@ -36,10 +36,8 @@ + * (mwedel@pyramid.com) + */ - /* +-/* #define XPM_PIX -#define Xpm_LibDir /usr/local/lib/ +-*/ +#define Xpm_LibDir /usr/X11R6/lib/ - */ /* If your include files are someplace odd */ /*#define Xpm_Include /usr/local/include*/ -@@ -70,13 +70,13 @@ + +@@ -70,13 +68,13 @@ * This is a top root directory of all game staff as in UNIX-style * overall. */ @@ -25,7 +28,7 @@ /* Libraries location If this is undefined it defaults to the standard location for X lib files/crossfire on your machine */ -@@ -95,7 +95,8 @@ +@@ -95,7 +93,8 @@ /* Crossfire manual location If this is undefined it defaults to the standard location for manual pages on your machine.*/ /* #define CManPath Concat(CTop,/man) */ @@ -35,16 +38,16 @@ /* Force CC to use the specified options instead of the default -@@ -104,7 +105,7 @@ +@@ -104,7 +103,7 @@ * any of the default compiler options for your machine. */ /*define ForceCCOPTIONS -O -g -Wall */ -#undef ForceCCOPTIONS -+#define ForceCCOPTIONS -pipe -O2 ++#define ForceCCOPTIONS -O -pipe -Wall -Werror /* Extra_Flags are added onto the compilers default options. Can be * quite useful if you just want to add another flag or two, and not -@@ -165,11 +166,9 @@ +@@ -165,11 +164,9 @@ * Default: Sound support off. */ @@ -56,7 +59,7 @@ /* define this if using OpenWindows as your enviroment. This only * needs to be set if the openwindows server you use is -@@ -207,7 +206,7 @@ +@@ -207,7 +204,7 @@ * awk on most other systems will be OK. */ diff --git a/games/crossfire/files/patch-ab b/games/crossfire/files/patch-ab index d850d09..69756cd 100644 --- a/games/crossfire/files/patch-ab +++ b/games/crossfire/files/patch-ab @@ -1,11 +1,28 @@ ---- include/config.h.orig Mon Jan 6 01:59:44 1997 -+++ include/config.h Sat Jan 25 12:38:37 1997 -@@ -499,7 +499,7 @@ - /* CF 0.91.6 - SAVE_PLAYER now standard part of game */ +--- include/config.h.orig Sun Jan 5 19:59:44 1997 ++++ include/config.h Wed Sep 17 15:46:08 1997 +@@ -188,6 +188,7 @@ + */ + + /* #define EXPLORE_MODE */ ++#define EXPLORE_MODE + + /****************************************************************************/ + /* Patch: NOT_PERMADEATH Author: Charles Henrich */ +@@ -286,7 +287,7 @@ + #ifndef LOGFILE + #define LOGFILE "/tmp/cross.log" + #endif +-/*#define NO_ADD*/ ++#define NO_ADD + /* #define ONE_PLAYER_PR_UID */ + + /* +@@ -500,7 +501,7 @@ /*#define SAVE_PLAYER*/ --/* #define SAVE_HOMEDIR */ -+#define SAVE_HOMEDIR - /* #define LOCK_PLAYER */ + /* #define SAVE_HOMEDIR */ +-/* #define LOCK_PLAYER */ ++#define LOCK_PLAYER #define USE_CHECKSUM /* #define ENABLE_CHECKSUM */ /* Will be default in distant future versions */ + diff --git a/games/crossfire/files/patch-ag b/games/crossfire/files/patch-ag index f197248..6b36400 100644 --- a/games/crossfire/files/patch-ag +++ b/games/crossfire/files/patch-ag @@ -1,14 +1,47 @@ ---- server/main.c.orig Fri Nov 1 14:02:00 1996 -+++ server/main.c Fri Nov 1 14:06:15 1996 -@@ -153,7 +153,11 @@ +--- server/main.c.orig Sun Jan 5 19:59:27 1997 ++++ server/main.c Wed Sep 17 15:34:40 1997 +@@ -139,6 +139,36 @@ + } } - int check_password(char *typed,char *crypted) { -+#ifdef UGLY_PASSWORD_HACK -+ return(1); ++#if defined(__FreeBSD__) ++static unsigned char itoa64[] = ++ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./"; ++ ++static void ++to64(char *s, long v, int n) ++{ ++ while (--n >= 0) { ++ *s++ = itoa64[v&0x3f]; ++ v >>= 6; ++ } ++} ++ ++char * ++crypt_string(char *str, char *salt) ++{ ++ char s[10]; ++ if (salt==NULL) { ++ struct timeval tv; ++ gettimeofday(&tv,0); ++ to64(&s[0], random(), 3); ++ to64(&s[3], tv.tv_usec, 3); ++ to64(&s[6], tv.tv_sec, 2); ++ s[8] = '\0'; ++ salt = s; ++ } ++ return (crypt(str, salt)); ++} +#else - return !strcmp(crypt_string(typed,crypted),crypted); -+#endif ++ + char *crypt_string(char *str, char *salt) { + static char *c= + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./"; +@@ -151,6 +181,7 @@ + s[1]= salt[1]; + return crypt(str,s); } ++#endif - char *normalize_path (char *src, char *dst) { + int check_password(char *typed,char *crypted) { + return !strcmp(crypt_string(typed,crypted),crypted); diff --git a/games/crossfire/files/patch-ak b/games/crossfire/files/patch-ak new file mode 100644 index 0000000..d4c3325 --- /dev/null +++ b/games/crossfire/files/patch-ak @@ -0,0 +1,11 @@ +--- server/skills.c.orig Tue Sep 16 03:44:12 1997 ++++ server/skills.c Tue Sep 16 03:44:27 1997 +@@ -1007,7 +1007,7 @@ + int write_scroll (object *pl, object *scroll) { + + int success=0,confused=0,chosen_spell=-1,stat1=get_skill_stat1(pl); +- object *newScroll; ++ object *newScroll = NULL; + + /* this is a sanity check */ + if (scroll->type!=SCROLL){ diff --git a/games/crossfire/files/patch-al b/games/crossfire/files/patch-al new file mode 100644 index 0000000..19089e6 --- /dev/null +++ b/games/crossfire/files/patch-al @@ -0,0 +1,11 @@ +--- server/init.c.orig Sun Jan 5 19:59:27 1997 ++++ server/init.c Wed Sep 17 12:27:59 1997 +@@ -450,7 +450,7 @@ + printf("New improve weapon:\t<false>\n"); + #endif + printf("Max_time:\t%d\n",MAX_TIME); +- execl("/bin/uname", "uname", "-a", NULL); ++ execl("/usr/bin/uname", "uname", "-a", NULL); + LOG(llevError, "Opps, should't have gotten here."); + perror("execl"); + exit(-1); diff --git a/games/crossfire/files/patch-am b/games/crossfire/files/patch-am new file mode 100644 index 0000000..53d47c6 --- /dev/null +++ b/games/crossfire/files/patch-am @@ -0,0 +1,14 @@ +--- include/structs.h.orig Sun Jan 5 19:59:46 1997 ++++ include/structs.h Wed Sep 17 14:29:59 1997 +@@ -562,7 +562,11 @@ + char write_buf[MAX_BUF]; + char **info; + unsigned char infolines,infochars; /* How big the info-array is */ ++#if defined(__FreeBSD__) ++ char password[40]; ++#else + char password[16]; /* 2 (seed) + 11 (crypted) + 1 (EOS) + 2 (safety) = 16 */ ++#endif + #ifdef SAVE_INTERVAL + time_t last_save_time; + #endif /* SAVE_INTERVAL */ diff --git a/games/crossfire/files/patch-an b/games/crossfire/files/patch-an new file mode 100644 index 0000000..6773fcb --- /dev/null +++ b/games/crossfire/files/patch-an @@ -0,0 +1,12 @@ +--- server/daemon.c.orig Sun Jan 5 19:59:27 1997 ++++ server/daemon.c Wed Sep 17 14:39:21 1997 +@@ -50,6 +50,9 @@ + printf("Couldn't create logfile.\n"); + exit(0); + } ++#if defined(__FreeBSD__) ++ setlinebuf (logfile); ++#endif + fputs("\n========================\n",logfile); + fputs("Begin New Server Session\n",logfile); + fputs("========================\n\n",logfile); |