summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2007-07-25 00:11:10 +0000
committerrillig <rillig@pkgsrc.org>2007-07-25 00:11:10 +0000
commitbd89c633a4a26a72d417fca3a4984508a016f914 (patch)
tree04abcc5c3d146a7be62df04d7fe3a599b5580f53 /games
parentddd12d5ad70eb6cc600918b1b95867ce86c74cfc (diff)
downloadpkgsrc-bd89c633a4a26a72d417fca3a4984508a016f914.tar.gz
Imported velena.
Velena is a program playing connect-four based on the work of Victor Allis, who proved in 1986 that the first player can always win.
Diffstat (limited to 'games')
-rw-r--r--games/velena/DESCR2
-rw-r--r--games/velena/Makefile25
-rw-r--r--games/velena/PLIST3
-rw-r--r--games/velena/distinfo10
-rw-r--r--games/velena/patches/patch-aa34
-rw-r--r--games/velena/patches/patch-ab14
-rw-r--r--games/velena/patches/patch-ac22
-rw-r--r--games/velena/patches/patch-ad14
-rw-r--r--games/velena/patches/patch-ae14
9 files changed, 138 insertions, 0 deletions
diff --git a/games/velena/DESCR b/games/velena/DESCR
new file mode 100644
index 00000000000..aca6dcf1f09
--- /dev/null
+++ b/games/velena/DESCR
@@ -0,0 +1,2 @@
+Velena is a program playing connect-four based on the work of Victor
+Allis, who proved in 1986 that the first player can always win.
diff --git a/games/velena/Makefile b/games/velena/Makefile
new file mode 100644
index 00000000000..1a6b64db14f
--- /dev/null
+++ b/games/velena/Makefile
@@ -0,0 +1,25 @@
+# $NetBSD: Makefile,v 1.1.1.1 2007/07/25 00:11:10 rillig Exp $
+#
+
+DISTNAME= veleng10
+PKGNAME= velena-1.0
+CATEGORIES= games
+MASTER_SITES= http://www.ce.unipr.it/~gbe/
+EXTRACT_SUFX= .zip
+
+MAINTAINER= rillig@NetBSD.org
+HOMEPAGE= http://www.ce.unipr.it/~gbe/
+COMMENT= Perfect-play engine for connect four
+
+#LICENSE= public-domain
+
+EXTRACT_OPTS_ZIP= -LLaqo
+WRKSRC= ${WRKDIR}
+MAKE_FILE= makefile
+INSTALLATION_DIRS_FROM_PLIST= yes
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/veleng ${DESTDIR}${PREFIX}/bin/velena
+ ${INSTALL_DATA} ${WRKSRC}/readme ${DESTDIR}${PREFIX}/share/doc/velena/README
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/games/velena/PLIST b/games/velena/PLIST
new file mode 100644
index 00000000000..b6ab37bab5c
--- /dev/null
+++ b/games/velena/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2007/07/25 00:11:10 rillig Exp $
+bin/velena
+share/doc/velena/README
diff --git a/games/velena/distinfo b/games/velena/distinfo
new file mode 100644
index 00000000000..16e47fb5cad
--- /dev/null
+++ b/games/velena/distinfo
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.1.1.1 2007/07/25 00:11:10 rillig Exp $
+
+SHA1 (veleng10.zip) = f9af1cc6f809347151bee4763a62073fe56ef9b4
+RMD160 (veleng10.zip) = a8cc6933196140b5ac941f4369e9bb422a885851
+Size (veleng10.zip) = 243352 bytes
+SHA1 (patch-aa) = 810ca44164b273710fccf8237b1b5343d3354e9d
+SHA1 (patch-ab) = 91138783750acf293b0df4a0d9a34373ec5627d8
+SHA1 (patch-ac) = dd01e7c0231c715421ef56a230e44b2e075b6f67
+SHA1 (patch-ad) = 11e71c97346be1ecd1cef65a1fe2a27805ca0bee
+SHA1 (patch-ae) = d08ca8a02db09bd1013e3823308a445796ca3897
diff --git a/games/velena/patches/patch-aa b/games/velena/patches/patch-aa
new file mode 100644
index 00000000000..aec0b6abe62
--- /dev/null
+++ b/games/velena/patches/patch-aa
@@ -0,0 +1,34 @@
+$NetBSD: patch-aa,v 1.1.1.1 2007/07/25 00:11:10 rillig Exp $
+
+Make the program work on OpenBSD. ;)
+
+--- pnsearch.c.orig 1997-07-27 17:44:30.000000000 +0200
++++ pnsearch.c 2007-07-25 01:57:10.000000000 +0200
+@@ -113,7 +113,7 @@ void show_pinfo()
+ if(parameters.pr>0 && parameters.ds>0)
+ {
+ sprintf(st," Nodes: %5ld/%-5ld P=%-3d D=%-3d Time: %2d:%02d:%02d SEQ=%s %s",
+- parameters.nodes,parameters.maxnodes,parameters.pr,parameters.ds,hh,mm,ss,
++ parameters.nodes,parameters.maxnodes,(int)parameters.pr,(int)parameters.ds,hh,mm,ss,
+ seqs,adv[a]);
+ }
+ else if(parameters.pr==0)
+@@ -157,7 +157,7 @@ void change_max_nodes_numb(void)
+
+ void change_sequence()
+ {
+- short seq[BOARDX],done[BOARDX],x,valid=YES;
++ int seq[BOARDX],done[BOARDX],x,valid=YES;
+
+ for(x=0;x<BOARDX;x++)
+ done[x]=NO;
+@@ -999,7 +999,8 @@ void build_associated_file()
+ unsigned short key;
+
+ printf("Input file to parse : ");
+- gets(filein);
++ if (fgets(filein, sizeof(filein), stdin) == NULL)
++ exit(0);
+
+ printf("Start from sequence #1 ? (Y/N)\n");
+ do
diff --git a/games/velena/patches/patch-ab b/games/velena/patches/patch-ab
new file mode 100644
index 00000000000..95149215da5
--- /dev/null
+++ b/games/velena/patches/patch-ab
@@ -0,0 +1,14 @@
+$NetBSD: patch-ab,v 1.1.1.1 2007/07/25 00:11:10 rillig Exp $
+
+--- cmdline.c.orig 2007-07-25 01:53:41.000000000 +0200
++++ cmdline.c 2007-07-25 01:54:04.000000000 +0200
+@@ -51,7 +51,8 @@ void command_line_input(struct board *bo
+
+ do {
+ printf(">"); // Waiting for the user to enter the string
+- gets(st);
++ if (fgets(st, sizeof(st), stdin) == NULL)
++ break;
+
+ if(st[0]=='q') flag = 0; // if the string begins with 'q' we quit.
+ else {
diff --git a/games/velena/patches/patch-ac b/games/velena/patches/patch-ac
new file mode 100644
index 00000000000..73b809a7e5c
--- /dev/null
+++ b/games/velena/patches/patch-ac
@@ -0,0 +1,22 @@
+$NetBSD: patch-ac,v 1.1.1.1 2007/07/25 00:11:10 rillig Exp $
+
+--- connect4.c.orig 1997-07-27 17:29:38.000000000 +0200
++++ connect4.c 2007-07-25 01:52:05.000000000 +0200
+@@ -276,7 +276,7 @@ void initTitle()
+ printf("All rights reserved.\n\n");
+ }
+
+-void main(short ac,char **av)
++int main(void)
+ {
+ short x;
+ struct board *board;
+@@ -324,7 +324,7 @@ void main(short ac,char **av)
+
+ free(board->solvable_groups);
+ free(board);
+- exit(0);
++ return 0;
+ }
+
+
diff --git a/games/velena/patches/patch-ad b/games/velena/patches/patch-ad
new file mode 100644
index 00000000000..c07e133c234
--- /dev/null
+++ b/games/velena/patches/patch-ad
@@ -0,0 +1,14 @@
+$NetBSD: patch-ad,v 1.1.1.1 2007/07/25 00:11:10 rillig Exp $
+
+--- database.c.orig 1997-07-27 17:44:50.000000000 +0200
++++ database.c 2007-07-25 01:52:55.000000000 +0200
+@@ -698,7 +698,8 @@ void merge()
+ char filename[255];
+
+ printf("Enter name of file to merge: ");
+- gets(filename);
++ if (fgets(filename, sizeof(filename), stdin) == NULL)
++ exit(0);
+
+ printf("\n");
+ printf("Sure you want to merge '%s' ? (Y/N)\n\n",filename);
diff --git a/games/velena/patches/patch-ae b/games/velena/patches/patch-ae
new file mode 100644
index 00000000000..3acc62c7474
--- /dev/null
+++ b/games/velena/patches/patch-ae
@@ -0,0 +1,14 @@
+$NetBSD: patch-ae,v 1.1.1.1 2007/07/25 00:11:10 rillig Exp $
+
+--- evaluate.c.orig 1997-07-27 17:15:12.000000000 +0200
++++ evaluate.c 2007-07-25 02:01:38.000000000 +0200
+@@ -73,7 +73,8 @@ void show_square_used(struct board *boar
+
+ void test_conditions(char **matrix,struct board *board)
+ {
+- short x,y,z,n1,n2,x1,y1;
++ int x,y;
++ short z,n1,n2,x1,y1;
+
+ printf("Enter rule 1 number : ");
+ scanf("%d %d",&x,&y);