Import of miniCHESS-0.8

wmminichess is a frontend to the gnuchess program for
playing a game of chess against the computer from the Window
Maker dock.

ok naddy@
This commit is contained in:
wilfried 2001-02-09 12:58:07 +00:00
parent 567c161396
commit 02926a8e22
7 changed files with 103 additions and 0 deletions

View File

@ -0,0 +1,27 @@
# $OpenBSD: Makefile,v 1.1.1.1 2001/02/09 12:58:07 wilfried Exp $
DISTNAME= miniCHESS-0.8
PKGNAME= wm${DISTNAME:L}
CATEGORIES= games x11 x11/windowmaker
NEED_VERSION= 1.340
HOMEPAGE= http://www.electricrain.com/edavis/miniCHESS/
MASTER_SITES= ${HOMEPAGE}
MAINTAINER= Peter Stromberg <wilfried@openbsd.org>
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
RUN_DEPENDS= gnuchessx::games/gnuchess
USE_X11= Yes
ALL_TARGET= minichess
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/minichess ${PREFIX}/bin
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/wmminichess
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/wmminichess/
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
MD5 (miniCHESS-0.8.tar.gz) = 173422ee5651032e4d150ddc6e9f17c8
RMD160 (miniCHESS-0.8.tar.gz) = cad729e0a9f0a9e091407be5cc61f7b470bba2cd
SHA1 (miniCHESS-0.8.tar.gz) = b62292d352979d50961c51c5e2450d2b362a6297

View File

@ -0,0 +1,38 @@
$OpenBSD: patch-Makefile,v 1.1.1.1 2001/02/09 12:58:08 wilfried Exp $
--- Makefile.orig Thu Jul 29 06:59:39 1999
+++ Makefile Tue Feb 6 15:04:20 2001
@@ -22,7 +22,7 @@
# Specify the location of gnuchessx on your system.
-GNUCHESS = /usr/local/bin/gnuchessx
+GNUCHESS = ${TRUEPREFIX}/bin/gnuchessx
# Where do you want the binary installed?
DESTDIR = /usr/local/bin
@@ -33,16 +33,16 @@ BIN_NAME = minichess
# Uncomment this line if your using Solaris.
#SOLARIS_LIBS = -lsocket
-CFLAGS = -ansi -I/usr/X11R6/include
-LIBDIR = -L/usr/X11R6/lib
+CFLAGS += -I${X11BASE}/include
+LIBDIR = -L${X11BASE}/lib
LIBS = -lXpm -lXext -lX11 $(SOLARIS_LIBS)
OBJS = chess.o xgen.o
.c.o:
- gcc $(CFLAGS) -DENGINE=\"$(GNUCHESS)\" -c $< -o $*.o
+ $(CC) $(CFLAGS) -DENGINE=\"$(GNUCHESS)\" -c $< -o $@
$(BIN_NAME): $(OBJS)
- gcc $(CFLAGS) -o $(BIN_NAME) $(OBJS) $(LIBDIR) $(LIBS)
+ $(CC) $(CFLAGS) -o $(BIN_NAME) $(OBJS) $(LIBDIR) $(LIBS)
clean:
rm -f $(OBJS) $(BIN_NAME)
@@ -50,4 +50,3 @@ clean:
install:
cp -f $(BIN_NAME) $(DESTDIR)
chmod 755 $(DESTDIR)/$(BIN_NAME)
-

View File

@ -0,0 +1,22 @@
$OpenBSD: patch-chess_c,v 1.1.1.1 2001/02/09 12:58:08 wilfried Exp $
--- chess.c.orig Mon Sep 13 19:15:50 1999
+++ chess.c Thu Feb 8 22:40:27 2001
@@ -1864,7 +1864,8 @@ void textGame
/* get the move from stdin */
bzero(move, 10);
printf(" > ");
- fgets(move, 10, stdin);
+ if(!fgets(move, 10, stdin))
+ strcpy(move, Q);
#ifdef DEBUG
if (strncasecmp(move, "gch", 3) == 0)
@@ -1972,7 +1973,7 @@ int checkColor
*
* RETURNS: N/A
*/
-void main(int argc, char* argv[])
+int main(int argc, char* argv[])
{
int toChild[2];
int fromChild[2];

View File

@ -0,0 +1 @@
wm-dockapp; chess game

View File

@ -0,0 +1,8 @@
wmminichess is a frontend to the gnuchess program for
playing a game of chess against the computer from the Window
Maker dock.
The README in ${PREFIX}/share/doc/wmminichess/
should explain how to play.
WWW: ${HOMEPAGE}

View File

@ -0,0 +1,4 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2001/02/09 12:58:09 wilfried Exp $
bin/minichess
share/doc/wmminichess/README
@dirrm share/doc/wmminichess