Update port: games/gnuchess (new version 5.07 with optional opening book support added)

Conrad J. Sabatier conrads at cox.net
Fri Nov 26 19:50:18 PST 2004


>Submitter-Id:	current-users
>Originator:	Conrad J. Sabatier
>Organization:	none
>Confidential:	no 
>Synopsis:	Update port: games/gnuchess (new version 5.07 with optional opening book support added)
>Severity:	non-critical
>Priority:	medium
>Category:	ports
>Class:		update
>Release:	FreeBSD 6.0-CURRENT amd64
>Environment:
System: FreeBSD dolphin.local.net 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Wed Nov 24 15:13:40 CST 2004 conrads at dolphin.local.net:/usr/obj/usr/src/sys/CUSTOM amd64


>Description:
	Update of port games/gnuchess to version 5.07.  Includes support
	for building and installing opening book (as an OPTION)
>How-To-Repeat:
	shar archive attached
>Fix:

	

--- gnuchess.port begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	/usr/ports/games/gnuchess
#	/usr/ports/games/gnuchess/README.html
#	/usr/ports/games/gnuchess/Makefile
#	/usr/ports/games/gnuchess/distinfo
#	/usr/ports/games/gnuchess/pkg-descr
#	/usr/ports/games/gnuchess/scripts
#	/usr/ports/games/gnuchess/scripts/create_opening_book.sh
#	/usr/ports/games/gnuchess/files
#	/usr/ports/games/gnuchess/files/patch-book.h
#
echo c - /usr/ports/games/gnuchess
mkdir -p /usr/ports/games/gnuchess > /dev/null 2>&1
echo x - /usr/ports/games/gnuchess/README.html
sed 's/^X//' >/usr/ports/games/gnuchess/README.html << 'END-of-/usr/ports/games/gnuchess/README.html'
X<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
X
X<html>
X  <head>
X    <title>The FreeBSD Ports Collection (/usr/ports/games/gnuchess)</title>
X  </head>
X
X  <body>
X    <h1>The FreeBSD Ports Collection (/usr/ports/games/gnuchess)</h1>
X    <hr>
X
X    <p>You are now in the directory for the port "/usr/ports/games/gnuchess".</p>
X
X    <p>The package name of this port is "gnuchess-5.06_1".</p>
X
X    <p>This is the one-line description for this port:</p>
X    <hr>
X
X    <p>
X"Classic" Gnu Chess
X    </p>
X    <hr>
X
X    <p>Please read the "<a href="pkg-descr">description file</a>" for a
X    longer description and/or visit the <a href="http://savannah.gnu.org/projects/chess/">web site</a> for futher informations.</p>
X
X    <p>If needed, you may contact the <a href=
X    "mailto:ports at FreeBSD.org">maintainer</a> of this port or the port <a href=
X    "mailto:ports at FreeBSD.org">mailing-list</a>.</p>
X
X    <p></p>
X
X    <p></p>
X
X    <p>Go to the <a href="/../../../../README.html">top of the ports tree</a> for
X    a summary on how to use the ports collection.</p>
X    <hr>
X
X    <p><a href="../README.html">Go up one level</a> | <a href=
X    "/../../../../README.html">Go to top of ports tree</a></p>
X  </body>
X</html>
X
END-of-/usr/ports/games/gnuchess/README.html
echo x - /usr/ports/games/gnuchess/Makefile
sed 's/^X//' >/usr/ports/games/gnuchess/Makefile << 'END-of-/usr/ports/games/gnuchess/Makefile'
X# New ports collection makefile for:	Gnu Chess
X# Date created:		04 July 1996
X# Whom:			markm
X#
X# $FreeBSD: ports/games/gnuchess/Makefile,v 1.17 2003/10/08 11:31:49 edwin Exp $
X#
X
XPORTNAME=	gnuchess
XPORTVERSION=	5.07
XCATEGORIES=	games
XMASTER_SITES=	${MASTER_SITE_GNU}
XMASTER_SITE_SUBDIR=	chess
X
XMAINTAINER=	ports at FreeBSD.org
XCOMMENT=	"Classic" Gnu Chess
X
XPLIST_FILES=	bin/gnuchess \
X		bin/gnuchessx
X
X.if !defined(NOPORTDOCS)
XPORTDOCS=	ChangeLog \
X		NEWS \
X		README
X.endif
X
XOPTIONS=    OPENING_BOOK "Install opening book (24 MB download)" on
X
X.include <bsd.port.pre.mk>
X
X.if defined(WITH_OPENING_BOOK)
XDISTFILES+=	book_1.01.pgn.gz
XPLIST_DIRS+=	%%DATADIR%%
XPLIST_FILES+=	%%DATADIR%%/book.dat
XEXTRACT_ONLY=	${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
X.endif
X
XUSE_REINPLACE=	yes
XGNU_CONFIGURE=	yes
XCONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
XCONFIGURE_ENV=	LIBS="${PTHREAD_LIBS}"
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's|-D_THREAD_SAFE|${PTHREAD_CFLAGS:S/"//g}|g ; \
X		 s|-pthread ||g' ${WRKSRC}/configure
X
Xpre-install:
X.if defined(WITH_OPENING_BOOK)
X	@scripts/create_opening_book.sh ${DISTDIR} ${WRKSRC}
X.endif
X
Xpost-install:
X	${LN} -f ${PREFIX}/bin/gnuchess ${PREFIX}/bin/gnuchessx
X.if defined(WITH_OPENING_BOOK)
X	@${ECHO_CMD} Installing opening book
X	${MKDIR} ${DATADIR} && \
X	${CP} ${WRKSRC}/src/book.dat ${DATADIR}
X.endif
X.if !defined(NOPORTDOCS)
X	@${ECHO_CMD} Installing documentation
X	${MKDIR} ${DOCSDIR} && \
X	${CP} ${WRKSRC}/NEWS ${DOCSDIR} && \
X	${CP} ${WRKSRC}/doc/* ${DOCSDIR}
X.endif
X
X.include <bsd.port.post.mk>
END-of-/usr/ports/games/gnuchess/Makefile
echo x - /usr/ports/games/gnuchess/distinfo
sed 's/^X//' >/usr/ports/games/gnuchess/distinfo << 'END-of-/usr/ports/games/gnuchess/distinfo'
XMD5 (gnuchess-5.07.tar.gz) = 259da00aa559e5624c65279484fccaf7
XSIZE (gnuchess-5.07.tar.gz) = 234542
XMD5 (book_1.01.pgn.gz) = 1be508d7a38a8c9a7d599d0cd92b24a6
XSIZE (book_1.01.pgn.gz) = 26070544
END-of-/usr/ports/games/gnuchess/distinfo
echo x - /usr/ports/games/gnuchess/pkg-descr
sed 's/^X//' >/usr/ports/games/gnuchess/pkg-descr << 'END-of-/usr/ports/games/gnuchess/pkg-descr'
X       Gnuchess  plays	a  game  of  chess against the user or it
X       plays against itself.
X
X       Gnuchess is an updated version of the  GNU  chess  playing
X       program.   It has a simple alpha-numeric board display.
X
XWWW: http://savannah.gnu.org/projects/chess/
END-of-/usr/ports/games/gnuchess/pkg-descr
echo c - /usr/ports/games/gnuchess/scripts
mkdir -p /usr/ports/games/gnuchess/scripts > /dev/null 2>&1
echo x - /usr/ports/games/gnuchess/scripts/create_opening_book.sh
sed 's/^X//' >/usr/ports/games/gnuchess/scripts/create_opening_book.sh << 'END-of-/usr/ports/games/gnuchess/scripts/create_opening_book.sh'
X#!/bin/sh
X
XDISTDIR=$1
XWRKSRC=$2
X
X[ -f ${WRKSRC}/src/book.dat ] && exit 0
X
Xbuiltin echo -e "\nCreating opening book for gnuchess...\n"
X
Xcp ${DISTDIR}/book_1.01.pgn.gz ${WRKSRC}/src/book.pgn.gz
X
Xcd ${WRKSRC}/src && gunzip -f book.pgn.gz
X
X./gnuchess << END
Xbook add book.pgn
Xquit
XEND
X
X[ $? = 0 ] && builtin echo -e "\nBook successfully created!\n"
END-of-/usr/ports/games/gnuchess/scripts/create_opening_book.sh
echo c - /usr/ports/games/gnuchess/files
mkdir -p /usr/ports/games/gnuchess/files > /dev/null 2>&1
echo x - /usr/ports/games/gnuchess/files/patch-book.h
sed 's/^X//' >/usr/ports/games/gnuchess/files/patch-book.h << 'END-of-/usr/ports/games/gnuchess/files/patch-book.h'
X--- src/book.h.orig	Fri Nov 26 19:20:29 2004
X+++ src/book.h	Fri Nov 26 19:21:15 2004
X@@ -31,8 +31,7 @@
X  */
X static char const * bookbin[] = {
X    "book.dat",
X-   "/usr/share/games/gnuchess/book.dat",
X-   "/usr/lib/games/gnuchess/book.dat",
X+   "/usr/local/share/gnuchess/book.dat",
X    NULL
X };
X 
END-of-/usr/ports/games/gnuchess/files/patch-book.h
exit
--- gnuchess.port ends here ---




More information about the freebsd-ports mailing list