Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 04 Dec 2004 09:08:27 -0600
From:      "Conrad J. Sabatier" <conrads@cox.net>
To:        Volker Stolz <vs@FreeBSD.org>
Cc:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/74441: Update port: games/gnuchess (new version 5.07 with optional opening book support added)
Message-ID:  <1102172907.36385.12.camel@dolphin.local.net>
In-Reply-To: <20041203232737.5947083d@dolphin.local.net>
References:  <200412021146.iB2BkMnV053891@freefall.freebsd.org> <20041203232737.5947083d@dolphin.local.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-o28H3IpQgOg6f5bVIogZ
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Fri, 2004-12-03 at 23:27 -0600, Conrad J. Sabatier wrote:
> On Thu, 2 Dec 2004 11:46:22 GMT, Volker Stolz <vs@FreeBSD.org> wrote:
> 
> > Synopsis: Update port: games/gnuchess (new version 5.07 with optional
> > opening book support added)
> > 
> > State-Changed-From-To: open->feedback
> > State-Changed-By: vs
> > State-Changed-When: Thu Dec 2 11:45:27 GMT 2004
> > State-Changed-Why: 
> > Please see the Porter's Handbook on how to submit updates in
> > unified diff format. Also, please not that README.html is not part
> > of the port but generated for the CD-sets.
> > 
> > http://www.freebsd.org/cgi/query-pr.cgi?pr=74441
> > 
> 
> Ah, OK.  Sorry about that.  Here's the diff:

I'm sorry.  I don't know how it happened, but it seems that all the tab
characters in that diff I sent somehow got converted to spaces.

Sending the diff again, this time as an attachment, to hopefully avoid
the same thing happening again.

-- 
Conrad J. Sabatier -- conrads@cox.net -- "In Unix veritas"


--=-o28H3IpQgOg6f5bVIogZ
Content-Disposition: attachment; filename=gnuchess.diff
Content-Type: text/x-patch; name=gnuchess.diff; charset=iso8859-1
Content-Transfer-Encoding: 7bit

diff -ruN ports/games/gnuchess.orig/CVS/Entries ports/games/gnuchess/CVS/Entries
--- ports/games/gnuchess.orig/CVS/Entries	Fri Dec  3 23:04:35 2004
+++ ports/games/gnuchess/CVS/Entries	Wed Dec 31 18:00:00 1969
@@ -1,5 +0,0 @@
-/Makefile/1.17/Wed Oct  8 11:31:49 2003//
-/distinfo/1.9/Thu Jan 29 07:23:54 2004//
-/pkg-descr/1.2/Mon Oct  7 10:28:08 2002//
-/pkg-plist/1.5/Wed Oct  8 11:31:49 2003//
-D
diff -ruN ports/games/gnuchess.orig/CVS/Repository ports/games/gnuchess/CVS/Repository
--- ports/games/gnuchess.orig/CVS/Repository	Fri Dec  3 23:04:35 2004
+++ ports/games/gnuchess/CVS/Repository	Wed Dec 31 18:00:00 1969
@@ -1 +0,0 @@
-ports/games/gnuchess
diff -ruN ports/games/gnuchess.orig/CVS/Root ports/games/gnuchess/CVS/Root
--- ports/games/gnuchess.orig/CVS/Root	Fri Dec  3 23:04:35 2004
+++ ports/games/gnuchess/CVS/Root	Wed Dec 31 18:00:00 1969
@@ -1 +0,0 @@
-/home/ncvs
diff -ruN ports/games/gnuchess.orig/Makefile ports/games/gnuchess/Makefile
--- ports/games/gnuchess.orig/Makefile	Wed Oct  8 06:31:49 2003
+++ ports/games/gnuchess/Makefile	Sat Dec  4 09:03:01 2004
@@ -1,20 +1,39 @@
 # New ports collection makefile for:	Gnu Chess
-# Date created:		04 July 1996
-# Whom:			markm
+# Date created: 			04 July 1996
+# Whom: 				markm
 #
 # $FreeBSD: ports/games/gnuchess/Makefile,v 1.17 2003/10/08 11:31:49 edwin Exp $
 #
 
-PORTNAME=	gnuchess
-PORTVERSION=	5.06
-PORTREVISION=	1
-CATEGORIES=	games
-MASTER_SITES=	${MASTER_SITE_GNU}
+PORTNAME=		gnuchess
+PORTVERSION=		5.07
+CATEGORIES=		games
+MASTER_SITES=		${MASTER_SITE_GNU}
 MASTER_SITE_SUBDIR=	chess
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	"Classic" Gnu Chess
 
+PLIST_FILES=	bin/gnuchess \
+		bin/gnuchessx
+
+.if !defined(NOPORTDOCS)
+PORTDOCS=	ChangeLog \
+		NEWS \
+		README
+.endif
+
+OPTIONS=	OPENING_BOOK "Install opening book (24 MB download)" on
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_OPENING_BOOK)
+DISTFILES+=	book_1.01.pgn.gz
+PLIST_DIRS+=	%%DATADIR%%
+PLIST_FILES+=	%%DATADIR%%/book.dat
+EXTRACT_ONLY=	${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
+.endif
+
 USE_REINPLACE=	yes
 GNU_CONFIGURE=	yes
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
@@ -22,9 +41,25 @@
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|-D_THREAD_SAFE|${PTHREAD_CFLAGS:S/"//g}|g ; \
-		 s|-pthread ||g' ${WRKSRC}/configure
+	s|-pthread ||g' ${WRKSRC}/configure
+
+pre-install:
+.if defined(WITH_OPENING_BOOK)
+	@scripts/create_opening_book.sh ${DISTDIR} ${WRKSRC}
+.endif
 
 post-install:
 	${LN} -f ${PREFIX}/bin/gnuchess ${PREFIX}/bin/gnuchessx
+.if defined(WITH_OPENING_BOOK)
+	@${ECHO_CMD} Installing opening book
+	${MKDIR} ${DATADIR} && \
+	${CP} ${WRKSRC}/src/book.dat ${DATADIR}
+.endif
+.if !defined(NOPORTDOCS)
+	@${ECHO_CMD} Installing documentation
+	${MKDIR} ${DOCSDIR} && \
+	${CP} ${WRKSRC}/NEWS ${DOCSDIR} && \
+	${CP} ${WRKSRC}/doc/* ${DOCSDIR}
+.endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -ruN ports/games/gnuchess.orig/README.html ports/games/gnuchess/README.html
--- ports/games/gnuchess.orig/README.html	Wed Dec 31 18:00:00 1969
+++ ports/games/gnuchess/README.html	Sat Dec  4 08:58:42 2004
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
+
+<html>
+  <head>
+    <title>The FreeBSD Ports Collection (games/gnuchess)</title>
+  </head>
+
+  <body>
+    <h1>The FreeBSD Ports Collection (games/gnuchess)</h1>
+    <hr>
+
+    <p>You are now in the directory for the port "games/gnuchess".</p>
+
+    <p>The package name of this port is "gnuchess-5.07".</p>
+
+    <p>This is the one-line description for this port:</p>
+    <hr>
+
+    <p>
+"Classic" Gnu Chess
+    </p>
+    <hr>
+
+    <p>Please read the "<a href="pkg-descr">description file</a>" for a
+    longer description and/or visit the <a href="http://savannah.gnu.org/projects/chess/">web site</a> for futher informations.</p>
+
+    <p>If needed, you may contact the <a href=
+    "mailto:ports@FreeBSD.org">maintainer</a> of this port or the port <a href=
+    "mailto:ports@FreeBSD.org">mailing-list</a>.</p>
+
+    <p></p>
+
+    <p></p>
+
+    <p>Go to the <a href="../../README.html">top of the ports tree</a> for
+    a summary on how to use the ports collection.</p>
+    <hr>
+
+    <p><a href="../README.html">Go up one level</a> | <a href=
+    "../../README.html">Go to top of ports tree</a></p>
+  </body>
+</html>
+
diff -ruN ports/games/gnuchess.orig/distinfo ports/games/gnuchess/distinfo
--- ports/games/gnuchess.orig/distinfo	Thu Jan 29 01:23:54 2004
+++ ports/games/gnuchess/distinfo	Fri Dec  3 23:06:34 2004
@@ -1,2 +1,4 @@
-MD5 (gnuchess-5.06.tar.gz) = 9b25c80bef39e6ab24088dcfdea7d845
-SIZE (gnuchess-5.06.tar.gz) = 212829
+MD5 (gnuchess-5.07.tar.gz) = 259da00aa559e5624c65279484fccaf7
+SIZE (gnuchess-5.07.tar.gz) = 234542
+MD5 (book_1.01.pgn.gz) = 1be508d7a38a8c9a7d599d0cd92b24a6
+SIZE (book_1.01.pgn.gz) = 26070544
diff -ruN ports/games/gnuchess.orig/files/patch-book.h ports/games/gnuchess/files/patch-book.h
--- ports/games/gnuchess.orig/files/patch-book.h	Wed Dec 31 18:00:00 1969
+++ ports/games/gnuchess/files/patch-book.h	Fri Dec  3 23:06:34 2004
@@ -0,0 +1,12 @@
+--- src/book.h.orig    Fri Nov 26 19:20:29 2004
++++ src/book.h Fri Nov 26 19:21:15 2004
+@@ -31,8 +31,7 @@
+  */
+ static char const * bookbin[] = {
+    "book.dat",
+-   "/usr/share/games/gnuchess/book.dat",
+-   "/usr/lib/games/gnuchess/book.dat",
++   "/usr/local/share/gnuchess/book.dat",
+    NULL
+ };
+ 
diff -ruN ports/games/gnuchess.orig/pkg-descr ports/games/gnuchess/pkg-descr
--- ports/games/gnuchess.orig/pkg-descr	Mon Oct  7 05:28:08 2002
+++ ports/games/gnuchess/pkg-descr	Fri Dec  3 23:06:34 2004
@@ -1,4 +1,4 @@
-       Gnuchess  plays	a  game  of  chess against the user or it
+       Gnuchess  plays a  game  of  chess against the user or it
        plays against itself.
 
        Gnuchess is an updated version of the  GNU  chess  playing
diff -ruN ports/games/gnuchess.orig/pkg-plist ports/games/gnuchess/pkg-plist
--- ports/games/gnuchess.orig/pkg-plist	Wed Oct  8 06:31:49 2003
+++ ports/games/gnuchess/pkg-plist	Wed Dec 31 18:00:00 1969
@@ -1,2 +0,0 @@
-bin/gnuchess
-bin/gnuchessx
diff -ruN ports/games/gnuchess.orig/scripts/create_opening_book.sh ports/games/gnuchess/scripts/create_opening_book.sh
--- ports/games/gnuchess.orig/scripts/create_opening_book.sh	Wed Dec 31 18:00:00 1969
+++ ports/games/gnuchess/scripts/create_opening_book.sh	Fri Dec  3 23:06:34 2004
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+DISTDIR=$1
+WRKSRC=$2
+
+[ -f ${WRKSRC}/src/book.dat ] && exit 0
+
+builtin echo -e "\nCreating opening book for gnuchess...\n"
+
+cp ${DISTDIR}/book_1.01.pgn.gz ${WRKSRC}/src/book.pgn.gz
+
+cd ${WRKSRC}/src && gunzip -f book.pgn.gz
+
+./gnuchess << END
+book add book.pgn
+quit
+END
+
+[ $? = 0 ] && builtin echo -e "\nBook successfully created!\n"

--=-o28H3IpQgOg6f5bVIogZ--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1102172907.36385.12.camel>