- update to gnushogi-1.3

This commit is contained in:
ajacoutot 2007-12-16 01:01:29 +00:00
parent b17d988464
commit 0075ac534a
10 changed files with 171 additions and 131 deletions

View File

@ -1,38 +1,37 @@
# $OpenBSD: Makefile,v 1.23 2007/09/15 18:01:01 simon Exp $
#
# $OpenBSD: Makefile,v 1.24 2007/12/16 01:01:29 ajacoutot Exp $
COMMENT= GNU version of Shogi
DISTNAME= gnushogi-1.2p03
PKGNAME= gnushogi-1.2.3
DISTNAME= gnushogi-1.3
CATEGORIES= games
# License: GPL
# GPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c curses m termcap
WANTLIB= c curses m termcap
MASTER_SITES= ${MASTER_SITE_GNU:=gnushogi/}
MAKE_ENV= CC="${CC}"
WRKSRC= ${WRKDIST}/src
CONFIGURE_STYLE=gnu
CONFIGURE_ARGS= --without-x \
--without-xshogi
NO_REGRESS= Yes
DOCFILES= shogi.rules tutorial1.gam tutorial2.gam
do-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/gnushogi
${INSTALL_PROGRAM} ${WRKSRC}/gnushogi ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/gnushogir ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/gnushogix ${PREFIX}/libexec
${INSTALL_DATA} ${WRKSRC}/gnushogi.bbk ${PREFIX}/share/gnushogi
${INSTALL_MAN} ${WRKDIST}/doc/gnushogi.1 ${PREFIX}/man/man6/gnushogi.6
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/gnushogi
.for doc in ${DOCFILES}
${INSTALL_DATA} ${WRKDIST}/doc/${doc} ${PREFIX}/share/doc/gnushogi
.endfor
${INSTALL_PROGRAM} ${WRKSRC}/gnushogi/gnushogi ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/gnushogi/gnushogi.bbk ${PREFIX}/share/gnushogi
${INSTALL_MAN} ${WRKDIST}/doc/gnushogi.6 ${PREFIX}/man/man6/gnushogi.6
${INSTALL_DATA} ${WRKDIST}/doc/BOOKFILES ${PREFIX}/share/doc/gnushogi
${INSTALL_DATA} ${WRKDIST}/doc/PORTING ${PREFIX}/share/doc/gnushogi
${INSTALL_DATA} ${WRKSRC}/doc/*.gam ${PREFIX}/share/doc/gnushogi
${INSTALL_DATA} ${WRKSRC}/doc/*.html ${PREFIX}/share/doc/gnushogi
${INSTALL_DATA} ${WRKSRC}/doc/*.ref ${PREFIX}/share/doc/gnushogi
${INSTALL_DATA} ${WRKSRC}/doc/*.rules ${PREFIX}/share/doc/gnushogi
.include <bsd.port.mk>

View File

@ -1,5 +1,5 @@
MD5 (gnushogi-1.2p03.tar.gz) = JCVx0cnmwg//ZGoOWwvKEA==
RMD160 (gnushogi-1.2p03.tar.gz) = zpOgOY097OFi3nB20KZoiHaZvjQ=
SHA1 (gnushogi-1.2p03.tar.gz) = DmDsYdiOT4vdBcwlfamoRwx97xI=
SHA256 (gnushogi-1.2p03.tar.gz) = PjDvNFfcZ29YhooweNxqtub1xwWOzNh7FKgT/MAAxrM=
SIZE (gnushogi-1.2p03.tar.gz) = 188078
MD5 (gnushogi-1.3.tar.gz) = WS6fOZPtSDUls8G81Ise+Q==
RMD160 (gnushogi-1.3.tar.gz) = jLNCOMsXWFXkvCspwq5JKhQVdvk=
SHA1 (gnushogi-1.3.tar.gz) = xh/MoDbu1N+mZRMwp6UcINJd1sM=
SHA256 (gnushogi-1.3.tar.gz) = VxSKieSrJwKyQ0wQ9uJhvCbqCVR1TD0LPj6sZ7WJ5cI=
SIZE (gnushogi-1.3.tar.gz) = 558642

View File

@ -0,0 +1,88 @@
$OpenBSD: patch-doc_gnushogi_6,v 1.1 2007/12/16 01:01:29 ajacoutot Exp $
--- doc/gnushogi.6.orig Sun Dec 16 01:49:16 2007
+++ doc/gnushogi.6 Sun Dec 16 01:52:26 2007
@@ -18,7 +18,6 @@ gnushogi \- GNU Shogi (Japanese Chess), version 1.3
.B [-T size]
.B [-v]
.B [-x]
-.B [-X]
.B arg1 arg2
]
.SH DESCRIPTION
@@ -43,19 +42,15 @@ file is written.
.PP
.I Gnushogi
is a modified version of the gnuchess program. It has a simple
-alphanumeric board display, or it can be compiled for use with the
-.B xshogi
-program under X windows. The program gets its opening moves from the file
+alphanumeric board display.
+The program gets its opening moves from the file
.B gnushogi.bbk
which is located in a directory specified in the Makefile. To invoke the
program type:
.TP
-.B gnushogi -C
+.B gnushogi -C (or just gnushogi)
- simple curses based version
.TP
-.B gnushogi -X (or just gnushogi)
-- xshogi compatible version
-.TP
.B gnushogi -R
- raw test display version
.SH TIME CONTROLS
@@ -68,7 +63,7 @@ will generate one move every 30 seconds, while
.B gnushogi 5:00
will generate one move every 5 minutes.
-If two or more arguments are given, they will be used to set tournament
+if two or more arguments are given, they will be used to set tournament
time controls with the first argument of each pair being the number of
moves and the second being the total clock time in minutes[:seconds].
Thus, entering
@@ -85,9 +80,6 @@ after that. Up to 4 pairs of controls may be specifie
If no argument is given the program will prompt the user for level of play.
-For use with
-.B xshogi
-see the documentation on that program.
.SH BOOK
.PP
The book
@@ -201,9 +193,6 @@ Use
.BR value
as the evaluation window
.BR xwndw.
-.TP
-.B -X
-Use xshogi display mode (the default).
.SH "COMMANDS"
.PP
In addition to legal moves, the following commands are available as responses.
@@ -419,24 +408,10 @@ first the
.B go
command must be given.
.PP
-.B xget
--- read an
-.I xshogi
-position file.
-.PP
-.B xsave
--- save as an
-.I xshogi
-position file.
-.PP
.B xwndw
-- change X window. The window around alpha/beta used to determine whether
the position should be scored or just estimated.
.SH BUGS
.PP
-.fi
-.SH SEE ALSO
-.nf
-xshogi(6)
.fi

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-gnushogi_Makefile_in,v 1.1 2007/12/16 01:01:29 ajacoutot Exp $
--- gnushogi/Makefile.in.orig Tue Dec 4 17:48:25 2007
+++ gnushogi/Makefile.in Tue Dec 4 17:49:35 2007
@@ -46,7 +46,7 @@ BINDIR = $(prefix)/bin
# Where the language description, the book, and the
# persistent hashtable live.
-LIBDIR = $(prefix)/lib/gnushogi
+LIBDIR = $(prefix)/share/gnushogi
# Where the man page goes.
MANDIR = $(prefix)/man/man6

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-gnushogi_init_c,v 1.1 2007/12/16 01:01:29 ajacoutot Exp $
--- gnushogi/init.c.orig Fri Apr 26 17:42:22 2002
+++ gnushogi/init.c Sun Dec 16 01:48:13 2007
@@ -62,7 +62,7 @@ short nolist = 1; /* Don't list the game aft
* or DISPLAY_X; the default is DISPLAY_X to make life easier for xshogi.
*/
-display_t display_type = DISPLAY_X;
+display_t display_type = DISPLAY_CURSES;
unsigned int ttbllimit;
@@ -258,7 +258,7 @@ distance(short a, short b)
short
distance(short a, short b)
{
- return (use_distdata
+ return (use_distdata && a < NO_SQUARES && b < NO_SQUARES
? (short)(*distdata)[(int)a][(int)b]
: (short)computed_distance(a, b));
}

View File

@ -1,56 +0,0 @@
$OpenBSD: patch-src_Makefile,v 1.1 2002/08/02 20:27:18 naddy Exp $
--- src/Makefile.orig Wed May 24 16:05:26 1995
+++ src/Makefile Fri Aug 2 22:11:00 2002
@@ -41,22 +41,23 @@ VERS= 1.2p03
DIST= ../README-$(VERS) ../doc ../misc ../src
# Installation directory
-prefix=/usr/local
+#prefix=/usr/local
#prefix=/public/projects/shogi
+prefix=${PREFIX}
# Change these to something less transitory, like /usr/games, and then
# compile. Ask your system admin / unix guru to put gnushogi.{hsh,lng,tbk}
# in $(LIBDIR).
# Where the binaries live.
-BINDIR= $(prefix)/games
+BINDIR= $(prefix)/bin
#BINDIR=/public/projects/shogi/bin
# Where language description, our book, and the persistent hash live.
-LIBDIR= $(prefix)/games/lib/gnushogi
+LIBDIR= $(prefix)/share/gnushogi
#LIBDIR=/public/projects/shogi/lib
# Distribution directory
-DISTDIR=/public/projects/shogi
+#DISTDIR=/public/projects/shogi
# Programs being distributed
PROGS=gnushogi-$(VERS)
@@ -76,7 +77,7 @@ LCURSES=-lcurses -ltermcap
#CC= c89 $(OPT) $(GENOPT)
# Use this if you are lucky enough to have GNU CC.
#CC= /usr/pub/bin/gcc -fsigned-char $(OPT) $(GENOPT)
-CC= gcc -W -fsigned-char $(OPT) $(GENOPT)
+#CC= gcc -W -fsigned-char $(OPT) $(GENOPT)
#CC= cc $(OPT) $(GENOPT)
# Miscellaneous CFLAGS. Uncomment the one you need and comment the other
@@ -96,7 +97,9 @@ CC= gcc -W -fsigned-char $(OPT) $(GENOPT
#CFLAGS= -O2 -funroll-loops -traditional-cpp -DNO_STRING_INCLUDE -DNOFIONREAD # gnu cc 2.00 (hawk)
#CFLAGS= -O2 -funroll-loops -DSEVENBIT # djgpp
#CFLAGS= -g -funroll-loops # gnu cc 2.00 on SunOS with debug
-CFLAGS= -O2 -funroll-loops # gnu cc 2.00 on SunOS
+#CFLAGS= -O2 -funroll-loops # gnu cc 2.00 on SunOS
+#CFLAGS= -O2 -pipe -fno-strength-reduce # -m486
+CFLAGS+= $(OPT) $(GENOPT)
# flags for DJGPP package
#COFF2EXE= coff2exe $(GNUSHOGI)
@@ -454,3 +457,4 @@ clean:
-rm -f $(DISTDIR)/gnushogi-$(VERS)/src/gnushogi.bbk
-find $(DISTDIR)/gnushogi-$(VERS) \( -name '*.o' -o -name '*~' -o -name 'CL*' -o -name 'PATCH*' -o -name '#*#' -o -name '%*%' -o -name '*orig' -o -name 'CL*' -o -name '*prt' -o -name '*bak' -o -name '*BAK' \) -exec rm -f {} \;
+DISTDIR=/net/freefall/a/obrien/ports/games/gnushogi/work

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-src_dspcom_c,v 1.1 2002/08/02 20:27:18 naddy Exp $
--- src/dspcom.c.orig Mon May 22 16:56:39 1995
+++ src/dspcom.c Fri Aug 2 22:03:33 2002
@@ -1567,7 +1567,7 @@ Sdepth = 0;
#ifdef NONDSP
s[0] = sx[0] = '\0';
while (!sx[0])
- (void) gets (sx);
+ (void) fgets (sx, 79, stdin);
#else
fflush (stdout);
#if defined MSDOS || defined THINK_C

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-src_init_c,v 1.1 2004/08/16 14:58:48 espie Exp $
--- src/init.c.orig Fri May 19 10:44:14 1995
+++ src/init.c Mon Aug 16 16:15:46 2004
@@ -225,7 +225,7 @@ short distance (short a, short b)
#else
short distance (short a, short b)
{
- return (use_distdata ? (short)(*distdata)[(int)a][(int)b] : (short)computed_distance(a,b));
+ return (use_distdata && a < NO_SQUARES && b < NO_SQUARES ? (short)(*distdata)[(int)a][(int)b] : (short)computed_distance(a,b));
}
#endif

View File

@ -1,25 +0,0 @@
$OpenBSD: patch-src_nondsp_c,v 1.1 2002/08/02 20:27:18 naddy Exp $
--- src/nondsp.c.orig Wed May 24 15:54:13 1995
+++ src/nondsp.c Fri Aug 2 22:03:33 2002
@@ -292,10 +292,10 @@ SetupBoard (void)
NewGame ();
- gets (s); /* skip "setup" command */
+ fgets (s, 79, stdin); /* skip "setup" command */
for (r = NO_ROWS-1; r >= 0; r--)
{
- gets (s);
+ fgets (s, 79, stdin);
for (c = 0; c <= (NO_COLS-1); c++)
{
ch = s[c];
@@ -645,7 +645,7 @@ SelectLevel (char *sx)
for(;*p != 'X';*q++ = *p++);
*q = '\0';
/* line empty ask for input */
- if(!T[0]){ printz (CP[61]); gets(T); strcat(T,"XX"); }
+ if(!T[0]){ printz (CP[61]); fgets(T, NO_SQUARES-1, stdin); strcat(T,"XX"); }
/* skip blackspace */
for (p = T; *p == ' '; p++) ;
/* could be moves or a fischer clock */

View File

@ -1,9 +1,34 @@
@comment $OpenBSD: PLIST,v 1.4 2004/09/15 00:46:09 espie Exp $
@comment $OpenBSD: PLIST,v 1.5 2007/12/16 01:01:30 ajacoutot Exp $
bin/gnushogi
bin/gnushogir
libexec/gnushogix
@man man/man6/gnushogi.6
share/doc/gnushogi/
share/doc/gnushogi/BOOKFILES
share/doc/gnushogi/PORTING
share/doc/gnushogi/gnushogi_1.html
share/doc/gnushogi/gnushogi_10.html
share/doc/gnushogi/gnushogi_11.html
share/doc/gnushogi/gnushogi_12.html
share/doc/gnushogi/gnushogi_13.html
share/doc/gnushogi/gnushogi_14.html
share/doc/gnushogi/gnushogi_15.html
share/doc/gnushogi/gnushogi_16.html
share/doc/gnushogi/gnushogi_17.html
share/doc/gnushogi/gnushogi_18.html
share/doc/gnushogi/gnushogi_19.html
share/doc/gnushogi/gnushogi_2.html
share/doc/gnushogi/gnushogi_20.html
share/doc/gnushogi/gnushogi_21.html
share/doc/gnushogi/gnushogi_22.html
share/doc/gnushogi/gnushogi_3.html
share/doc/gnushogi/gnushogi_4.html
share/doc/gnushogi/gnushogi_5.html
share/doc/gnushogi/gnushogi_6.html
share/doc/gnushogi/gnushogi_7.html
share/doc/gnushogi/gnushogi_8.html
share/doc/gnushogi/gnushogi_9.html
share/doc/gnushogi/gnushogi_stoc.html
share/doc/gnushogi/gnushogi_toc.html
share/doc/gnushogi/listserv.ref
share/doc/gnushogi/shogi.rules
share/doc/gnushogi/tutorial1.gam
share/doc/gnushogi/tutorial2.gam