pkgsrc-WIP-changes archive

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

pmars: Update to 0.9.2 and fix building



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sat Jun 11 20:02:59 2016 +0200
Changeset:	308c362fa5fcfedd96e163d02e3477d240b170c0

Modified Files:
	pmars/Makefile
	pmars/PLIST
	pmars/distinfo
Added Files:
	pmars/patches/patch-src_cdb.c
	pmars/patches/patch-src_sim.c
	pmars/patches/patch-src_sim.h
	pmars/patches/patch-src_xwindisp.c
Removed Files:
	pmars/patches/patch-aa
	pmars/patches/patch-ab

Log Message:
pmars: Update to 0.9.2 and fix building

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=308c362fa5fcfedd96e163d02e3477d240b170c0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 pmars/Makefile                     | 29 +++++++++++-----------------
 pmars/PLIST                        |  7 ++++++-
 pmars/distinfo                     | 13 ++++++++-----
 pmars/patches/patch-aa             | 32 -------------------------------
 pmars/patches/patch-ab             | 15 ---------------
 pmars/patches/patch-src_cdb.c      | 22 +++++++++++++++++++++
 pmars/patches/patch-src_sim.c      | 39 ++++++++++++++++++++++++++++++++++++++
 pmars/patches/patch-src_sim.h      | 13 +++++++++++++
 pmars/patches/patch-src_xwindisp.c | 15 +++++++++++++++
 9 files changed, 114 insertions(+), 71 deletions(-)

diffs:
diff --git a/pmars/Makefile b/pmars/Makefile
index 0cea07c..762f898 100644
--- a/pmars/Makefile
+++ b/pmars/Makefile
@@ -1,34 +1,27 @@
 # $NetBSD: Makefile,v 1.8 2012/11/25 23:32:29 othyro Exp $
 #
 
-DISTNAME=		pmars-0_8_6_tar
-PKGNAME=		pmars-0.8.6
+DISTNAME=		pmars-0.9.2
 CATEGORIES=		games
-MASTER_SITES=		http://www.koth.org/pmars/
-EXTRACT_SUFX=		.gz
+MASTER_SITES=		${MASTER_SITE_SOURCEFORGE:=corewar/}
 
 MAINTAINER=		pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=		http://www.koth.org/pmars/
 COMMENT=		The official Core Wars simulator
 
-WRKSRC=			${WRKDIR}/${PKGNAME_NOREV}
-USE_TOOLS+=		pkg-config gmake
-MAKE_FILE=		makefile
+USE_TOOLS+=		gmake
 
-.include "../../mk/bsd.prefs.mk"
+BUILD_MAKE_FLAGS=	-C src
 
-.if ${OPSYS} != "NetBSD" && ${OPSYS} != "FreeBSD" && ${OPSYS} != "SunOS"
-BUILD_DEPENDS+=		ex-[0-9]*:../../editors/ex
-.endif
-
-INSTALLATION_DIRS+=	bin share/pmars share/pmars/warriors ${PKGMANDIR}/man6
+INSTALLATION_DIRS+=	bin share/pmars share/pmars/config share/pmars/warriors ${PKGMANDIR}/man6
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/pmars ${DESTDIR}${PREFIX}/bin
-	${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/pmars/
-	${INSTALL_DATA} ${WRKSRC}/CONTRIB ${DESTDIR}${PREFIX}/share/pmars/
-	${INSTALL_DATA} ${WRKSRC}/*.red ${DESTDIR}${PREFIX}/share/pmars/warriors/
-	${INSTALL_MAN} ${WRKSRC}/pmars.6 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man6
+	${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 --git a/pmars/PLIST b/pmars/PLIST
index d1495b3..226f35d 100644
--- a/pmars/PLIST
+++ b/pmars/PLIST
@@ -1,8 +1,13 @@
-@comment $NetBSD: PLIST,v 1.4 2009/10/11 10:45:06 thomasklausner Exp $
+@comment $NetBSD$
 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
diff --git a/pmars/distinfo b/pmars/distinfo
index 58e4ba7..3467c35 100644
--- a/pmars/distinfo
+++ b/pmars/distinfo
@@ -1,7 +1,10 @@
 $NetBSD: distinfo,v 1.3 2009/05/09 10:15:11 cheusov Exp $
 
-SHA1 (pmars-0_8_6_tar.gz) = 633a55a30e7c0595a8a8d3184b9ee3db767ffdbd
-RMD160 (pmars-0_8_6_tar.gz) = 68e5baca81736621384214694a0d8c1059e0ff1f
-Size (pmars-0_8_6_tar.gz) = 153322 bytes
-SHA1 (patch-aa) = 8d1e564c904284fe5f23fcb40f396e585b6fb5e8
-SHA1 (patch-ab) = af05f25e276fc76c47a869618b319fca7592c6d4
+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_cdb.c) = f5d61ca48fa6706cd32b9c00eb7719fa13b083b3
+SHA1 (patch-src_sim.c) = cbfb49ffa36046f6ede75da089e1d97e16e4071f
+SHA1 (patch-src_sim.h) = 414f0600b17d09923fa43d020345849bebee1857
+SHA1 (patch-src_xwindisp.c) = 5a168790e355f437c3294207a4fc718efa097bbc
diff --git a/pmars/patches/patch-aa b/pmars/patches/patch-aa
deleted file mode 100644
index d7b639f..0000000
--- a/pmars/patches/patch-aa
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD: patch-aa,v 1.2 2006/10/29 11:23:12 shattered Exp $
-
---- makefile.orig	2006-04-16 04:38:15.000000000 +0200
-+++ makefile	2006-04-16 04:42:03.000000000 +0200
-@@ -1,6 +1,5 @@
- # generic UNIX makefile
- #CC = gcc			# req. for linux
--CC = cc				# if you don't have gcc
- # Configuration options:
- #
- # No.   Name            Incompatible with   Description
-@@ -15,9 +14,8 @@
- # (5)   -DSMALLMEM                          16-bit addresses, less memory
- # (6)   -DXWINGRAPHX    1                   X-Windows graphics (UNIX)
- 
--CFLAGS = -O -DEXT94
--LFLAGS = -x
--LIB = -lcurses -ltermlib		# enable this one for curses display
-+CFLAGS+= -DEXT94 -DXWINGRAPHX -I${X11BASE}/include
-+LIB = -L${X11BASE}/lib -Wl,-R${X11BASE}/lib -lX11
- # LIB = -lvgagl -lvga			# enable this one for Linux/SVGA
- # LIB = -lX11				# enable this one for X11
- 
-@@ -30,7 +28,7 @@
- OBJ2 = clparse.o global.o token.o 
- OBJ3 = str_eng.o
- 
--ALL: flags $(MAINFILE) man doc
-+all: flags $(MAINFILE) man doc
- 
- flags:
- 	@echo Making $(MAINFILE) with compiler flags $(CFLAGS)
diff --git a/pmars/patches/patch-ab b/pmars/patches/patch-ab
deleted file mode 100644
index 1171673..0000000
--- a/pmars/patches/patch-ab
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-ab,v 1.1 2009/05/09 10:15:11 cheusov Exp $
-
---- global.h.orig	2000-04-10 13:07:48.000000000 +0300
-+++ global.h
-@@ -28,6 +28,10 @@
- #include <stdlib.h>
- #endif
- 
-+#if !defined(unix)
-+#define unix
-+#endif
-+
- /* *********************************************************************
-    System dependent definitions or declarations
-    ********************************************************************* */
diff --git a/pmars/patches/patch-src_cdb.c b/pmars/patches/patch-src_cdb.c
new file mode 100644
index 0000000..e621fa5
--- /dev/null
+++ b/pmars/patches/patch-src_cdb.c
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- 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 --git a/pmars/patches/patch-src_sim.c b/pmars/patches/patch-src_sim.c
new file mode 100644
index 0000000..727fce0
--- /dev/null
+++ b/pmars/patches/patch-src_sim.c
@@ -0,0 +1,39 @@
+$NetBSD$
+
+--- 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 --git a/pmars/patches/patch-src_sim.h b/pmars/patches/patch-src_sim.h
new file mode 100644
index 0000000..1833ddc
--- /dev/null
+++ b/pmars/patches/patch-src_sim.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- 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 --git a/pmars/patches/patch-src_xwindisp.c b/pmars/patches/patch-src_xwindisp.c
new file mode 100644
index 0000000..62390fb
--- /dev/null
+++ b/pmars/patches/patch-src_xwindisp.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- 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