freebsd-ports/games/crafty/Makefile

61 lines
1.5 KiB
Makefile
Raw Normal View History

# Created by: Stefan Eggers <seggers@semyam.dinoco.de>
1999-08-25 08:06:33 +02:00
# $FreeBSD$
PORTNAME= crafty
2017-07-16 00:05:28 +02:00
PORTVERSION= 25.2
2018-02-09 17:13:07 +01:00
PORTREVISION= 1
CATEGORIES= games
2017-07-16 00:05:28 +02:00
MASTER_SITES= http://www.craftychess.com/downloads/source/:src \
http://www.craftychess.com/downloads/book/:data
DISTFILES= crafty-${PORTVERSION}.zip:src \
2018-02-09 17:13:07 +01:00
book.bin:data \
start.pgn.gz:data
DIST_SUBDIR= crafty
EXTRACT_ONLY= crafty-${PORTVERSION}.zip
2014-03-28 16:59:41 +01:00
MAINTAINER= johans@FreeBSD.org
COMMENT= Chess program for playing and analyzing games
2017-07-16 00:05:28 +02:00
WRKSRC= ${WRKDIR}
2017-07-16 00:05:28 +02:00
USES= gmake zip
2017-07-16 00:05:28 +02:00
ALL_TARGET= unix-gcc
WITH_BOOKDIR?= ${PREFIX}/lib/crafty
WITH_LOGDIR?= /tmp
WITH_RCDIR?= ~/
WITH_TBDIR?= ${PREFIX}/lib/crafty/TB
WITH_PERSDIR?= ${PREFIX}/lib/crafty/cpf
OPT= -DHASHSTATS -DTRACE -DBOOKDIR=\\\"${WITH_BOOKDIR}\\\" \
-DLOGDIR=\\\"${WITH_LOGDIR}\\\" \
-DRCDIR=\\\"${WITH_RCDIR}\\\" \
-DTBDIR=\\\"${WITH_TBDIR}\\\" \
-DPERSDIR=\\\"${WITH_PERSDIR}\\\" -DSKILL
.include <bsd.port.pre.mk>
.if ${ARCH} == "i386" || ${ARCH} == "amd64"
OPT+= -DCPUS=4
.else
OPT+= -DCPUS=1 # disables x86 assembler
2014-03-17 08:47:13 +01:00
.endif
MAKE_ENV+= opt="${OPT}" target=${OPSYS} CXFLAGS="${CXXFLAGS}"
post-extract:
cd ${DISTDIR}/${DIST_SUBDIR} && ${CP} book.bin start.pgn.gz ${WRKSRC}
${GUNZIP_CMD} ${WRKSRC}/start.pgn.gz
post-build:
(cd ${WRKSRC}; ./crafty bookpath=. <${FILESDIR}/books-building)
do-install:
2014-03-17 08:47:13 +01:00
${INSTALL_PROGRAM} ${WRKSRC}/crafty ${STAGEDIR}${PREFIX}/bin/crafty
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/crafty/cpf
${INSTALL_DATA} ${WRKSRC}/book.bin ${WRKSRC}/books.bin ${WRKSRC}/crafty.hlp \
2014-03-28 16:59:41 +01:00
${STAGEDIR}${PREFIX}/lib/crafty
2014-03-17 08:47:13 +01:00
2014-03-28 16:59:41 +01:00
.include <bsd.port.post.mk>