aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorjohans <johans@FreeBSD.org>2012-03-25 17:27:07 +0800
committerjohans <johans@FreeBSD.org>2012-03-25 17:27:07 +0800
commit713d6f045907b8eb0d9543a4e32d8cc1bf0b4ba6 (patch)
treef1bda7d2bc1e66b739ce93bc99172d4be3d3f1b9 /games
parentd70c5935f55341d782bd805654389a29d096e857 (diff)
downloadfreebsd-ports-gnome-713d6f045907b8eb0d9543a4e32d8cc1bf0b4ba6.tar.gz
freebsd-ports-gnome-713d6f045907b8eb0d9543a4e32d8cc1bf0b4ba6.tar.zst
freebsd-ports-gnome-713d6f045907b8eb0d9543a4e32d8cc1bf0b4ba6.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
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"