aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorJohan van Selst <johans@FreeBSD.org>2012-03-25 09:27:07 +0000
committerJohan van Selst <johans@FreeBSD.org>2012-03-25 09:27:07 +0000
commit644fa5f9096c2b42a9da020691676d2b2a7ad7ad (patch)
tree3a0c0a4277f5cc69065ed99cb431803d07cf4235 /games
parentf07a67135418811bf991673436b8b9fdf27809e2 (diff)
downloadports-644fa5f9096c2b42a9da020691676d2b2a7ad7ad.tar.gz
ports-644fa5f9096c2b42a9da020691676d2b2a7ad7ad.zip
- Update GNU Chess to 6.0.2
- Remove perl script to create opening book (new feature handles this) - Remove perl dependency - Remove patch to open opening books in read-only mode (fixed in distribution) Feature safe: yes
Notes
Notes: svn path=/head/; revision=293796
Diffstat (limited to 'games')
-rw-r--r--games/gnuchess/Makefile8
-rw-r--r--games/gnuchess/distinfo4
-rw-r--r--games/gnuchess/scripts/create_opening_book.pl20
3 files changed, 4 insertions, 28 deletions
diff --git a/games/gnuchess/Makefile b/games/gnuchess/Makefile
index aedc29e03927..39624b5d2ef0 100644
--- a/games/gnuchess/Makefile
+++ b/games/gnuchess/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= gnuchess
-PORTVERSION= 6.0.1
+PORTVERSION= 6.0.2
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= chess
@@ -28,7 +28,6 @@ OPTIONS= OPENING_BOOK "Install opening book (25 MB download)" On
.if defined(WITH_OPENING_BOOK)
DISTFILES+= book_1.02.pgn.gz
EXTRACT_ONLY= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
-USE_PERL5_BUILD=yes
.endif
GNU_CONFIGURE= yes
@@ -37,14 +36,11 @@ CONFIGURE_ENV= LIBS="${PTHREAD_LIBS}" MKDIR_P="${MKDIR}"
post-patch:
@${REINPLACE_CMD} -e 's|-D_THREAD_SAFE|${PTHREAD_CFLAGS:S/"//g}|g ; \
s|-pthread ||g' ${WRKSRC}/configure
- @${REINPLACE_CMD} -e '/BookFile = fopen/{p;s/B.*/if (BookFile == NULL)\
- BookFile = fopen(full_file_name,"rb");/;}' \
- ${WRKSRC}/src/adapter/book.cpp
post-build:
.if defined(WITH_OPENING_BOOK)
zcat ${DISTDIR}/book_1.02.pgn.gz > ${WRKSRC}/src/book.pgn
- cd ${WRKSRC}/src && ${PERL} ${SCRIPTDIR}/create_opening_book.pl
+ cd ${WRKSRC}/src && ./gnuchess --addbook book.pgn
@${REINPLACE_CMD} -e '/Book =/s/false/true/' ${WRKSRC}/src/gnuchess.ini
.endif
diff --git a/games/gnuchess/distinfo b/games/gnuchess/distinfo
index 0cba82f38c01..31055acdb76e 100644
--- a/games/gnuchess/distinfo
+++ b/games/gnuchess/distinfo
@@ -1,4 +1,4 @@
-SHA256 (gnuchess-6.0.1.tar.gz) = 671a8e4e9b9bab36cbd27448b493f6c4f02ca0afdaf57828bf609c22297eabeb
-SIZE (gnuchess-6.0.1.tar.gz) = 546034
+SHA256 (gnuchess-6.0.2.tar.gz) = 821e24ce4fd6f25267b2c46f7eda83bb5009e6e0ee03c5acf45d7cfa9078a3f5
+SIZE (gnuchess-6.0.2.tar.gz) = 547026
SHA256 (book_1.02.pgn.gz) = deac77edb061a59249a19deb03da349cae051e52527a6cb5af808d9398d32d44
SIZE (book_1.02.pgn.gz) = 26265281
diff --git a/games/gnuchess/scripts/create_opening_book.pl b/games/gnuchess/scripts/create_opening_book.pl
deleted file mode 100644
index 7997966c56f2..000000000000
--- a/games/gnuchess/scripts/create_opening_book.pl
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env perl
-#
-# Uses ./gnuchess to build 'book.bin' data from a 'book.pgn' input file
-#
-
-use IPC::Open2;
-
-print "\nCreating opening book for gnuchess...\n";
-
-unlink 'book.bin';
-open2(\*OUT, \*IN, './gnuchess');
-
-print IN "book add book.pgn\n";
-while (<OUT>)
-{
- print IN "quit\n" if /^all done/;
- print;
-}
-
-print "\nBook successfully created!\n"