aboutsummaryrefslogtreecommitdiff
path: root/games/gnuchess
diff options
context:
space:
mode:
authorJohan van Selst <johans@FreeBSD.org>2012-06-16 14:51:46 +0000
committerJohan van Selst <johans@FreeBSD.org>2012-06-16 14:51:46 +0000
commit50245660e6ec5084dab67cc17da3ff06d8811134 (patch)
tree37888d653ed19c6bec38e78415e05d94c029121f /games/gnuchess
parent0484c2a45e7329d63bfc11ec19f60b760f64d531 (diff)
downloadports-50245660e6ec5084dab67cc17da3ff06d8811134.tar.gz
ports-50245660e6ec5084dab67cc17da3ff06d8811134.zip
Convert to new options framework
Notes
Notes: svn path=/head/; revision=299407
Diffstat (limited to 'games/gnuchess')
-rw-r--r--games/gnuchess/Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/games/gnuchess/Makefile b/games/gnuchess/Makefile
index 39624b5d2ef0..21cbf201430d 100644
--- a/games/gnuchess/Makefile
+++ b/games/gnuchess/Makefile
@@ -21,13 +21,15 @@ PLIST_FILES= bin/gnuchess bin/gnuchessu bin/gnuchessx
PORTDOCS= *
PORTDATA= *
-OPTIONS= OPENING_BOOK "Install opening book (25 MB download)" On
+OPTIONS_DEFINE= OPENING_BOOK
+OPTIONS_DEFAULT= OPENING_BOOK
+OPENING_BOOK_DESC= Install opening book (25 MB download)
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
-.if defined(WITH_OPENING_BOOK)
+.if ${PORT_OPTIONS:MOPENING_BOOK}
DISTFILES+= book_1.02.pgn.gz
-EXTRACT_ONLY= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
+EXTRACT_ONLY+= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
.endif
GNU_CONFIGURE= yes
@@ -38,7 +40,7 @@ post-patch:
s|-pthread ||g' ${WRKSRC}/configure
post-build:
-.if defined(WITH_OPENING_BOOK)
+.if ${PORT_OPTIONS:MOPENING_BOOK}
zcat ${DISTDIR}/book_1.02.pgn.gz > ${WRKSRC}/src/book.pgn
cd ${WRKSRC}/src && ./gnuchess --addbook book.pgn
@${REINPLACE_CMD} -e '/Book =/s/false/true/' ${WRKSRC}/src/gnuchess.ini
@@ -51,4 +53,4 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/NEWS ${WRKSRC}/doc/* ${DOCSDIR}
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>