diff options
author | andreas <andreas@FreeBSD.org> | 1997-09-18 22:21:06 +0800 |
---|---|---|
committer | andreas <andreas@FreeBSD.org> | 1997-09-18 22:21:06 +0800 |
commit | 4d164db3125ec84c1e022b48e175db1f0a3b7d64 (patch) | |
tree | 1db0392d6e918df7fa86e1ef7bbfa28837bc7c83 /games | |
parent | 0aa4519643fcee86514c399ed6126e3b31056736 (diff) | |
download | freebsd-ports-gnome-4d164db3125ec84c1e022b48e175db1f0a3b7d64.tar.gz freebsd-ports-gnome-4d164db3125ec84c1e022b48e175db1f0a3b7d64.tar.zst freebsd-ports-gnome-4d164db3125ec84c1e022b48e175db1f0a3b7d64.zip |
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')
24 files changed, 393 insertions, 141 deletions
diff --git a/games/crossfire-client/Makefile b/games/crossfire-client/Makefile index d0a1bddb745a..4fda9055df0e 100644 --- a/games/crossfire-client/Makefile +++ b/games/crossfire-client/Makefile @@ -3,7 +3,7 @@ # Date created: So 27 Okt 1996 12:25:55 MET # Whom: Andreas Klemm <andreas@klemm.gtn.com> # -# $Id: Makefile,v 1.15 1997/05/29 09:40:30 andreas Exp $ +# $Id: Makefile,v 1.16 1997/07/18 05:04:10 asami Exp $ # DISTNAME= crossfire-0.93.0 @@ -16,7 +16,7 @@ MASTER_SITES= ftp://ra.pyramid.com/pub/crossfire/ \ DISTFILES= ${CF_SOURCES} ${CF_DOC} ${CF_MAPS} ${CF_SOUNDS} \ ${CF_ARCH} ${CF_CLSERV} -MAINTAINER= andreas@klemm.gtn.com +MAINTAINER= andreas@FreeBSD.ORG BUILD_DEPENDS= rplay:${PORTSDIR}/audio/rplay LIB_DEPENDS= Xpm\\.4\\.:${PORTSDIR}/graphics/xpm @@ -37,7 +37,7 @@ CF_MAPS= crossfire-0.93.0.maps.tar.gz CF_DOC= crossfire-0.93.0.doc.tar.gz # crossfire doc ready for use CF_SOUNDS= crossfire-0.92.7.sounds.tar.gz # no newer sounds available .if ${WANT_CF_ARCH} == YES || ${WANT_CF_ARCH} == yes -CF_ARCH= crossfire-0.93.0.arch.tar.gz # only for rebuild of doc +CF_ARCH= crossfire-0.93.5.arch.tar.gz # only for rebuild of doc .endif #CF_CLSERV= eutl.tar.gz # only for client/server CFDIR= ${PREFIX}/crossfire # crossfire base directory @@ -57,8 +57,6 @@ post-install: @${CP} -r ${WRKDIR}/crossfire-0.93.0-doc/* ${CFDIR}/doc @touch ${PREFIX}/crossfire/lib/bookarch @chmod 664 ${PREFIX}/crossfire/lib/bookarch - @touch ${PREFIX}/crossfire/lib/shutdown - @chmod 664 ${PREFIX}/crossfire/lib/shutdown @touch ${PREFIX}/crossfire/lib/forbid @chmod 664 ${PREFIX}/crossfire/lib/forbid @touch ${PREFIX}/crossfire/lib/players/.keep_me @@ -67,20 +65,5 @@ post-install: @chmod 0664 ${PREFIX}/crossfire/lib/highscore @/usr/sbin/chown games.games ${PREFIX}/bin/crossfire @chmod 6555 ${PREFIX}/bin/crossfire - @echo "" - @echo "======================================================" - @echo "===== ATTENTION BEFORE PLAYING =======================" - @echo "======================================================" - @echo "Create a players directory before playing crossfire, " - @echo "otherwise crossfire cannot save your player character !" - @echo "Type the following command as user in your login directory:" - @echo "" - @echo " $ mkdir players" - @echo "" - @echo "Read the docu, which is available in Postscript and HTML" - @echo "format in the directory ${CFDIR}/doc" - @echo "It is a good idea to install a WWW Browser like Mosaic" - @echo "and to set some bookmarks that point to the different" - @echo "files." .include <bsd.port.mk> diff --git a/games/crossfire-client/files/patch-aa b/games/crossfire-client/files/patch-aa index d693a141c44f..8035616be51c 100644 --- a/games/crossfire-client/files/patch-aa +++ b/games/crossfire-client/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-client/files/patch-ab b/games/crossfire-client/files/patch-ab index d850d0935ec3..69756cd1f8df 100644 --- a/games/crossfire-client/files/patch-ab +++ b/games/crossfire-client/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-client/files/patch-ag b/games/crossfire-client/files/patch-ag index f197248c00a0..6b36400a06c9 100644 --- a/games/crossfire-client/files/patch-ag +++ b/games/crossfire-client/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-client/files/patch-ak b/games/crossfire-client/files/patch-ak new file mode 100644 index 000000000000..d4c332524611 --- /dev/null +++ b/games/crossfire-client/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-client/files/patch-al b/games/crossfire-client/files/patch-al new file mode 100644 index 000000000000..19089e690e69 --- /dev/null +++ b/games/crossfire-client/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-client/files/patch-am b/games/crossfire-client/files/patch-am new file mode 100644 index 000000000000..53d47c620e01 --- /dev/null +++ b/games/crossfire-client/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-client/files/patch-an b/games/crossfire-client/files/patch-an new file mode 100644 index 000000000000..6773fcba278a --- /dev/null +++ b/games/crossfire-client/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); diff --git a/games/crossfire-server/Makefile b/games/crossfire-server/Makefile index d0a1bddb745a..4fda9055df0e 100644 --- a/games/crossfire-server/Makefile +++ b/games/crossfire-server/Makefile @@ -3,7 +3,7 @@ # Date created: So 27 Okt 1996 12:25:55 MET # Whom: Andreas Klemm <andreas@klemm.gtn.com> # -# $Id: Makefile,v 1.15 1997/05/29 09:40:30 andreas Exp $ +# $Id: Makefile,v 1.16 1997/07/18 05:04:10 asami Exp $ # DISTNAME= crossfire-0.93.0 @@ -16,7 +16,7 @@ MASTER_SITES= ftp://ra.pyramid.com/pub/crossfire/ \ DISTFILES= ${CF_SOURCES} ${CF_DOC} ${CF_MAPS} ${CF_SOUNDS} \ ${CF_ARCH} ${CF_CLSERV} -MAINTAINER= andreas@klemm.gtn.com +MAINTAINER= andreas@FreeBSD.ORG BUILD_DEPENDS= rplay:${PORTSDIR}/audio/rplay LIB_DEPENDS= Xpm\\.4\\.:${PORTSDIR}/graphics/xpm @@ -37,7 +37,7 @@ CF_MAPS= crossfire-0.93.0.maps.tar.gz CF_DOC= crossfire-0.93.0.doc.tar.gz # crossfire doc ready for use CF_SOUNDS= crossfire-0.92.7.sounds.tar.gz # no newer sounds available .if ${WANT_CF_ARCH} == YES || ${WANT_CF_ARCH} == yes -CF_ARCH= crossfire-0.93.0.arch.tar.gz # only for rebuild of doc +CF_ARCH= crossfire-0.93.5.arch.tar.gz # only for rebuild of doc .endif #CF_CLSERV= eutl.tar.gz # only for client/server CFDIR= ${PREFIX}/crossfire # crossfire base directory @@ -57,8 +57,6 @@ post-install: @${CP} -r ${WRKDIR}/crossfire-0.93.0-doc/* ${CFDIR}/doc @touch ${PREFIX}/crossfire/lib/bookarch @chmod 664 ${PREFIX}/crossfire/lib/bookarch - @touch ${PREFIX}/crossfire/lib/shutdown - @chmod 664 ${PREFIX}/crossfire/lib/shutdown @touch ${PREFIX}/crossfire/lib/forbid @chmod 664 ${PREFIX}/crossfire/lib/forbid @touch ${PREFIX}/crossfire/lib/players/.keep_me @@ -67,20 +65,5 @@ post-install: @chmod 0664 ${PREFIX}/crossfire/lib/highscore @/usr/sbin/chown games.games ${PREFIX}/bin/crossfire @chmod 6555 ${PREFIX}/bin/crossfire - @echo "" - @echo "======================================================" - @echo "===== ATTENTION BEFORE PLAYING =======================" - @echo "======================================================" - @echo "Create a players directory before playing crossfire, " - @echo "otherwise crossfire cannot save your player character !" - @echo "Type the following command as user in your login directory:" - @echo "" - @echo " $ mkdir players" - @echo "" - @echo "Read the docu, which is available in Postscript and HTML" - @echo "format in the directory ${CFDIR}/doc" - @echo "It is a good idea to install a WWW Browser like Mosaic" - @echo "and to set some bookmarks that point to the different" - @echo "files." .include <bsd.port.mk> diff --git a/games/crossfire-server/files/patch-aa b/games/crossfire-server/files/patch-aa index d693a141c44f..8035616be51c 100644 --- a/games/crossfire-server/files/patch-aa +++ b/games/crossfire-server/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-server/files/patch-ab b/games/crossfire-server/files/patch-ab index d850d0935ec3..69756cd1f8df 100644 --- a/games/crossfire-server/files/patch-ab +++ b/games/crossfire-server/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-server/files/patch-ag b/games/crossfire-server/files/patch-ag index f197248c00a0..6b36400a06c9 100644 --- a/games/crossfire-server/files/patch-ag +++ b/games/crossfire-server/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-server/files/patch-ak b/games/crossfire-server/files/patch-ak new file mode 100644 index 000000000000..d4c332524611 --- /dev/null +++ b/games/crossfire-server/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-server/files/patch-al b/games/crossfire-server/files/patch-al new file mode 100644 index 000000000000..19089e690e69 --- /dev/null +++ b/games/crossfire-server/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-server/files/patch-am b/games/crossfire-server/files/patch-am new file mode 100644 index 000000000000..53d47c620e01 --- /dev/null +++ b/games/crossfire-server/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-server/files/patch-an b/games/crossfire-server/files/patch-an new file mode 100644 index 000000000000..6773fcba278a --- /dev/null +++ b/games/crossfire-server/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); diff --git a/games/crossfire/Makefile b/games/crossfire/Makefile index d0a1bddb745a..4fda9055df0e 100644 --- a/games/crossfire/Makefile +++ b/games/crossfire/Makefile @@ -3,7 +3,7 @@ # Date created: So 27 Okt 1996 12:25:55 MET # Whom: Andreas Klemm <andreas@klemm.gtn.com> # -# $Id: Makefile,v 1.15 1997/05/29 09:40:30 andreas Exp $ +# $Id: Makefile,v 1.16 1997/07/18 05:04:10 asami Exp $ # DISTNAME= crossfire-0.93.0 @@ -16,7 +16,7 @@ MASTER_SITES= ftp://ra.pyramid.com/pub/crossfire/ \ DISTFILES= ${CF_SOURCES} ${CF_DOC} ${CF_MAPS} ${CF_SOUNDS} \ ${CF_ARCH} ${CF_CLSERV} -MAINTAINER= andreas@klemm.gtn.com +MAINTAINER= andreas@FreeBSD.ORG BUILD_DEPENDS= rplay:${PORTSDIR}/audio/rplay LIB_DEPENDS= Xpm\\.4\\.:${PORTSDIR}/graphics/xpm @@ -37,7 +37,7 @@ CF_MAPS= crossfire-0.93.0.maps.tar.gz CF_DOC= crossfire-0.93.0.doc.tar.gz # crossfire doc ready for use CF_SOUNDS= crossfire-0.92.7.sounds.tar.gz # no newer sounds available .if ${WANT_CF_ARCH} == YES || ${WANT_CF_ARCH} == yes -CF_ARCH= crossfire-0.93.0.arch.tar.gz # only for rebuild of doc +CF_ARCH= crossfire-0.93.5.arch.tar.gz # only for rebuild of doc .endif #CF_CLSERV= eutl.tar.gz # only for client/server CFDIR= ${PREFIX}/crossfire # crossfire base directory @@ -57,8 +57,6 @@ post-install: @${CP} -r ${WRKDIR}/crossfire-0.93.0-doc/* ${CFDIR}/doc @touch ${PREFIX}/crossfire/lib/bookarch @chmod 664 ${PREFIX}/crossfire/lib/bookarch - @touch ${PREFIX}/crossfire/lib/shutdown - @chmod 664 ${PREFIX}/crossfire/lib/shutdown @touch ${PREFIX}/crossfire/lib/forbid @chmod 664 ${PREFIX}/crossfire/lib/forbid @touch ${PREFIX}/crossfire/lib/players/.keep_me @@ -67,20 +65,5 @@ post-install: @chmod 0664 ${PREFIX}/crossfire/lib/highscore @/usr/sbin/chown games.games ${PREFIX}/bin/crossfire @chmod 6555 ${PREFIX}/bin/crossfire - @echo "" - @echo "======================================================" - @echo "===== ATTENTION BEFORE PLAYING =======================" - @echo "======================================================" - @echo "Create a players directory before playing crossfire, " - @echo "otherwise crossfire cannot save your player character !" - @echo "Type the following command as user in your login directory:" - @echo "" - @echo " $ mkdir players" - @echo "" - @echo "Read the docu, which is available in Postscript and HTML" - @echo "format in the directory ${CFDIR}/doc" - @echo "It is a good idea to install a WWW Browser like Mosaic" - @echo "and to set some bookmarks that point to the different" - @echo "files." .include <bsd.port.mk> diff --git a/games/crossfire/files/patch-aa b/games/crossfire/files/patch-aa index d693a141c44f..8035616be51c 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 d850d0935ec3..69756cd1f8df 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 f197248c00a0..6b36400a06c9 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 000000000000..d4c332524611 --- /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 000000000000..19089e690e69 --- /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 000000000000..53d47c620e01 --- /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 000000000000..6773fcba278a --- /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); |