stockfish: new recipe for a chess engine (#1052)

Adding new recipe for stockfish, a chess engine claimed to be strongest in the world.
This commit is contained in:
Raefaldhi Amartya Junior
2017-01-15 00:39:02 +07:00
committed by waddlesplash
parent e4f515b6ba
commit 82b2abfc6e

View File

@@ -0,0 +1,67 @@
SUMMARY="A chess engine claimed to be strongest in the world"
DESCRIPTION="Stockfish is a free UCI chess engine derived from Glaurung 2.1. It \
is not a complete chess program and requires some UCI-compatible GUI (e.g. \
XBoard with PolyGlot, eboard, Arena, Sigma Chess, Shredder, ChessPartner or \
Fritz) in order to be used comfortably. Read the documentation for your GUI of \
choice for information about how to use Stockfish with it."
HOMEPAGE="https://www.stockfishchess.org/"
COPYRIGHT="2004-2008 Tord Romstad (Glaurung author)
2008-2016 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://github.com/official-stockfish/Stockfish/archive/sf_$portVersion.tar.gz"
CHECKSUM_SHA256="e2b77d801d8837c22c2391b8cae08622c1434a2bb5947ddb08b081e1ad35c76c"
SOURCE_DIR="Stockfish-sf_$portVersion"
ARCHITECTURES="!x86_gcc2 x86 x86_64 ?arm ?ppc"
SECONDARY_ARCHITECTURES="!x86_gcc2 x86"
if [ "$targetArchitecture" != x86_gcc2 ]; then
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
else
commandSuffix=
commandBinDir=$prefix/bin
fi
case "$effectiveTargetArchitecture" in
x86) commandArch=x86-32;;
x86_64) commandArch=x86-64;;
arm) commandArch=armv7;;
ppc) commandArch=ppc-32;;
esac
PROVIDES="
stockfish$secondaryArchSuffix = $portVersion
cmd:stockfish$commandSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:make
"
BUILD()
{
make -C src build ARCH=$commandArch
}
INSTALL()
{
install -d $docDir
install -t $docDir AUTHORS Readme.md
make -C src install BINDIR=$commandBinDir
}
TEST()
{
test `src/stockfish bench 2>&1 1>/dev/null \
| sed -n -e "s/^Nodes searched *: *//p"` \
-eq 5926706
}