summaryrefslogtreecommitdiff
path: root/games/moria
diff options
context:
space:
mode:
authorsimonb <simonb>1999-01-23 17:00:14 +0000
committersimonb <simonb>1999-01-23 17:00:14 +0000
commita476b5a9f4dcfa9bcf43654a7b29997035025f9b (patch)
treec6d9d2ac2307014178f343e695fd279be3977be5 /games/moria
parenteb54a5cf8d25a3c80c06312910749a04d9ceeb6a (diff)
downloadpkgsrc-a476b5a9f4dcfa9bcf43654a7b29997035025f9b.tar.gz
moria - another rogue-like game.
Diffstat (limited to 'games/moria')
-rw-r--r--games/moria/Makefile26
-rw-r--r--games/moria/files/md53
-rw-r--r--games/moria/patches/patch-aa70
-rw-r--r--games/moria/patches/patch-ab37
-rw-r--r--games/moria/patches/patch-ac21
-rw-r--r--games/moria/patches/patch-ad50
-rw-r--r--games/moria/patches/patch-ae21
-rw-r--r--games/moria/pkg/COMMENT1
-rw-r--r--games/moria/pkg/DESCR5
-rw-r--r--games/moria/pkg/PLIST13
10 files changed, 247 insertions, 0 deletions
diff --git a/games/moria/Makefile b/games/moria/Makefile
new file mode 100644
index 00000000000..c8745af4478
--- /dev/null
+++ b/games/moria/Makefile
@@ -0,0 +1,26 @@
+# $NetBSD: Makefile,v 1.1.1.1 1999/01/23 17:00:14 simonb Exp $
+#
+
+DISTNAME= um5.5.2
+PKGNAME= moria-5.5.2
+WRKSRC= ${WRKDIR}/umoria
+CATEGORIES= games
+# The "offical" master site has lost the pub/Games directory.
+#MASTER_SITES= ftp://ftp.cis.ksu.edu/pub/Games/Moria/source/
+MASTER_SITES= ftp://ftp.funet.fi/pub/unix/games/moria/source/
+EXTRACT_SUFX= .tar.Z
+
+MAINTAINER= simonb@netbsd.org
+HOMEPAGE= http://www.math.lsa.umich.edu/~grabiner/moria.html
+
+do-configure:
+ @rm -f ${WRKSRC}/*.[ch] ${WRKSRC}/Makefile
+ @cd ${WRKSRC}; ln -s source/* unix/* .
+
+post-install:
+ @if [ ! -f /var/games/moria.scores ]; then \
+ ${CP} -p ${PREFIX}/share/games/moria/scores.dist \
+ /var/games/moria.scores ; \
+ fi
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/games/moria/files/md5 b/games/moria/files/md5
new file mode 100644
index 00000000000..d3fc524af88
--- /dev/null
+++ b/games/moria/files/md5
@@ -0,0 +1,3 @@
+$NetBSD: md5,v 1.1.1.1 1999/01/23 17:00:15 simonb Exp $
+
+MD5 (um5.5.2.tar.Z) = 04a2852864302c702e82992023d97184
diff --git a/games/moria/patches/patch-aa b/games/moria/patches/patch-aa
new file mode 100644
index 00000000000..777f5b99749
--- /dev/null
+++ b/games/moria/patches/patch-aa
@@ -0,0 +1,70 @@
+$NetBSD: patch-aa,v 1.1.1.1 1999/01/23 17:00:15 simonb Exp $
+--- unix/Makefile.orig Fri Jul 22 08:37:08 1994
++++ unix/Makefile Sun Jan 24 03:28:57 1999
+@@ -3,15 +3,17 @@
+ # LIBDIR must be the same directory defined in config.h
+ # OWNER is who you want the game to be chown to.
+ # GROUP is who you wnat the game to be chgrp to.
+-BINDIR = /home/zariski/grabiner/moria
+-LIBDIR = /home/zariski/grabiner/moria/files
+-OWNER = grabiner
+-GROUP = grad
++BINDIR = ${PREFIX}/bin
++LIBDIR = ${PREFIX}/share/games/moria
++SCOREFILE = /var/games/moria.scores
++
++GROUP = games
+
+ # For testing and debugging the program, it is best to use this line.
+ # CFLAGS = -g
+ # For playing the game, you may want to use this line
+-CFLAGS = -O
++#CFLAGS = -O
++CPPFLAGS+=-Dunix -DLIBDIR=\"${LIBDIR}\" -DMORIA_TOP=\"${SCOREFILE}\"
+
+ # For BSD Systems
+ CURSES = -lcurses -ltermcap
+@@ -45,6 +47,8 @@
+ LIBFILES = hours news origcmds.hlp owizcmds.hlp roglcmds.hlp rwizcmds.hlp \
+ version.hlp welcome.hlp
+
++all: moria
++
+ moria : $(OBJS)
+ $(CC) -o moria $(CFLAGS) $(OBJS) $(CURSES) $(LFLAGS)
+
+@@ -57,22 +61,19 @@
+ TAGS : $(SRCS)
+ ctags -x $(SRCS) > TAGS
+
+-# you must define BINDIR and LIBDIR before installing
+-# assumes that BINDIR and LIBDIR exist
++CHGRP?= /usr/bin/chgrp
++CHMOD?= /bin/chmod
++TOUCH?= /usr/bin/touch
++
+ install:
+- chmod 755 $(BINDIR)
+- cp moria $(BINDIR)
+- chmod 4711 $(BINDIR)/moria
+- chmod 711 $(LIBDIR)
+- (cd files; cp $(LIBFILES) $(LIBDIR))
+- (cd $(LIBDIR); chmod 444 $(LIBFILES))
+- (cd $(LIBDIR); touch scores; chmod 644 scores)
+- chown $(OWNER) $(BINDIR)/moria
+- chgrp $(GROUP) $(BINDIR)/moria
+- (cd $(LIBDIR); chown $(OWNER) $(LIBFILES) scores)
+- (cd $(LIBDIR); chgrp $(GROUP) $(LIBFILES) scores)
+-# If you are short on disk space, or aren't interested in debugging moria.
+-# strip $(BINDIR)/moria
++ ${BSD_INSTALL_PROGRAM} moria ${BINDIR}
++ ${CHGRP} ${GROUP} ${BINDIR}/moria
++ ${CHMOD} g+s ${BINDIR}/moria
++ ${BSD_INSTALL_DATA_DIR} ${LIBDIR}
++ ( cd files; ${BSD_INSTALL_DATA} ${LIBFILES} ${LIBDIR} )
++ ${TOUCH} ${LIBDIR}/scores.dist
++ ${CHMOD} 664 ${LIBDIR}/scores.dist
++ ${CHGRP} ${GROUP} ${LIBDIR}/scores.dist
+
+ clean:
+ rm -r *.o
diff --git a/games/moria/patches/patch-ab b/games/moria/patches/patch-ab
new file mode 100644
index 00000000000..988c53e7e87
--- /dev/null
+++ b/games/moria/patches/patch-ab
@@ -0,0 +1,37 @@
+$NetBSD: patch-ab,v 1.1.1.1 1999/01/23 17:00:15 simonb Exp $
+--- unix/unix.c.orig Fri Jul 22 08:37:08 1994
++++ unix/unix.c Wed Dec 2 23:17:35 1998
+@@ -43,6 +43,11 @@
+ #include <sys/param.h>
+ #endif
+
++#if (defined(BSD) && BSD >= 199306)
++#include <fcntl.h>
++#include <unistd.h>
++#endif
++
+ #ifdef __linux__
+ #include <sys/time.h>
+ #include <sys/types.h>
+@@ -276,7 +281,9 @@
+ void user_name(buf)
+ char *buf;
+ {
++#if !(defined(BSD) && BSD >= 199306)
+ extern char *getlogin();
++#endif
+ struct passwd *pwline;
+ register char *p;
+
+@@ -314,7 +321,10 @@
+ user[i] = '\0';
+ if (i == 0)
+ {
+- char *login = (char *) getlogin();
++#if !(defined(BSD) && BSD >= 199306)
++ extern char *getlogin();
++#endif
++ char *login = getlogin();
+
+ if (login != NULL)
+ (void) strcpy (user, login);
diff --git a/games/moria/patches/patch-ac b/games/moria/patches/patch-ac
new file mode 100644
index 00000000000..c18c34dabe1
--- /dev/null
+++ b/games/moria/patches/patch-ac
@@ -0,0 +1,21 @@
+$NetBSD: patch-ac,v 1.1.1.1 1999/01/23 17:00:15 simonb Exp $
+--- source/config.h.orig Fri Jul 22 11:47:13 1994
++++ source/config.h Thu Dec 3 14:50:58 1998
+@@ -200,10 +200,16 @@
+
+ /* This must be unix; change MORIA_LIB as appropriate. */
+ #define MORIA_SAV "moria.save"
+-#define MORIA_LIB(xxx) "/home/math/grabiner/moria/files/xxx"
++#ifdef __STDC__
++#define MORIA_LIB(xxx) LIBDIR ## "/" ## #xxx
++#else
++#define MORIA_LIB(xxx) LIBDIR/**/"/xxx"
++#endif
+ #define MORIA_HOU MORIA_LIB(hours)
+ #define MORIA_MOR MORIA_LIB(news)
++#ifndef MORIA_TOP
+ #define MORIA_TOP MORIA_LIB(scores)
++#endif
+ #define MORIA_HELP MORIA_LIB(roglcmds.hlp)
+ #define MORIA_ORIG_HELP MORIA_LIB(origcmds.hlp)
+ #define MORIA_WIZ_HELP MORIA_LIB(rwizcmds.hlp)
diff --git a/games/moria/patches/patch-ad b/games/moria/patches/patch-ad
new file mode 100644
index 00000000000..1aeb4717efa
--- /dev/null
+++ b/games/moria/patches/patch-ad
@@ -0,0 +1,50 @@
+$NetBSD: patch-ad,v 1.1.1.1 1999/01/23 17:00:15 simonb Exp $
+--- source/io.c.orig Fri Jul 22 11:47:26 1994
++++ source/io.c Wed Dec 2 11:35:27 1998
+@@ -90,6 +90,10 @@
+ #include <sys/types.h>
+ #endif
+
++#if (defined(BSD) && BSD >= 199306) /* XXX for all post 1993 BSDs? */
++#include <sgtty.h>
++#endif
++
+ #ifdef USG
+ #ifndef ATARI_ST
+ #include <string.h>
+@@ -331,7 +335,7 @@
+ #if defined(atarist) && defined(__GNUC__)
+ (void) signal (SIGTSTP, (__Sigfunc)suspend);
+ #else
+-#ifdef __386BSD__
++#if defined(__386BSD__) || (defined(BSD) && BSD >= 199306)
+ (void) signal (SIGTSTP, (sig_t)suspend);
+ #else
+ (void) signal (SIGTSTP, suspend);
+@@ -527,6 +531,7 @@
+ }
+ #else
+ {
++ int y, x;
+ #ifdef AMIGA
+ closetimer ();
+ #endif
+@@ -542,7 +547,8 @@
+ pause_line(15);
+ #endif
+ /* this moves curses to bottom right corner */
+- mvcur(stdscr->_cury, stdscr->_curx, LINES-1, 0);
++ getyx(stdscr, y, x);
++ mvcur(y, x, LINES-1, 0);
+ endwin(); /* exit curses */
+ (void) fflush (stdout);
+ #ifdef MSDOS
+@@ -757,7 +763,7 @@
+ msg_print("Fork failed. Try again.");
+ return;
+ }
+-#if defined(USG) || defined(__386BSD__)
++#if defined(USG) || defined(__386BSD__) || (defined(BSD) && BSD >= 199306)
+ (void) wait((int *) 0);
+ #else
+ (void) wait((union wait *) 0);
diff --git a/games/moria/patches/patch-ae b/games/moria/patches/patch-ae
new file mode 100644
index 00000000000..17c8e5bd4d1
--- /dev/null
+++ b/games/moria/patches/patch-ae
@@ -0,0 +1,21 @@
+$NetBSD: patch-ae,v 1.1.1.1 1999/01/23 17:00:15 simonb Exp $
+--- source/signals.c.orig Fri Jul 22 11:47:42 1994
++++ source/signals.c Wed Dec 2 11:35:43 1998
+@@ -89,7 +89,7 @@
+
+ /*ARGSUSED*/
+ #ifndef USG
+-#ifdef __386BSD__
++#if defined(__386BSD__) || (defined(BSD) && BSD >= 199306)
+ static void signal_handler(sig, code, scp)
+ #else
+ static int signal_handler(sig, code, scp)
+@@ -217,7 +217,7 @@
+ #if defined(atarist) && defined(__GNUC__)
+ (void) signal(SIGTSTP, (__Sigfunc)suspend);
+ #else
+-#ifdef __386BSD__
++#if defined(__386BSD__) || (defined(BSD) && BSD >= 199306)
+ (void) signal(SIGTSTP, (sig_t)suspend);
+ #else
+ (void) signal(SIGTSTP, suspend);
diff --git a/games/moria/pkg/COMMENT b/games/moria/pkg/COMMENT
new file mode 100644
index 00000000000..1820263cfb7
--- /dev/null
+++ b/games/moria/pkg/COMMENT
@@ -0,0 +1 @@
+A Rogue-like game with a different sense of scale than Rogue.
diff --git a/games/moria/pkg/DESCR b/games/moria/pkg/DESCR
new file mode 100644
index 00000000000..85c9725c266
--- /dev/null
+++ b/games/moria/pkg/DESCR
@@ -0,0 +1,5 @@
+Moria is a Roguelike game with a different sense of scale than Rogue.
+It features a town level, with an endless(?) dungeon. But rather than
+being limited to one terminal screen in size, each dungeon level is
+several screens wide and long. Games of Moria generally take weeks to
+complete, rather than hours or days.
diff --git a/games/moria/pkg/PLIST b/games/moria/pkg/PLIST
new file mode 100644
index 00000000000..b5e84cbc506
--- /dev/null
+++ b/games/moria/pkg/PLIST
@@ -0,0 +1,13 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 1999/01/23 17:00:15 simonb Exp $
+bin/moria
+share/games/moria/hours
+share/games/moria/news
+share/games/moria/origcmds.hlp
+share/games/moria/owizcmds.hlp
+share/games/moria/roglcmds.hlp
+share/games/moria/rwizcmds.hlp
+share/games/moria/scores.dist
+share/games/moria/version.hlp
+share/games/moria/welcome.hlp
+@exec if [ ! -f /var/games/moria.scores ]; then cp -p %D/share/games/moria/scores.dist /var/games/moria.scores; fi
+@dirrm share/games/moria