From 82b2abfc6eb81adfe1bef9752232ac2bac65323f Mon Sep 17 00:00:00 2001 From: Raefaldhi Amartya Junior Date: Sun, 15 Jan 2017 00:39:02 +0700 Subject: [PATCH] stockfish: new recipe for a chess engine (#1052) Adding new recipe for stockfish, a chess engine claimed to be strongest in the world. --- games-board/stockfish/stockfish-8.recipe | 67 ++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 games-board/stockfish/stockfish-8.recipe diff --git a/games-board/stockfish/stockfish-8.recipe b/games-board/stockfish/stockfish-8.recipe new file mode 100644 index 000000000..8e0559d82 --- /dev/null +++ b/games-board/stockfish/stockfish-8.recipe @@ -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 +}