aboutsummaryrefslogtreecommitdiffstats
path: root/games/cre
diff options
context:
space:
mode:
authoralepulver <alepulver@FreeBSD.org>2008-01-30 12:03:27 +0800
committeralepulver <alepulver@FreeBSD.org>2008-01-30 12:03:27 +0800
commit1d10a30cff6bd5b1eb21e395640c3560b81b6e7c (patch)
tree663bd5d11123d0f3e2ff7c746b9cff75d5d3ee83 /games/cre
parent0f9d9fb50d30f084b259c5ff5ff0fcd3a95f971f (diff)
downloadfreebsd-ports-gnome-1d10a30cff6bd5b1eb21e395640c3560b81b6e7c.tar.gz
freebsd-ports-gnome-1d10a30cff6bd5b1eb21e395640c3560b81b6e7c.tar.zst
freebsd-ports-gnome-1d10a30cff6bd5b1eb21e395640c3560b81b6e7c.zip
CRE, which stands for Corewars Redcode Evolver, is an open-source program that
automatically generates programs for the game Corewars by using Charles Darwin's theories on natural selection. When you start CRE, here's what happens: 1. A population of warriors is created by randomly selecting instructions. 2. Each warrior's fitness is tested by battling with other warriors in the population. 3. The fittest warriors reproduce and replace less fit warriors. 4. The previous two steps are repeated indefinitely. WWW: http://cre.sourceforge.net/
Diffstat (limited to 'games/cre')
-rw-r--r--games/cre/Makefile37
-rw-r--r--games/cre/distinfo3
-rw-r--r--games/cre/files/Makefile10
-rw-r--r--games/cre/pkg-descr12
-rw-r--r--games/cre/pkg-plist4
5 files changed, 66 insertions, 0 deletions
diff --git a/games/cre/Makefile b/games/cre/Makefile
new file mode 100644
index 000000000000..2e28bb70cd50
--- /dev/null
+++ b/games/cre/Makefile
@@ -0,0 +1,37 @@
+# New ports collection makefile for: cre
+# Date created: 2008-01-15
+# Whom: alepulver
+#
+# $FreeBSD$
+#
+
+PORTNAME= cre
+DISTVERSION= 1.2beta_r2
+CATEGORIES= games
+MASTER_SITES= SF
+DISTNAME= ${PORTNAME}_${DISTVERSION}_src
+
+MAINTAINER= alepulver@FreeBSD.org
+COMMENT= Corewars Redcode Evolver
+
+USE_DOS2UNIX= ../*.txt
+WRKSRC= ${WRKDIR}/src
+
+post-extract:
+ @${CP} ${FILESDIR}/${MAKEFILE} ${WRKSRC}
+
+post-patch:
+ @cd ${WRKSRC} && ${REINPLACE_CMD} -e '/memwatch\.h/d' \
+ asm.c pspace.c sim.c
+ @cd ${WRKSRC} && ${REINPLACE_CMD} -e \
+ 's|random[[:blank:]]*(|myrandom(|' \
+ battler.c generator.c globals.h Main.c
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKDIR}/*.txt ${DOCSDIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/games/cre/distinfo b/games/cre/distinfo
new file mode 100644
index 000000000000..597f3a302442
--- /dev/null
+++ b/games/cre/distinfo
@@ -0,0 +1,3 @@
+MD5 (cre_1.2beta_r2_src.tar.gz) = 1acb1017bb3cd6b18f99ff67900da29d
+SHA256 (cre_1.2beta_r2_src.tar.gz) = 89a9831c9afd42b67600826514be6ecd0a260de5fbef1d3adfea3b9c31d532c2
+SIZE (cre_1.2beta_r2_src.tar.gz) = 49504
diff --git a/games/cre/files/Makefile b/games/cre/files/Makefile
new file mode 100644
index 000000000000..81cb926cda46
--- /dev/null
+++ b/games/cre/files/Makefile
@@ -0,0 +1,10 @@
+# Makefile for games/cre (Corewars Redcode Evolver).
+#
+# $FreeBSD$
+#
+
+PROG= cre
+SRCS!= ls *.[ch]
+NO_MAN= yes
+
+.include <bsd.prog.mk>
diff --git a/games/cre/pkg-descr b/games/cre/pkg-descr
new file mode 100644
index 000000000000..59340b9c57ad
--- /dev/null
+++ b/games/cre/pkg-descr
@@ -0,0 +1,12 @@
+CRE, which stands for Corewars Redcode Evolver, is an open-source program that
+automatically generates programs for the game Corewars by using Charles
+Darwin's theories on natural selection. When you start CRE, here's what
+happens:
+
+1. A population of warriors is created by randomly selecting instructions.
+2. Each warrior's fitness is tested by battling with other warriors in the
+ population.
+3. The fittest warriors reproduce and replace less fit warriors.
+4. The previous two steps are repeated indefinitely.
+
+WWW: http://cre.sourceforge.net/
diff --git a/games/cre/pkg-plist b/games/cre/pkg-plist
new file mode 100644
index 000000000000..bba61c4b9abc
--- /dev/null
+++ b/games/cre/pkg-plist
@@ -0,0 +1,4 @@
+bin/cre
+%%PORTDOCS%%%%DOCSDIR%%/CRE Manual.txt
+%%PORTDOCS%%%%DOCSDIR%%/Exhaust README.txt
+%%PORTDOCS%%@dirrm %%DOCSDIR%%