aboutsummaryrefslogtreecommitdiffstats
path: root/games/gnuchess
diff options
context:
space:
mode:
authorjohans <johans@FreeBSD.org>2012-06-16 22:51:46 +0800
committerjohans <johans@FreeBSD.org>2012-06-16 22:51:46 +0800
commitffaa734a7497dcf9da4cda30d5ad86f3d560108b (patch)
treed5978af9dc73f68512b6d574c65a00298e65dc38 /games/gnuchess
parente73c5c70b733621efb75048406ddb16c28febcf5 (diff)
downloadfreebsd-ports-gnome-ffaa734a7497dcf9da4cda30d5ad86f3d560108b.tar.gz
freebsd-ports-gnome-ffaa734a7497dcf9da4cda30d5ad86f3d560108b.tar.zst
freebsd-ports-gnome-ffaa734a7497dcf9da4cda30d5ad86f3d560108b.zip
Convert to new options framework
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>