From 8a63c78087f85d76b555768ba45bfb0270c145b4 Mon Sep 17 00:00:00 2001 From: wiz Date: Sat, 6 Jan 2007 02:07:50 +0000 Subject: Initial import of gamazons-0.83: Amazons is a game played on a 10x10 chess board. Each side has four pieces (amazons) that move like chess queens (in a straight line in any direction). Instead of capturing pieces like in chess, the game is determined based on who moves last. Each move consists of two parts. First an amazon moves to a new square and then fires an arrow to another square (the arrow is fired in a straight line in any direction from the square the amazon landed on). The square the arrow lands on becomes a permenant block for the rest of the game. No one can move over it, or fire an arrow over it. Every turn an amazon must move and fire an arrow, so every turn there is one less square available on the board. Try and block in your opponent or section off a good chunk of the board for yourself. --- games/gamazons/DESCR | 14 ++++++++++++++ games/gamazons/Makefile | 17 +++++++++++++++++ games/gamazons/PLIST | 35 +++++++++++++++++++++++++++++++++++ games/gamazons/distinfo | 6 ++++++ games/gamazons/patches/patch-aa | 32 ++++++++++++++++++++++++++++++++ 5 files changed, 104 insertions(+) create mode 100644 games/gamazons/DESCR create mode 100644 games/gamazons/Makefile create mode 100644 games/gamazons/PLIST create mode 100644 games/gamazons/distinfo create mode 100644 games/gamazons/patches/patch-aa (limited to 'games/gamazons') diff --git a/games/gamazons/DESCR b/games/gamazons/DESCR new file mode 100644 index 00000000000..00d9110fff8 --- /dev/null +++ b/games/gamazons/DESCR @@ -0,0 +1,14 @@ +Amazons is a game played on a 10x10 chess board. Each side has four +pieces (amazons) that move like chess queens (in a straight line +in any direction). Instead of capturing pieces like in chess, the +game is determined based on who moves last. + +Each move consists of two parts. First an amazon moves to a new +square and then fires an arrow to another square (the arrow is +fired in a straight line in any direction from the square the amazon +landed on). The square the arrow lands on becomes a permenant block +for the rest of the game. No one can move over it, or fire an arrow +over it. Every turn an amazon must move and fire an arrow, so every +turn there is one less square available on the board. Try and block +in your opponent or section off a good chunk of the board for +yourself. diff --git a/games/gamazons/Makefile b/games/gamazons/Makefile new file mode 100644 index 00000000000..52c8dd2109f --- /dev/null +++ b/games/gamazons/Makefile @@ -0,0 +1,17 @@ +# $NetBSD: Makefile,v 1.1.1.1 2007/01/06 02:07:50 wiz Exp $ +# + +DISTNAME= gamazons-0.83 +CATEGORIES= games +MASTER_SITES= http://www.yorgalily.org/gamazons/src/ + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://www.yorgalily.org/gamazons/ +COMMENT= GNOME program for playing the game Amazons + +GNU_CONFIGURE= yes +USE_TOOLS+= pkg-config gmake +USE_DIRS+= gnome2-1.6 xdg-1.4 + +.include "../../devel/libgnomeui/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/games/gamazons/PLIST b/games/gamazons/PLIST new file mode 100644 index 00000000000..749e4644ee7 --- /dev/null +++ b/games/gamazons/PLIST @@ -0,0 +1,35 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2007/01/06 02:07:50 wiz Exp $ +bin/gamazons +share/applications/gamazons.desktop +share/gamazons/aaron.theme +share/gamazons/aaron2.theme +share/gamazons/default.theme +share/gamazons/plain.theme +share/gnome/help/gamazons/C/gamazons.html +share/gnome/help/gamazons/C/topic.dat +share/pixmaps/gamazons/a_black.png +share/pixmaps/gamazons/a_black_square.png +share/pixmaps/gamazons/a_grey_square.png +share/pixmaps/gamazons/a_white.png +share/pixmaps/gamazons/a_white_square.png +share/pixmaps/gamazons/b_black.png +share/pixmaps/gamazons/b_black_square.png +share/pixmaps/gamazons/b_grey_square.png +share/pixmaps/gamazons/b_white.png +share/pixmaps/gamazons/b_white_square.png +share/pixmaps/gamazons/black.png +share/pixmaps/gamazons/black_square.png +share/pixmaps/gamazons/charcoal_square.png +share/pixmaps/gamazons/gnome-gamazons.png +share/pixmaps/gamazons/gold.png +share/pixmaps/gamazons/grey_square.png +share/pixmaps/gamazons/pearl.png +share/pixmaps/gamazons/purple.png +share/pixmaps/gamazons/purple2.png +share/pixmaps/gamazons/white.png +share/pixmaps/gamazons/white_square.png +share/pixmaps/gnome-gamazons.png +@dirrm share/gamazons +@dirrm share/gnome/help/gamazons/C +@dirrm share/gnome/help/gamazons +@dirrm share/pixmaps/gamazons diff --git a/games/gamazons/distinfo b/games/gamazons/distinfo new file mode 100644 index 00000000000..2b401137e06 --- /dev/null +++ b/games/gamazons/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1.1.1 2007/01/06 02:07:50 wiz Exp $ + +SHA1 (gamazons-0.83.tar.gz) = 62ef6bfaeaaf36a31f00377599feb286d489bb27 +RMD160 (gamazons-0.83.tar.gz) = 2fd9433846173a7bc53eb7abd9dfbf367460df5e +Size (gamazons-0.83.tar.gz) = 258614 bytes +SHA1 (patch-aa) = 9f2db32d979eace078aa0b871142d1c6c13e1d5b diff --git a/games/gamazons/patches/patch-aa b/games/gamazons/patches/patch-aa new file mode 100644 index 00000000000..89fe51a249c --- /dev/null +++ b/games/gamazons/patches/patch-aa @@ -0,0 +1,32 @@ +$NetBSD: patch-aa,v 1.1.1.1 2007/01/06 02:07:50 wiz Exp $ + +--- src/board.c.orig 2002-11-25 00:47:38.000000000 +0000 ++++ src/board.c +@@ -1403,8 +1403,7 @@ int get_move_from_str(move *m, char move + + int read_in_moves(FILE *history_fd) + { +- char *buffer=NULL; +- size_t buf_size = 30; ++ char buffer[1024]; + + state *s; + move m; +@@ -1422,7 +1421,7 @@ int read_in_moves(FILE *history_fd) + bstate_set_dont_slide(TRUE); + } + //printf("History contents:\n"); +- while (getline(&buffer, &buf_size, history_fd) != -1) ++ while (fgets(buffer, sizeof(buffer), history_fd) != NULL) + { + if (replay_mode && !bstate_get_replay_mode()) //If not in replay mode anymore, drop out + return FALSE; +@@ -1446,8 +1445,6 @@ int read_in_moves(FILE *history_fd) + bstate_set_dont_slide(FALSE); + return FALSE; + } +- free(buffer); +- buffer = NULL; + + if (replay_mode) //Delay for appropriate amount of time + { -- cgit v1.2.3