pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/pmars Import pmars-0.9.2 as games/pmars



details:   https://anonhg.NetBSD.org/pkgsrc/rev/63009482dfa3
branches:  trunk
changeset: 348294:63009482dfa3
user:      kamil <kamil%pkgsrc.org@localhost>
date:      Sat Jun 11 18:41:56 2016 +0000

description:
Import pmars-0.9.2 as games/pmars

Core War is a game in which two or more virus-like programs fight against
each other in a simulated memory space or core.

Core War programs are written in an assembly language called Redcode which is
interpreted by a Core War simulator or MARS (Memory Array Redcode Simulator).

The object of the game is to prevent the other program(s) from executing.

diffstat:

 games/pmars/DESCR                        |   7 +++++
 games/pmars/Makefile                     |  28 +++++++++++++++++++++
 games/pmars/PLIST                        |  15 +++++++++++
 games/pmars/distinfo                     |  11 ++++++++
 games/pmars/patches/patch-src_Makefile   |  27 +++++++++++++++++++++
 games/pmars/patches/patch-src_cdb.c      |  24 ++++++++++++++++++
 games/pmars/patches/patch-src_sim.c      |  41 ++++++++++++++++++++++++++++++++
 games/pmars/patches/patch-src_sim.h      |  15 +++++++++++
 games/pmars/patches/patch-src_xwindisp.c |  17 +++++++++++++
 9 files changed, 185 insertions(+), 0 deletions(-)

diffs (221 lines):

diff -r c754a451f609 -r 63009482dfa3 games/pmars/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/pmars/DESCR Sat Jun 11 18:41:56 2016 +0000
@@ -0,0 +1,7 @@
+Core War is a game in which two or more virus-like programs fight against
+each other in a simulated memory space or core.
+
+Core War programs are written in an assembly language called Redcode which is
+interpreted by a Core War simulator or MARS (Memory Array Redcode Simulator).
+
+The object of the game is to prevent the other program(s) from executing.
diff -r c754a451f609 -r 63009482dfa3 games/pmars/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/pmars/Makefile      Sat Jun 11 18:41:56 2016 +0000
@@ -0,0 +1,28 @@
+# $NetBSD: Makefile,v 1.1 2016/06/11 18:43:24 kamil Exp $
+#
+
+DISTNAME=              pmars-0.9.2
+CATEGORIES=            games
+MASTER_SITES=          ${MASTER_SITE_SOURCEFORGE:=corewar/}
+
+MAINTAINER=            pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=              http://www.koth.org/pmars/
+COMMENT=               The official Core Wars simulator
+LICENSE=               gnu-gpl-v2
+
+BUILD_MAKE_FLAGS+=     -C src
+BUILD_MAKE_FLAGS+=     CC=${CC:Q}
+BUILD_MAKE_FLAGS+=     LIB="-Wl,-rpath,${BUILDLINK_PREFIX.libX11}/lib -lX11"
+
+INSTALLATION_DIRS+=    bin share/pmars share/pmars/config share/pmars/warriors ${PKGMANDIR}/man6
+
+do-install:
+       ${INSTALL_PROGRAM} ${WRKSRC}/src/pmars ${DESTDIR}${PREFIX}/bin
+       ${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/pmars
+       ${INSTALL_DATA} ${WRKSRC}/CONTRIB ${DESTDIR}${PREFIX}/share/pmars
+       ${INSTALL_DATA} ${WRKSRC}/config/* ${DESTDIR}${PREFIX}/share/pmars/config
+       ${INSTALL_DATA} ${WRKSRC}/warriors/* ${DESTDIR}${PREFIX}/share/pmars/warriors
+       ${INSTALL_MAN} ${WRKSRC}/doc/pmars.6 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man6
+
+.include "../../x11/libX11/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r c754a451f609 -r 63009482dfa3 games/pmars/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/pmars/PLIST Sat Jun 11 18:41:56 2016 +0000
@@ -0,0 +1,15 @@
+@comment $NetBSD: PLIST,v 1.1 2016/06/11 18:43:24 kamil Exp $
+bin/pmars
+man/man6/pmars.6
+share/pmars/CONTRIB
+share/pmars/README
+share/pmars/config/94x.opt
+share/pmars/config/icws.opt
+share/pmars/config/mw.mac
+share/pmars/config/pmars.mac
+share/pmars/config/x.opt
+share/pmars/warriors/aeka.red
+share/pmars/warriors/flashpaper.red
+share/pmars/warriors/pspace.red
+share/pmars/warriors/rave.red
+share/pmars/warriors/validate.red
diff -r c754a451f609 -r 63009482dfa3 games/pmars/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/pmars/distinfo      Sat Jun 11 18:41:56 2016 +0000
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.1 2016/06/11 18:43:24 kamil Exp $
+
+SHA1 (pmars-0.9.2.tar.gz) = b49162a4f63ed6c4e94e28b762c41ff73057b99f
+RMD160 (pmars-0.9.2.tar.gz) = d0f6ca86633424b10d54b418ee371fd6bf987e35
+SHA512 (pmars-0.9.2.tar.gz) = 901adb3e1620a3ff23810514001926e233c7654b623d3d7c2541598141e539647d5a9a04b8da166f2f01c24afca95351affd51c10267ccaffd6d1bd0788545af
+Size (pmars-0.9.2.tar.gz) = 158415 bytes
+SHA1 (patch-src_Makefile) = 33b7617dc7d67bbd82258c02ce16a20746a0aad0
+SHA1 (patch-src_cdb.c) = 77e8fe6280cf844a80aeaf8477affe92d4b6cb66
+SHA1 (patch-src_sim.c) = a3a9480f930de346b13653d970c0fc10c67d6ce4
+SHA1 (patch-src_sim.h) = d68c1b49bbf863527268d1a5796e81481e9022b8
+SHA1 (patch-src_xwindisp.c) = 226a7a79db69c97667059f6113ac5a6599da8c5c
diff -r c754a451f609 -r 63009482dfa3 games/pmars/patches/patch-src_Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/pmars/patches/patch-src_Makefile    Sat Jun 11 18:41:56 2016 +0000
@@ -0,0 +1,27 @@
+$NetBSD: patch-src_Makefile,v 1.1 2016/06/11 18:41:56 kamil Exp $
+
+Improve readability of $(CC)
+
+--- src/Makefile.orig  2000-12-24 12:53:39.000000000 +0000
++++ src/Makefile
+@@ -37,8 +37,7 @@ flags:
+ 
+ $(MAINFILE): $(OBJ1) $(OBJ2) $(OBJ3)
+       @echo Linking $(MAINFILE)
+-      @$(CC) -o $(MAINFILE) $(OBJ1) $(OBJ2) $(OBJ3) $(LIB)
+-      @strip $(MAINFILE)
++      $(CC) -o $(MAINFILE) $(OBJ1) $(OBJ2) $(OBJ3) $(LIB)
+       @echo done
+ 
+ token.o asm.o disasm.o: asm.h
+@@ -55,9 +54,8 @@ $(OBJ1) $(OBJ2) $(OBJ3): Makefile config
+ 
+ .c.o:
+       @echo Compiling $*.o 
+-      @$(CC) $(CFLAGS) -c $*.c
++      $(CC) $(CFLAGS) -c $*.c
+ 
+ 
+ clean:
+       rm -f $(OBJ1) $(OBJ2) $(OBJ3) core
+-
diff -r c754a451f609 -r 63009482dfa3 games/pmars/patches/patch-src_cdb.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/pmars/patches/patch-src_cdb.c       Sat Jun 11 18:41:56 2016 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_cdb.c,v 1.1 2016/06/11 18:41:56 kamil Exp $
+
+Fix name clash with builtin 'round'.
+
+--- src/cdb.c.orig     2000-12-25 00:49:07.000000000 +0000
++++ src/cdb.c
+@@ -1564,7 +1564,7 @@ subst_eval(inpStr, result)
+             (warriorsLeft ? warriorsLeft : 1));
+     substitute(buf[bi1], "CYCLE", outs, buf[bi2]);
+     SWITCHBI;
+-    sprintf(outs, "%d", round);
++    sprintf(outs, "%d", sim_round);
+     substitute(buf[bi1], "ROUND", outs, buf[bi2]);
+ 
+     SWITCHBI;
+@@ -1875,7 +1875,7 @@ print_registers()
+ #endif
+   int     nFuture, nPast, count, taskHalf = (coreSize <= 10000 ? 7 : 5);
+ 
+-  sprintf(outs, roundOfCycle, round, rounds,
++  sprintf(outs, roundOfCycle, sim_round, rounds,
+           (cycle + (warriorsLeft ? warriorsLeft : 1) - 1) /
+           (warriorsLeft ? warriorsLeft : 1));
+   cdb_fputs(outs, COND);
diff -r c754a451f609 -r 63009482dfa3 games/pmars/patches/patch-src_sim.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/pmars/patches/patch-src_sim.c       Sat Jun 11 18:41:56 2016 +0000
@@ -0,0 +1,41 @@
+$NetBSD: patch-src_sim.c,v 1.1 2016/06/11 18:41:56 kamil Exp $
+
+Fix name clash with builtin 'round'.
+
+--- src/sim.c.orig     2000-12-25 00:49:08.000000000 +0000
++++ src/sim.c
+@@ -177,7 +177,7 @@ ADDR_T AA_Value, AB_Value;
+ mem_struct FAR *memory;
+ 
+ long    cycle;
+-int     round;
++int     sim_round;
+ 
+ char    alloc_p = 0;                /* indicate whether memory has been allocated */
+ int     warriorsLeft;                /* number of warriors still left in core */
+@@ -311,7 +311,7 @@ register  int     temp;                 
+ #endif
+ 
+   display_init();
+-  round = 1;
++  sim_round = 1;
+   do {                                /* each round */
+ #if defined(DOS16) && !defined(SERVER) && !defined(DOSTXTGRAPHX) && !defined(DOSGRXGRAPHX) && !defined(DJGPP)
+     fputc('\r', stdout);        /* enable interruption by Ctrl-C */
+@@ -1325,13 +1325,13 @@ nextround:
+ #ifndef SERVER
+     if (debugState == BREAK) {
+       if (warriorsLeft == 1 && warriors != 1)
+-      sprintf(outs, warriorTerminatedEndOfRound, W - warrior, W->name, round);
++      sprintf(outs, warriorTerminatedEndOfRound, W - warrior, W->name, sim_round);
+       else
+-      sprintf(outs, endOfRound, round);
++      sprintf(outs, endOfRound, sim_round);
+       debugState = cdb(outs);
+     }
+ #endif
+-  } while (++round <= rounds);
++  } while (++sim_round <= rounds);
+ 
+   display_close();
+ #ifdef PERMUTATE
diff -r c754a451f609 -r 63009482dfa3 games/pmars/patches/patch-src_sim.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/pmars/patches/patch-src_sim.h       Sat Jun 11 18:41:56 2016 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_sim.h,v 1.1 2016/06/11 18:41:56 kamil Exp $
+
+Fix name clash with builtin 'round'.
+
+--- src/sim.h.orig     2000-08-20 13:29:44.000000000 +0000
++++ src/sim.h
+@@ -89,7 +89,7 @@ extern int displayMode;
+ #define FAR
+ #endif
+ 
+-extern int round;
++extern int sim_round;
+ extern long cycle;
+ extern ADDR_T progCnt;                /* program counter */
+ extern warrior_struct *W;        /* indicate which warrior is running */
diff -r c754a451f609 -r 63009482dfa3 games/pmars/patches/patch-src_xwindisp.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/pmars/patches/patch-src_xwindisp.c  Sat Jun 11 18:41:56 2016 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_xwindisp.c,v 1.1 2016/06/11 18:41:56 kamil Exp $
+
+Fix build issue on NetBSD. I don't know what is sighandler(0).
+
+--- src/xwindisp.c.orig        2000-09-28 11:03:56.000000000 +0000
++++ src/xwindisp.c
+@@ -1281,8 +1281,9 @@ xWin_display_cycle()
+         break;
+ 
+       case 'd':
+-        sighandler(0);                /* ??? debugState = STEP; *//* stepping =
++        /*sighandler(0);*/                /* ??? debugState = STEP; *//* stepping =
+                                  * FALSE; */
++        fprintf(stderr, "unsupported");
+         break;
+ 
+       case '>':



Home | Main Index | Thread Index | Old Index