aboutsummaryrefslogtreecommitdiff
path: root/games/gnuchess
diff options
context:
space:
mode:
authorJohan van Selst <johans@FreeBSD.org>2011-07-27 16:29:20 +0000
committerJohan van Selst <johans@FreeBSD.org>2011-07-27 16:29:20 +0000
commitad7562548d9ff64304c9cbdd3bbe440f096922aa (patch)
tree9e3fa25633de146e2a113ee66a0b82fbc9c9983b /games/gnuchess
parent7df1eba0931ab234f70bfd0633828b3d6ee9ceac (diff)
downloadports-ad7562548d9ff64304c9cbdd3bbe440f096922aa.tar.gz
ports-ad7562548d9ff64304c9cbdd3bbe440f096922aa.zip
Add a patch to open the Opening Book in read-only mode if r/w fails.
This lets non-root users use the system-wide Opening Book as well.
Notes
Notes: svn path=/head/; revision=278413
Diffstat (limited to 'games/gnuchess')
-rw-r--r--games/gnuchess/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/games/gnuchess/Makefile b/games/gnuchess/Makefile
index b7ceebae686e..099ebda209b9 100644
--- a/games/gnuchess/Makefile
+++ b/games/gnuchess/Makefile
@@ -7,6 +7,7 @@
PORTNAME= gnuchess
PORTVERSION= 6.0.0
+PORTREVISION= 1
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= chess
@@ -37,6 +38,9 @@ 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)