diff options
author | edwin <edwin@FreeBSD.org> | 2007-09-10 09:11:54 +0800 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2007-09-10 09:11:54 +0800 |
commit | cc60215323507ae5501fb231c3f0ed9c961309b8 (patch) | |
tree | 89a69005f39eeeba157818889480060c712ea03b /games/crafty | |
parent | aa843d5ef10976ee3008d97d097330d3a711e90f (diff) | |
download | freebsd-ports-gnome-cc60215323507ae5501fb231c3f0ed9c961309b8.tar.gz freebsd-ports-gnome-cc60215323507ae5501fb231c3f0ed9c961309b8.tar.zst freebsd-ports-gnome-cc60215323507ae5501fb231c3f0ed9c961309b8.zip |
update games/crafty (Also solves pr ports/116163)
Crafty is an open source chess engine. The former version is
very old, not to mention broken when compiling enormous opening books
(see pr ports/116163) This updates to the newest version, and solves
the problem as well. Sorry about the prior pr with this topic - the
makefile had a couple typos.
This seems to be an abandoned port. If the maintainer is no
longer interested, I will volunteer to take over this port.
The maintainers email address bounced, so Jonathan is now the happy
maintainer of this port.
PR: ports/116241
Submitted by: shoemaker@bluebottle.com (Jonathan Shoemaker)
Diffstat (limited to 'games/crafty')
-rw-r--r-- | games/crafty/Makefile | 76 | ||||
-rw-r--r-- | games/crafty/distinfo | 6 | ||||
-rw-r--r-- | games/crafty/files/crafty.6 | 79 | ||||
-rw-r--r-- | games/crafty/files/patch-Makefile | 17 | ||||
-rw-r--r-- | games/crafty/files/patch-aa | 11 | ||||
-rw-r--r-- | games/crafty/pkg-plist | 10 |
6 files changed, 77 insertions, 122 deletions
diff --git a/games/crafty/Makefile b/games/crafty/Makefile index 547136d84eb4..4359eef52d37 100644 --- a/games/crafty/Makefile +++ b/games/crafty/Makefile @@ -6,66 +6,90 @@ # PORTNAME= crafty -PORTVERSION= 19.1 +PORTVERSION= 20.14 CATEGORIES= games -MASTER_SITES= ftp://ftp.cis.uab.edu/pub/hyatt/book/:data \ +MASTER_SITES= ftp://ftp.cis.uab.edu/pub/hyatt/pgn/:data \ ftp://ftp.cis.uab.edu/pub/hyatt/documentation/:doc \ - ftp://ftp.cis.uab.edu/pub/hyatt/src/:src + ftp://ftp.cis.uab.edu/pub/hyatt/source/:src DISTFILES= crafty-${PORTVERSION}.zip:src \ start.pgn:data DIST_SUBDIR= crafty EXTRACT_ONLY= crafty-${PORTVERSION}.zip -MAINTAINER= seggers@semyam.dinoco.de +MAINTAINER= shoemaker@bluebottle.com COMMENT= A chess programm for playing and analyzing games USE_ZIP= yes +USE_GMAKE= yes .if !defined(NOPORTDOCS) DOCFILES= crafty.doc.ascii crafty.doc.ps DISTFILES+= ${DOCFILES:S/$/:doc/} .endif -ALL_TARGET= crafty +ALL_TARGET= freebsd -OPT= -DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS -.if ${MACHINE_ARCH} == "i386" -MAKE_ENV+= asm=X86-elf.o -OPT+= -DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B -DFAST +.if !defined(WITH_BOOKDIR) +WITH_BOOKDIR= ${PREFIX}/lib/crafty +.endif +.if !defined(WITH_LOGDIR) +WITH_LOGDIR= /tmp +.endif +.if !defined(WITH_RCDIR) +WITH_RCDIR= ~/ +.endif +.if !defined(WITH_TBDIR) +WITH_TBDIR= ${PREFIX}/lib/crafty/TB +.endif + +OPT= -DHASHSTATS -DTRACE -DBOOKDIR=\\\"${WITH_BOOKDIR}\\\" \ + -DLOGDIR=\\\"${WITH_LOGDIR}\\\" \ + -DRCDIR=\\\"${WITH_RCDIR}\\\" \ + -DTBDIR=\\\"${WITH_TBDIR}\\\" + +.include <bsd.port.pre.mk> + +.if ${ARCH} == "i386" +OPT+= -DINLINE32 # 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 +.elif ${ARCH} == "sparc64" +OPT+= -DINLINE32 +CFLAGS+= '$(CFLAGS) -D_REENTRANT -O3 -Wall \ + -fomit-frame-pointer -funroll-all-loops \ + -finline-functions -ffast-math' \ .else OPT+= -DFAST .endif -MAKE_ENV+= opt="${OPT}" target=${OPSYS} CXFLAGS="${CXXFLAGS}" -MAN6= crafty.6 +MAKE_ENV+= opt="${OPT}" target=${OPSYS} CXFLAGS="${CXXFLAGS}" 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) + (cd ${WRKSRC}; ./crafty bookpath=. <${FILESDIR}/books-building) do-install: ${INSTALL_PROGRAM} ${WRKSRC}/crafty ${PREFIX}/bin/crafty + ${CHOWN} nobody:nogroup ${PREFIX}/bin/crafty + ${CHMOD} 6555 ${PREFIX}/bin/crafty ${MKDIR} ${PREFIX}/lib/crafty + ${CHOWN} nobody:nogroup ${PREFIX}/lib/crafty ${INSTALL_DATA} ${WRKSRC}/books.bin ${PREFIX}/lib/crafty/books.bin - ${INSTALL_MAN} ${FILESDIR}/crafty.6 ${MANPREFIX}/man/man6/crafty.6 + ${INSTALL_DATA} ${WRKSRC}/book.lrn ${PREFIX}/lib/crafty/book.lrn + ${INSTALL_DATA} ${WRKSRC}/position.bin ${PREFIX}/lib/crafty/position.bin + ${INSTALL_DATA} ${WRKSRC}/position.lrn ${PREFIX}/lib/crafty/position.lrn + ${TOUCH} ${PREFIX}/lib/crafty/book.bin + ${CHOWN} nobody:nogroup ${PREFIX}/lib/crafty/book* + ${CHOWN} nobody:nogroup ${PREFIX}/lib/crafty/position* + ${CHMOD} 664 ${PREFIX}/lib/crafty/book* + ${CHMOD} 664 ${PREFIX}/lib/crafty/position* .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} cd ${DISTDIR}/${DIST_SUBDIR} && ${INSTALL_DATA} ${DOCFILES} ${DOCSDIR} .endif -.include <bsd.port.mk> +post-install: + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.post.mk> diff --git a/games/crafty/distinfo b/games/crafty/distinfo index d4c023516c26..65285570d986 100644 --- a/games/crafty/distinfo +++ b/games/crafty/distinfo @@ -1,6 +1,6 @@ -MD5 (crafty/crafty-19.1.zip) = 1f1c3f2438b6947b82958ed91073af18 -SHA256 (crafty/crafty-19.1.zip) = d7107e9c1666730215a98b41214f6ce22d8368d4d8ac52739fe85b721e5cd6da -SIZE (crafty/crafty-19.1.zip) = 395699 +MD5 (crafty/crafty-20.14.zip) = ab681d84fc2f01ce0789cf4f47c945f8 +SHA256 (crafty/crafty-20.14.zip) = 9e4b90bde9c156ad537d6228c678d39dcaf790a0603125ab37ed48fb4662a01a +SIZE (crafty/crafty-20.14.zip) = 422894 MD5 (crafty/start.pgn) = 98176af8ec13945a4ec60ad9b5959412 SHA256 (crafty/start.pgn) = 750397385a67307bd3e565f7a86d69745476db5fed4735650af971cc94318021 SIZE (crafty/start.pgn) = 1349 diff --git a/games/crafty/files/crafty.6 b/games/crafty/files/crafty.6 deleted file mode 100644 index 0c52227a950d..000000000000 --- a/games/crafty/files/crafty.6 +++ /dev/null @@ -1,79 +0,0 @@ -.\" Copyright (c) 1998 Stefan Eggers -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" $FreeBSD$ -.\" -.\" Note: The date here should be updated whenever a non-trivial -.\" change is made to the manual page. -.Dd May 31, 1998 -.Dt CRAFTY 6 -.Os -.Sh NAME -.Nm crafty -.Nd chess playing and analysis program -.Sh SYNOPSIS -.Nm crafty -.Sh DESCRIPTION -.Nm -is a chess playing and analysis program. It can optionally use -opening books (available separately) and end game tables. As a -graphical interface one can use xboard which is available as part of -the FreeBSD ports collection. -.Pp -To make full use of -.Nm -one has to copy books.bin and an opening book (all usually located -under /usr/local/lib/crafty with standard installation on -your system) into ones private directories to allow it to learn during -use. Note that the installation of the opening books is optional. -.Sh ENVIRONMENT -.Nm -doesn't use any environment variables. -.Sh FILES -.Bl -tag -width ./position.bin -compact -.It Pa ./book.bin -The opening book. -.It Pa ./book.lrn -Human readable version of things learned in openings. -.It Pa ./books.bin -A file with opening information which influences which opening -.Nm -will choose. -.It Pa ./position.bin -Positional information learned. -.It Pa ./position.lrn -Human readable version of things learned in positions. -.El -.Sh HISTORY -The -.Nm -manual page first appeared in -.Fx 2.2 . -.Pp -.Sh AUTHOR -This -manual page was written by -.An Stefan Eggers Aq seggers@semyam.dinoco.de . -.Sh BUGS -None known to the man page author. diff --git a/games/crafty/files/patch-Makefile b/games/crafty/files/patch-Makefile new file mode 100644 index 000000000000..8b86ca64d8bd --- /dev/null +++ b/games/crafty/files/patch-Makefile @@ -0,0 +1,17 @@ +--- Makefile.orig Tue Jun 20 07:57:17 2006 ++++ Makefile Sun Sep 9 10:48:25 2007 +@@ -146,10 +146,10 @@ + freebsd: + $(MAKE) target=FreeBSD \ + CC=gcc CXX='$(CC)' \ +- CFLAGS='$(CFLAGS) -fomit-frame-pointer -m486 -O3 -Wall' \ +- CXFLAGS=$(CFLAGS) \ +- LDFLAGS=$(LDFLAGS) \ +- opt='$(opt) -DINLINE32' \ ++ CFLAGS+='-fomit-frame-pointer -mtune=i486 -O3 -Wall' \ ++ CXFLAGS+='$(CXXFLAGS)' \ ++ LDFLAGS='$(LDFLAGS) -lstdc++' \ ++ opt='$(opt)' \ + crafty-make + + freebsd-pgcc: diff --git a/games/crafty/files/patch-aa b/games/crafty/files/patch-aa deleted file mode 100644 index 54c9d48cccf7..000000000000 --- a/games/crafty/files/patch-aa +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile Wed Oct 23 23:42:03 2002 -+++ Makefile Sat Sep 7 16:05:47 2002 -@@ -368,7 +377,7 @@ - crafty - - crafty: $(objects) -- $(CC) $(LDFLAGS) -o crafty $(objects) -lm $(LIBS) -+ $(CXX) $(LDFLAGS) -o crafty $(objects) -lm $(LIBS) - @rm -f X86-elf.S - @rm -f X86-aout.S - diff --git a/games/crafty/pkg-plist b/games/crafty/pkg-plist index cd8ae84bebea..e031e701e164 100644 --- a/games/crafty/pkg-plist +++ b/games/crafty/pkg-plist @@ -1,6 +1,10 @@ bin/crafty +lib/crafty/book.bin +lib/crafty/book.lrn lib/crafty/books.bin -%%PORTDOCS%%share/doc/crafty/crafty.doc.ascii -%%PORTDOCS%%share/doc/crafty/crafty.doc.ps -%%PORTDOCS%%@dirrm share/doc/crafty +lib/crafty/position.bin +lib/crafty/position.lrn +share/doc/crafty/crafty.doc.ascii +share/doc/crafty/crafty.doc.ps +@dirrm share/doc/crafty @dirrm lib/crafty |