1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-11 02:50:24 +00:00

Upgrade to 19.1. Add the option for using assembler-optimized

implementation on Sparcs with the warning that it segfaulted in my
tests. A Sparc guru should take a look -- the stuff, apparently works on
Solaris.

Approved by:	maintainer timeout (two weeks no response)
This commit is contained in:
Mikhail Teterin 2003-01-20 20:43:55 +00:00
parent 0f1e2b9739
commit abf09d5b65
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=73683
4 changed files with 45 additions and 70 deletions

View File

@ -6,47 +6,64 @@
#
PORTNAME= crafty
PORTVERSION= 18.14
PORTVERSION= 19.1
CATEGORIES= games
MASTER_SITES= ftp://ftp.cis.uab.edu/pub/hyatt/ \
ftp://ftp.cis.uab.edu/pub/hyatt/common/ \
ftp://ftp.cis.uab.edu/pub/hyatt/v18/ \
ftp://ftp.jpunix.com/pub/hyatt/ \
ftp://ftp.jpunix.com/pub/hyatt/common/ \
ftp://ftp.jpunix.com/pub/hyatt/v18/
DISTFILES= crafty-${PORTVERSION}.tar.gz crafty.doc.ascii crafty.doc.ps \
crafty.faq read.me start.zip
MASTER_SITES= ftp://ftp.cis.uab.edu/pub/hyatt/common/:data \
ftp://ftp.cis.uab.edu/pub/hyatt/doc/:doc \
ftp://ftp.cis.uab.edu/pub/hyatt/v${PORTVERSION:R}/:src
DISTFILES= crafty-${PORTVERSION}.tar.gz:src \
start.pgn.gz:data
MAINTAINER= seggers@semyam.dinoco.de
.if ${MACHINE_ARCH} == "i386"
ALL_TARGET= freebsd-i386
.else
ALL_TARGET= freebsd-generic
.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}"
DIST_SUBDIR= crafty
EXTRACT_ONLY= crafty-${PORTVERSION}.tar.gz
IGNOREFILES= crafty.faq read.me
MAN6= crafty.6
NO_WRKSUBDIR= yes
post-extract:
(cd ${WRKDIR}; ${GUNZIP_CMD} <${DISTDIR}/${DIST_SUBDIR}/start.zip >${WRKDIR}/start.pgn)
${GUNZIP_CMD} <${DISTDIR}/${DIST_SUBDIR}/start.pgn.gz >${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 ${WRKDIR}; ./crafty <${FILESDIR}/books-building)
(cd ${WRKSRC}; ./crafty <${FILESDIR}/books-building)
do-install:
${INSTALL_PROGRAM} ${WRKDIR}/crafty ${PREFIX}/bin/crafty
${INSTALL_PROGRAM} ${WRKSRC}/crafty ${PREFIX}/bin/crafty
${MKDIR} ${PREFIX}/lib/crafty
${INSTALL_DATA} ${WRKDIR}/books.bin ${PREFIX}/lib/crafty/books.bin
${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}
.for file in crafty.doc.ascii crafty.doc.ps crafty.faq read.me
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/${file} ${DOCSDIR}
.endfor
cd ${DISTDIR}/${DIST_SUBDIR} && ${INSTALL_DATA} ${DOCFILES} ${DOCSDIR}
.endif
.include <bsd.port.mk>

View File

@ -1,6 +1,4 @@
MD5 (crafty/crafty-18.14.tar.gz) = b678358aa91dffbf2690eb68cfbb15ef
MD5 (crafty/crafty-19.1.tar.gz) = d0696d10dbe7974beaa2161cde62d191
MD5 (crafty/start.pgn.gz) = c3c54b29351408298e3c7548f4faed93
MD5 (crafty/crafty.doc.ascii) = 5fd73027a1de1674763562e1987197ba
MD5 (crafty/crafty.doc.ps) = 6cef69aa2f9ea1ceb74b6c14edc8291f
MD5 (crafty/start.zip) = 7a9faa5c4c0af5a2defa4dca942daf3d
MD5 (crafty/crafty.faq) = IGNORE
MD5 (crafty/read.me) = IGNORE

View File

@ -1,43 +1,5 @@
--- Makefile.orig Fri Feb 8 18:48:49 2002
--- Makefile Wed Oct 23 23:42:03 2002
+++ Makefile Sat Sep 7 16:05:47 2002
@@ -21,7 +21,7 @@
# SGI {SGI Workstation running Irix (SYSV/R4) Unix}
# SUN {Sun SparcStation running Solaris (SYSV/R4) Unix}
# SUN_GCC {Sun SparcStation running Solaris but using gcc
-# FreeBSD {80X86 architecture running FreeBSD (Unix)}
+# FreeBSD {80X86/Alpha architecture running FreeBSD (Unix)}
# NetBSD {multi-architecture running NetBSD (Unix)}
# Cygwin {80X86 running Cygwin under Win32 (Unix)}
#
@@ -142,16 +142,25 @@
asm='X86.o' \
crafty-make
-freebsd:
+freebsd-i386:
$(MAKE) target=FreeBSD \
- CC=gcc CXX='$$(CC)' \
- CFLAGS='$(CFLAGS) -fomit-frame-pointer -m486 -O3 -Wall' \
+ CC='$(CC)' CXX='$(CXX)' \
+ CFLAGS='$(CFLAGS)' \
LDFLAGS='$(LDFLAGS)' \
opt='$(opt) -DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS \
-DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B -DFAST' \
asm=X86-elf.o \
crafty-make
+# This should work for non-i386 FreeBSD (e.g. Alpha)
+freebsd-generic:
+ $(MAKE) target=FreeBSD \
+ CC='$(CC)' CXX='$(CXX)' \
+ CFLAGS='$(CFLAGS)' \
+ LDFLAGS='$(LDFLAGS)' \
+ opt='$(opt) -DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS -DFAST' \
+ crafty-make
+
freebsd-pgcc:
$(MAKE) target=FreeBSD \
CC=gcc CXX='$$(CC)' \
@@ -368,7 +377,7 @@
crafty

View File

@ -1,8 +1,6 @@
bin/crafty
lib/crafty/books.bin
share/doc/crafty/crafty.doc.ascii
share/doc/crafty/crafty.doc.ps
share/doc/crafty/crafty.faq
share/doc/crafty/read.me
@dirrm share/doc/crafty
%%PORTDOCS%%share/doc/crafty/crafty.doc.ascii
%%PORTDOCS%%share/doc/crafty/crafty.doc.ps
%%PORTDOCS%%@dirrm share/doc/crafty
@dirrm lib/crafty