2013-09-13 22:43:00 +02:00
|
|
|
# Created by: Stefan Eggers <seggers@semyam.dinoco.de>
|
1999-08-25 08:06:33 +02:00
|
|
|
# $FreeBSD$
|
1998-06-01 06:56:10 +02:00
|
|
|
|
2000-04-14 02:45:49 +02:00
|
|
|
PORTNAME= crafty
|
2010-11-11 04:34:16 +01:00
|
|
|
PORTVERSION= 23.4
|
1998-06-01 06:56:10 +02:00
|
|
|
CATEGORIES= games
|
2010-04-02 19:09:09 +02:00
|
|
|
MASTER_SITES= http://www.craftychess.com/:src \
|
2013-09-13 22:43:00 +02:00
|
|
|
http://www.cis.uab.edu/hyatt/crafty/pgn/:data \
|
|
|
|
http://www.cis.uab.edu/hyatt/crafty/documentation/:doc \
|
|
|
|
http://www.cis.uab.edu/hyatt/crafty/source/:src \
|
|
|
|
http://www.cis.uab.edu/hyatt/crafty/book/:utils \
|
|
|
|
http://www.cis.uab.edu/hyatt/crafty/book/:books
|
2005-12-21 12:03:33 +01:00
|
|
|
DISTFILES= crafty-${PORTVERSION}.zip:src \
|
|
|
|
start.pgn:data
|
|
|
|
DIST_SUBDIR= crafty
|
|
|
|
EXTRACT_ONLY= crafty-${PORTVERSION}.zip
|
1998-06-01 06:56:10 +02:00
|
|
|
|
2014-03-11 21:35:53 +01:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2012-07-29 13:17:02 +02:00
|
|
|
COMMENT= Chess program for playing and analyzing games
|
1998-06-01 06:56:10 +02:00
|
|
|
|
2014-03-10 15:49:26 +01:00
|
|
|
USES= gmake zip
|
2005-12-21 12:03:33 +01:00
|
|
|
|
2009-03-22 16:31:09 +01:00
|
|
|
BOOKS= books.bin
|
2009-03-12 13:22:40 +01:00
|
|
|
DISTFILES+= ${BOOKS:S/$/:books/}
|
|
|
|
|
2003-01-20 21:43:55 +01:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
DOCFILES= crafty.doc.ascii crafty.doc.ps
|
|
|
|
DISTFILES+= ${DOCFILES:S/$/:doc/}
|
2009-03-12 13:22:40 +01:00
|
|
|
UTILS= bitmaps.tgz sound.zip
|
2008-04-25 17:24:32 +02:00
|
|
|
DISTFILES+= ${UTILS:S/$/:utils/}
|
2003-01-20 21:43:55 +01:00
|
|
|
.endif
|
|
|
|
|
2007-09-10 03:11:54 +02:00
|
|
|
ALL_TARGET= freebsd
|
2003-01-20 21:43:55 +01:00
|
|
|
|
2009-03-04 13:18:05 +01:00
|
|
|
WITH_BOOKDIR?= ${PREFIX}/lib/crafty
|
|
|
|
WITH_LOGDIR?= /tmp
|
|
|
|
WITH_RCDIR?= ~/
|
|
|
|
WITH_TBDIR?= ${PREFIX}/lib/crafty/TB
|
|
|
|
WITH_PERSDIR?= ${PREFIX}/lib/crafty/cpf
|
|
|
|
|
2008-04-25 17:24:32 +02:00
|
|
|
OPT= -DCPUS=4 -DHASHSTATS -DTRACE -DBOOKDIR=\\\"${WITH_BOOKDIR}\\\" \
|
2007-09-10 03:11:54 +02:00
|
|
|
-DLOGDIR=\\\"${WITH_LOGDIR}\\\" \
|
2008-04-25 17:24:32 +02:00
|
|
|
-DRCDIR=\\\"${WITH_RCDIR}\\\" \
|
2007-09-11 14:00:42 +02:00
|
|
|
-DTBDIR=\\\"${WITH_TBDIR}\\\" \
|
2008-05-02 22:08:06 +02:00
|
|
|
-DPERSDIR=\\\"${WITH_PERSDIR}\\\" -DSKILL
|
2007-09-23 05:44:46 +02:00
|
|
|
|
2013-09-20 19:36:33 +02:00
|
|
|
NO_STAGE= yes
|
2007-09-10 03:11:54 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if ${ARCH} == "i386"
|
|
|
|
OPT+= -DINLINE32
|
2010-04-05 17:17:17 +02:00
|
|
|
.elif ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
|
|
|
|
BROKEN= Does not compile on ia64, powerpc, or sparc64
|
2008-12-10 08:35:19 +01:00
|
|
|
.endif
|
|
|
|
|
2009-03-22 16:31:09 +01:00
|
|
|
.if defined(WITH_BOOK)
|
|
|
|
BOOKS+= book.bin
|
|
|
|
DISTFILES+= ${BOOKS:S/$/:books/}
|
|
|
|
PKGNAMESUFFIX= -open-default
|
|
|
|
CONFLICTS+= crafty-open-enormous-* crafty-open-large-* crafty-open-medium-*
|
|
|
|
PLIST_SUB+= BOOK=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= BOOK="@comment "
|
|
|
|
.endif
|
|
|
|
|
2007-09-10 03:11:54 +02:00
|
|
|
MAKE_ENV+= opt="${OPT}" target=${OPSYS} CXFLAGS="${CXXFLAGS}"
|
1998-06-01 06:56:10 +02:00
|
|
|
|
|
|
|
post-extract:
|
2005-12-21 12:03:33 +01:00
|
|
|
${CP} ${DISTDIR}/${DIST_SUBDIR}/start.pgn ${WRKSRC}/start.pgn
|
2009-03-22 16:31:09 +01:00
|
|
|
.if defined(WITH_BOOK)
|
2009-03-04 13:18:05 +01:00
|
|
|
${CP} ${DISTDIR}/${DIST_SUBDIR}/book.bin ${WRKSRC}/book.bin
|
2009-03-22 16:31:09 +01:00
|
|
|
.endif
|
2009-03-04 13:18:05 +01:00
|
|
|
${CP} ${DISTDIR}/${DIST_SUBDIR}/books.bin ${WRKSRC}/books.bin
|
1998-06-01 06:56:10 +02:00
|
|
|
|
|
|
|
post-build:
|
2007-09-10 03:11:54 +02:00
|
|
|
(cd ${WRKSRC}; ./crafty bookpath=. <${FILESDIR}/books-building)
|
1998-06-01 06:56:10 +02:00
|
|
|
|
|
|
|
do-install:
|
2003-01-20 21:43:55 +01:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/crafty ${PREFIX}/bin/crafty
|
2007-09-11 14:00:42 +02:00
|
|
|
${CHOWN} root:nogroup ${PREFIX}/bin/crafty
|
|
|
|
${CHMOD} 2555 ${PREFIX}/bin/crafty
|
|
|
|
${MKDIR} ${PREFIX}/lib/crafty/cpf
|
|
|
|
${CHOWN} -R root:nogroup ${PREFIX}/lib/crafty
|
|
|
|
${CHMOD} 775 ${PREFIX}/lib/crafty ${PREFIX}/lib/crafty/cpf
|
2009-03-22 16:31:09 +01:00
|
|
|
.if defined(WITH_BOOK)
|
2009-03-12 13:22:40 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/book.bin ${PREFIX}/lib/crafty/book.bin
|
2009-03-22 16:31:09 +01:00
|
|
|
.endif
|
2003-01-20 21:43:55 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/books.bin ${PREFIX}/lib/crafty/books.bin
|
2007-09-11 14:00:42 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/crafty.hlp ${PREFIX}/lib/crafty/crafty.hlp
|
|
|
|
${CHOWN} root:nogroup ${PREFIX}/lib/crafty/book*
|
2007-09-10 03:11:54 +02:00
|
|
|
${CHMOD} 664 ${PREFIX}/lib/crafty/book*
|
1998-06-01 06:56:10 +02:00
|
|
|
.if !defined(NOPORTDOCS)
|
2001-08-27 14:06:07 +02:00
|
|
|
${MKDIR} ${DOCSDIR}
|
2003-01-20 21:43:55 +01:00
|
|
|
cd ${DISTDIR}/${DIST_SUBDIR} && ${INSTALL_DATA} ${DOCFILES} ${DOCSDIR}
|
2008-04-25 17:24:32 +02:00
|
|
|
cd ${DISTDIR}/${DIST_SUBDIR} && ${INSTALL_DATA} ${UTILS} ${DOCSDIR}
|
1998-06-01 06:56:10 +02:00
|
|
|
.endif
|
|
|
|
|
2007-09-10 03:11:54 +02:00
|
|
|
post-install:
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|