diff options
author | glewis <glewis@FreeBSD.org> | 2009-07-06 10:27:20 +0800 |
---|---|---|
committer | glewis <glewis@FreeBSD.org> | 2009-07-06 10:27:20 +0800 |
commit | 0e37cff92fa6d2c14c244055da852560245e298b (patch) | |
tree | ffd0f39b0f27f81c342e3d8bed918c90b716b30e /net/dgd-lpmud | |
parent | a096213d409ad538fde7f91b1afb5fbe694e0d40 (diff) | |
download | freebsd-ports-gnome-0e37cff92fa6d2c14c244055da852560245e298b.tar.gz freebsd-ports-gnome-0e37cff92fa6d2c14c244055da852560245e298b.tar.zst freebsd-ports-gnome-0e37cff92fa6d2c14c244055da852560245e298b.zip |
. Make this work with DGD 1.3.
. Fix some portlint warnings.
. Fix some compilation warnings.
. Make deinstall work a little better after the mud has been started and
someone has logged in.
Diffstat (limited to 'net/dgd-lpmud')
-rw-r--r-- | net/dgd-lpmud/Makefile | 5 | ||||
-rw-r--r-- | net/dgd-lpmud/files/dgd-lpmud.sh | 2 | ||||
-rw-r--r-- | net/dgd-lpmud/files/oconv.c | 3 | ||||
-rw-r--r-- | net/dgd-lpmud/files/patch-2.4.5-dgd-sys-driver.c | 103 | ||||
-rw-r--r-- | net/dgd-lpmud/files/patch-hname.c | 13 | ||||
-rw-r--r-- | net/dgd-lpmud/files/patch-lpmud.dgd (renamed from net/dgd-lpmud/files/patch-ab) | 14 | ||||
-rw-r--r-- | net/dgd-lpmud/pkg-plist | 11 |
7 files changed, 138 insertions, 13 deletions
diff --git a/net/dgd-lpmud/Makefile b/net/dgd-lpmud/Makefile index caeccf6c256c..c3749be6dd16 100644 --- a/net/dgd-lpmud/Makefile +++ b/net/dgd-lpmud/Makefile @@ -19,7 +19,7 @@ COMMENT= LPmud mudlib, for use with DGD RUN_DEPENDS= ${LOCALBASE}/sbin/dgd:${PORTSDIR}/net/dgd -RESTRICTED= "no monetary gain, tarball OK for CDROM" +RESTRICTED= no monetary gain, tarball OK for CDROM DIST_SUBDIR= dgd WRKSRC= ${WRKDIR}/mud @@ -28,6 +28,9 @@ post-extract: @${CP} ${FILESDIR}/oconv.c ${WRKSRC}/ @${CP} ${FILESDIR}/Makefile.bin ${WRKSRC}/Makefile +post-patch: + cd ${WRKSRC} && ${FIND} . -name '*.orig' -delete + do-configure: ${REINPLACE_CMD} -e "s:%%DATADIR%%:${DATADIR}:" ${WRKSRC}/lpmud.dgd diff --git a/net/dgd-lpmud/files/dgd-lpmud.sh b/net/dgd-lpmud/files/dgd-lpmud.sh index 1fe22548f36f..fedb9e72b62e 100644 --- a/net/dgd-lpmud/files/dgd-lpmud.sh +++ b/net/dgd-lpmud/files/dgd-lpmud.sh @@ -16,7 +16,7 @@ case "$1" in su ${DGD_USER} -c "${DGD_HNAME} ${DGD_HNAME_PORT} ${DGD_HNAME_PASSWD}" > /dev/null 2>&1 & sleep 1 su ${DGD_USER} -c "${DGD} ${DGD_CONF}" >> "${DGD_LOG}" 2>&1 & - echo $(($!+1)) > "${DGD_PID}" + echo $(($!+2)) > "${DGD_PID}" echo -n ' dgd-lpmud' fi ;; diff --git a/net/dgd-lpmud/files/oconv.c b/net/dgd-lpmud/files/oconv.c index 3fe1fcbf8e1b..21264bae0585 100644 --- a/net/dgd-lpmud/files/oconv.c +++ b/net/dgd-lpmud/files/oconv.c @@ -1,8 +1,9 @@ /* convert old LPmud .o files to new DGD .o format */ /* $FreeBSD$ */ # include <ctype.h> -# include <string.h> # include <stdio.h> +# include <stdlib.h> +# include <string.h> int array, arrbuf[1000]; char buffer[60000]; /* large enough? */ diff --git a/net/dgd-lpmud/files/patch-2.4.5-dgd-sys-driver.c b/net/dgd-lpmud/files/patch-2.4.5-dgd-sys-driver.c new file mode 100644 index 000000000000..fc3d46f5d99f --- /dev/null +++ b/net/dgd-lpmud/files/patch-2.4.5-dgd-sys-driver.c @@ -0,0 +1,103 @@ +$FreeBSD$ + +--- 2.4.5/dgd/sys/driver.c.orig 1996-11-28 14:23:11.000000000 -0800 ++++ 2.4.5/dgd/sys/driver.c 2009-07-05 19:04:50.000000000 -0700 +@@ -143,12 +143,40 @@ + } + + /* ++ * NAME: touch() ++ * DESCRIPTION: determine whether to preserve untouched status. ++ */ ++static int touch(object obj, string function) ++{ ++ return 0; ++} ++ ++/* + * NAME: inherit_program() + * DESCRIPTION: get an object to inherit + */ +-static object inherit_program(string file, string path) ++static object inherit_program(string file, string path, int priv) ++{ ++ object obj; ++ ++ file = path_object(path); ++ obj = find_object(file); ++ if (obj == 0) { ++ obj = compile_object(file); ++ } ++ return obj; ++} ++ ++/* ++ * NAME: include_file() ++ * DESCRIPTION: translate an include path ++ */ ++static mixed include_file(string file, string path) + { +- return call_object(path); ++ if (path[0] != '/') { ++ return file + "/../" + path; ++ } ++ return path; + } + + /* +@@ -183,7 +211,7 @@ + * NAME: telnet_connect() + * DESCRIPTION: return a player object + */ +-static object telnet_connect() ++static object telnet_connect(int port) + { + object user, player; + +@@ -204,7 +232,7 @@ + * NAME: binary_connect() + * DESCRIPTION: return another player object (just to test) + */ +-static object binary_connect() ++static object binary_connect(int port) + { + object user, player; + +@@ -225,7 +253,7 @@ + * NAME: runtime_error() + * DESCRIPTION: log a runtime error + */ +-static void runtime_error(string error, int caught) ++static void runtime_error(string error, int caught, int ticks) + { + mixed **trace; + string progname, objname, function, str; +@@ -315,6 +343,15 @@ + } + + /* ++ * NAME: atomic_error() ++ * DESCRIPTION: deal with an atomic error ++ */ ++static void atomic_error(string error, int atom, int ticks) ++{ ++ send_message(error + "\n"); ++} ++ ++/* + * NAME: interrupt() + * DESCRIPTION: deal with a kill signal + */ +@@ -377,3 +414,12 @@ + { + return 0; /* No. */ + } ++ ++/* ++ * NAME: object_type() ++ * DESCRIPTION: translate the object path used in a type declaration ++ */ ++static string object_type(string file, string type) ++{ ++ return type; ++} diff --git a/net/dgd-lpmud/files/patch-hname.c b/net/dgd-lpmud/files/patch-hname.c new file mode 100644 index 000000000000..eb61975745fa --- /dev/null +++ b/net/dgd-lpmud/files/patch-hname.c @@ -0,0 +1,13 @@ +$FreeBSD$ + +--- hname.c.orig 2009-07-03 21:47:49.000000000 -0700 ++++ hname.c 2009-07-03 21:48:39.000000000 -0700 +@@ -5,6 +5,8 @@ + # include <arpa/inet.h> + # include <netdb.h> + # include <stdio.h> ++# include <stdlib.h> ++# include <string.h> + + int main(argc, argv) + int argc; diff --git a/net/dgd-lpmud/files/patch-ab b/net/dgd-lpmud/files/patch-lpmud.dgd index ae6141c3e4c3..b9238d5f6369 100644 --- a/net/dgd-lpmud/files/patch-ab +++ b/net/dgd-lpmud/files/patch-lpmud.dgd @@ -1,7 +1,5 @@ -$FreeBSD$ - ---- lpmud.dgd.orig Thu Dec 12 17:57:25 1996 -+++ lpmud.dgd Thu Aug 28 14:52:40 2003 +--- lpmud.dgd.orig 2009-07-03 22:33:04.000000000 -0700 ++++ lpmud.dgd 2009-07-03 22:34:31.000000000 -0700 @@ -1,10 +1,10 @@ telnet_port = 2000; /* telnet port number */ binary_port = 1999; /* binary port number */ @@ -15,3 +13,11 @@ $FreeBSD$ swap_size = 20960; /* # sectors in swap file */ cache_size = 100; /* # sectors in swap cache */ sector_size = 1024; /* swap sector size */ +@@ -12,6 +12,7 @@ + static_chunk = 64512; /* static memory chunk */ + dynamic_chunk = 261120; /* dynamic memory chunk */ + dump_file = "../dump"; /* state dump file */ ++dump_interval = 3600; /* dump interval in seconds */ + + typechecking = 0; /* global typechecking */ + include_file = "/dgd/include/auto.h"; /* standard include file */ diff --git a/net/dgd-lpmud/pkg-plist b/net/dgd-lpmud/pkg-plist index 6b0eefc8f8c4..74995d2cf55f 100644 --- a/net/dgd-lpmud/pkg-plist +++ b/net/dgd-lpmud/pkg-plist @@ -494,7 +494,6 @@ etc/rc.d/dgd-lpmud.sh.sample %%DATADIR%%/lpmud/room/south/sforst17.c %%DATADIR%%/lpmud/room/south/sforst18.c %%DATADIR%%/lpmud/room/south/sforst19.c -%%DATADIR%%/lpmud/room/south/sforst19.c.orig %%DATADIR%%/lpmud/room/south/sforst2.c %%DATADIR%%/lpmud/room/south/sforst20.c %%DATADIR%%/lpmud/room/south/sforst21.c @@ -606,7 +605,7 @@ etc/rc.d/dgd-lpmud.sh.sample %%PORTDOCS%%%%DOCSDIR%%/README @exec mkdir -p %D/%%DATADIR%%/tmp @exec ln -sf %D/share/doc/dgd/kfun %D/%%DATADIR%%/lpmud/doc -@unexec rm %D/%%DATADIR%%/lpmud/doc/kfun +@unexec rm %D/%%DATADIR%%/lpmud/doc/kfun 2>&1 >/dev/null || true @comment Remove files generated by DGD @unexec rm -f %D/%%DATADIR%%/lpmud/dgd/include/float.h @unexec rm -f %D/%%DATADIR%%/lpmud/dgd/include/limits.h @@ -615,8 +614,8 @@ etc/rc.d/dgd-lpmud.sh.sample @unexec rm -f %D/%%DATADIR%%/lpmud/dgd/include/type.h @unexec rm -f %D/%%DATADIR%%/lpmud/log/lpmud.log @unexec rm -f %D/%%DATADIR%%/tmp/dgd-lpmud.swap -@unexec rmdir %D/%%DATADIR%%/tmp @dirrm etc/dgd-lpmud +@dirrmtry %%DATADIR%%/tmp @dirrm %%DATADIR%%/lpmud/room/sub @dirrm %%DATADIR%%/lpmud/room/south/obsolete @dirrm %%DATADIR%%/lpmud/room/south @@ -627,7 +626,7 @@ etc/rc.d/dgd-lpmud.sh.sample @dirrm %%DATADIR%%/lpmud/room @dirrm %%DATADIR%%/lpmud/players/lars/lars @dirrm %%DATADIR%%/lpmud/players/lars -@dirrm %%DATADIR%%/lpmud/players +@dirrmtry %%DATADIR%%/lpmud/players @dirrm %%DATADIR%%/lpmud/open @dirrm %%DATADIR%%/lpmud/obj/Go @dirrm %%DATADIR%%/lpmud/obj @@ -646,6 +645,6 @@ etc/rc.d/dgd-lpmud.sh.sample @dirrm %%DATADIR%%/lpmud/dgd/include @dirrm %%DATADIR%%/lpmud/dgd @dirrm %%DATADIR%%/lpmud/banish -@dirrm %%DATADIR%%/lpmud -@dirrm %%DATADIR%% +@dirrmtry %%DATADIR%%/lpmud +@dirrmtry %%DATADIR%% %%PORTDOCS%%@dirrm %%DOCSDIR%% |