# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
license Restrictive Noncommercial
maintainers {khindenburg @kurthindenburg} openmaintainer
description Crafty is a chess program, that can be interfaced with xboard.
Crafty is the derivative of Cray Blitz, a computer chess program. It is \
a very strong one, and its current peak ICC ratings are 3286 (bullet), \
3388 (blitz) and 2792 (standard). It can be used with xboard just like \
homepage http://www.craftychess.com
master_sites ${homepage}/downloads/source:source \
${homepage}/downloads/book:book
set dist_srczip ${name}-${version}.zip
distfiles ${dist_srczip}:source \
# fix mistake on checksums update on book.bin
dist_subdir ${name}/${version}_1
checksums ${dist_srczip} \
rmd160 2ccafc543f64fac628f6262a57fa4f80c7527b19 \
sha256 337e00bab79c33739fbaa71cd26c65f986886ee0d8ce181f2cb62f2efd317710 \
rmd160 d316103399d48bc44237163a5e4cba76251c2342 \
sha256 f95c827d65a12a34879e50554de687ee91f3ca42580ab65abfa77638f27c3983
extract.only ${dist_srczip}
patchfiles patch-Makefile.diff \
reinplace "s|@@PREFIX@@|${prefix}|" ${worksrcpath}/chess.h
reinplace "s|@@PREFIX@@|${prefix}|" ${worksrcpath}/option.c
reinplace "s|@@CC@@|${configure.cc}|g" ${worksrcpath}/Makefile
reinplace "s|@@CXX@@|${configure.cxx}|g" ${worksrcpath}/Makefile
reinplace "s|@@CFLAGS@@|${configure.cflags} [get_canonical_archflags cc]|g" ${worksrcpath}/Makefile
reinplace "s|@@CXFLAGS@@|${configure.cxxflags} [get_canonical_archflags cxx]|g" ${worksrcpath}/Makefile
reinplace "s|@@LDFLAGS@@|${configure.ldflags} [get_canonical_archflags ld]|g" ${worksrcpath}/Makefile
# asm errors building +universal