mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-25 04:43:33 +00:00
434ec50129
- Adapt to use .zip distfiles - Add SHA256 hashes PR: ports/90071 Submitted by: Jean Milanez Melo <jmelo@freebsdbrasil.com.br> Approved by: maintainer timeout (14 days)
72 lines
1.9 KiB
Makefile
72 lines
1.9 KiB
Makefile
# New ports collection makefile for: crafty
|
|
# Date created: 31 May 1998
|
|
# Whom: Stefan Eggers <seggers@semyam.dinoco.de>
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PORTNAME= crafty
|
|
PORTVERSION= 19.1
|
|
CATEGORIES= games
|
|
MASTER_SITES= ftp://ftp.cis.uab.edu/pub/hyatt/book/:data \
|
|
ftp://ftp.cis.uab.edu/pub/hyatt/documentation/:doc \
|
|
ftp://ftp.cis.uab.edu/pub/hyatt/src/:src
|
|
DISTFILES= crafty-${PORTVERSION}.zip:src \
|
|
start.pgn:data
|
|
DIST_SUBDIR= crafty
|
|
EXTRACT_ONLY= crafty-${PORTVERSION}.zip
|
|
|
|
MAINTAINER= seggers@semyam.dinoco.de
|
|
COMMENT= A chess programm for playing and analyzing games
|
|
|
|
USE_ZIP= yes
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
DOCFILES= crafty.doc.ascii crafty.doc.ps
|
|
DISTFILES+= ${DOCFILES:S/$/:doc/}
|
|
.endif
|
|
|
|
ALL_TARGET= crafty
|
|
|
|
OPT= -DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS
|
|
.if ${MACHINE_ARCH} == "i386"
|
|
MAKE_ENV+= asm=X86-elf.o
|
|
OPT+= -DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B -DFAST
|
|
# XXX Someone with ASM knowledge would have to fix the Sparc.S
|
|
.elif ${MACHINE_ARCH} == "sparc64" && defined(CRAFTY_SPARC_ASM)
|
|
MAKE_ENV+= asm=Sparc.o
|
|
OPT+= -DUSE_ASSEMBLY_A
|
|
.else
|
|
OPT+= -DFAST
|
|
.endif
|
|
MAKE_ENV+= opt="${OPT}" target=${OPSYS} CXFLAGS="${CXXFLAGS}"
|
|
|
|
MAN6= crafty.6
|
|
|
|
post-extract:
|
|
${CP} ${DISTDIR}/${DIST_SUBDIR}/start.pgn ${WRKSRC}/start.pgn
|
|
${MV} ${WRKSRC}/Sparc.s ${WRKSRC}/Sparc.S
|
|
.ifdef CRAFTY_SPARC_ASM
|
|
########################################################
|
|
#
|
|
# Sparc.S is known to segfault! Use at your own risk or
|
|
# turn off the CRAFTY_SPARC_ASM defined
|
|
#
|
|
########################################################
|
|
.endif
|
|
|
|
post-build:
|
|
(cd ${WRKSRC}; ./crafty <${FILESDIR}/books-building)
|
|
|
|
do-install:
|
|
${INSTALL_PROGRAM} ${WRKSRC}/crafty ${PREFIX}/bin/crafty
|
|
${MKDIR} ${PREFIX}/lib/crafty
|
|
${INSTALL_DATA} ${WRKSRC}/books.bin ${PREFIX}/lib/crafty/books.bin
|
|
${INSTALL_MAN} ${FILESDIR}/crafty.6 ${MANPREFIX}/man/man6/crafty.6
|
|
.if !defined(NOPORTDOCS)
|
|
${MKDIR} ${DOCSDIR}
|
|
cd ${DISTDIR}/${DIST_SUBDIR} && ${INSTALL_DATA} ${DOCFILES} ${DOCSDIR}
|
|
.endif
|
|
|
|
.include <bsd.port.mk>
|