aboutsummaryrefslogtreecommitdiff
path: root/games/ptools
diff options
context:
space:
mode:
authorAlejandro Pulver <alepulver@FreeBSD.org>2008-01-30 03:55:27 +0000
committerAlejandro Pulver <alepulver@FreeBSD.org>2008-01-30 03:55:27 +0000
commit611bbdeb72628112f6388a925b7d7d60b411a770 (patch)
treebcaca20acf09c028686aea7f2cf66b210f17f36c /games/ptools
parent23854a54d7c6200c37ca0f58c82f6360bec52f2c (diff)
downloadports-611bbdeb72628112f6388a925b7d7d60b411a770.tar.gz
ports-611bbdeb72628112f6388a925b7d7d60b411a770.zip
Notes
Diffstat (limited to 'games/ptools')
-rw-r--r--games/ptools/Makefile50
-rw-r--r--games/ptools/distinfo12
-rw-r--r--games/ptools/files/patch-mopt.c12
-rw-r--r--games/ptools/pkg-descr21
-rw-r--r--games/ptools/pkg-plist10
5 files changed, 105 insertions, 0 deletions
diff --git a/games/ptools/Makefile b/games/ptools/Makefile
new file mode 100644
index 000000000000..8c7b27976b8f
--- /dev/null
+++ b/games/ptools/Makefile
@@ -0,0 +1,50 @@
+# New ports collection makefile for: ptools
+# Date created: 2008-01-15
+# Whom: alepulver
+#
+# $FreeBSD$
+#
+
+PORTNAME= ptools
+PORTVERSION= 1.1
+CATEGORIES= games
+MASTER_SITES= http://www.koth.org/pmars/:koth \
+ http://www.infionline.net/~wtnewton/corewar/:corestep
+DISTFILES= ${PORTNAME}${PORTVERSION:S/.//}.zip:koth \
+ pmars08s.zip:koth \
+ p3-2.pl:koth \
+ corestep.c:corestep
+EXTRACT_ONLY= ${DISTFILES:C/:[[:alpha:]]+$//:N*.pl:N*.c}
+
+MAINTAINER= alepulver@FreeBSD.org
+COMMENT= Accessory programs for pMARS (Core War simulator)
+
+USE_ZIP= yes
+USE_PERL5_RUN= yes
+MAKEFILE= makefile.ptools
+ALL_TARGET= mopt mts pname
+NO_WRKSUBDIR= yes
+
+MAN6= ptools-mopt.6 ptools-mts.6
+
+post-build:
+ (${ECHO_CMD} "#!${PERL}"; ${CAT} ${DISTDIR}/p3-2.pl) \
+ > ${WRKSRC}/p3-2.pl
+ ${CC} ${CFLAGS} -o ${WRKSRC}/corestep ${DISTDIR}/corestep.c -lm
+
+do-install:
+.for f in corestep mopt mts pname
+ ${INSTALL_PROGRAM} ${WRKSRC}/${f} ${PREFIX}/bin/${PORTNAME}-${f}
+.endfor
+ ${INSTALL_SCRIPT} ${WRKSRC}/p3-2.pl ${PREFIX}/bin/${PORTNAME}-p3-2
+.for f in mopt.6 mts.6
+ ${INSTALL_MAN} ${WRKSRC}/${f} ${MAN6PREFIX}/man/man6/${PORTNAME}-${f}
+.endfor
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+. for f in mopt.doc mts.doc pname.doc readme.ptools
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
+. endfor
+.endif
+
+.include <bsd.port.mk>
diff --git a/games/ptools/distinfo b/games/ptools/distinfo
new file mode 100644
index 000000000000..7a2906d72261
--- /dev/null
+++ b/games/ptools/distinfo
@@ -0,0 +1,12 @@
+MD5 (ptools11.zip) = b271d93469a72244f74ec36f34522d52
+SHA256 (ptools11.zip) = e27d7ebf2e353d25899d9cd5bd9521669372c37196c867cb5864a590bed3d413
+SIZE (ptools11.zip) = 113657
+MD5 (pmars08s.zip) = b2e8899f3dd366a00820d2a030bd1fd2
+SHA256 (pmars08s.zip) = b61f949cd4ce6285c4c10cf0ff194e600dec0c14ace75effda8617df8bfa121d
+SIZE (pmars08s.zip) = 170874
+MD5 (p3-2.pl) = deee0388528cb53f1ad5c6b98b84c5e7
+SHA256 (p3-2.pl) = b0d9234372d83ab23c05049221c1f48ab2b6ed0cc007fd62ff9aed2f00f642c0
+SIZE (p3-2.pl) = 3653
+MD5 (corestep.c) = 1b401e152587cd7162b985966a9869ae
+SHA256 (corestep.c) = 5573ec059c658abe9ce0fb920111cd1f1ba2da9afcbc4252cddc1a5cfc1a4502
+SIZE (corestep.c) = 11401
diff --git a/games/ptools/files/patch-mopt.c b/games/ptools/files/patch-mopt.c
new file mode 100644
index 000000000000..136354f5e2be
--- /dev/null
+++ b/games/ptools/files/patch-mopt.c
@@ -0,0 +1,12 @@
+*** mopt.c.orig Sat Jun 8 00:25:38 1996
+--- mopt.c Fri May 6 18:24:20 2005
+***************
+*** 21,27 ****
+ #define FAR far
+ #define MEMSET _fmemset
+ #else
+- #include <malloc.h>
+ #include <signal.h>
+ #define MALLOC malloc
+ #define FAR
+--- 21,26 ----
diff --git a/games/ptools/pkg-descr b/games/ptools/pkg-descr
new file mode 100644
index 000000000000..be99819a4ce3
--- /dev/null
+++ b/games/ptools/pkg-descr
@@ -0,0 +1,21 @@
+PTools version 1.1.
+
+This is a collection of utility programs for the game of Core War. The
+programs in this archive work well with the pMARS system, but most programs
+will also work with other simulators. Below is an overview of what we have:
+
+* mts - Short for "MARS Tournament Scheduler".
+* mopt - The "multiple optimizer" calculates optimal sets of constants for
+ warriors.
+* pname - pname renames warrior files based on the ;name line.
+
+These additional tools have been included in the port but are not part of the
+original ptools package:
+
+* p3-2 - For generating p^3 redcode snippets.
+* corestep - For finding optimal step constants (similar to mopt).
+
+Note that the port prefixes all of these programs with "ptools-" to avoid
+conflicts and/or confusions with other ports.
+
+WWW: http://www.koth.org/pmars/
diff --git a/games/ptools/pkg-plist b/games/ptools/pkg-plist
new file mode 100644
index 000000000000..cf368cc6001f
--- /dev/null
+++ b/games/ptools/pkg-plist
@@ -0,0 +1,10 @@
+bin/ptools-corestep
+bin/ptools-mopt
+bin/ptools-mts
+bin/ptools-p3-2
+bin/ptools-pname
+%%PORTDOCS%%%%DOCSDIR%%/mopt.doc
+%%PORTDOCS%%%%DOCSDIR%%/mts.doc
+%%PORTDOCS%%%%DOCSDIR%%/pname.doc
+%%PORTDOCS%%%%DOCSDIR%%/readme.ptools
+%%PORTDOCS%%@dirrm %%DOCSDIR%%