summaryrefslogtreecommitdiff
path: root/games-board/stockfish
diff options
context:
space:
mode:
Diffstat (limited to 'games-board/stockfish')
-rw-r--r--games-board/stockfish/Manifest2
-rw-r--r--games-board/stockfish/stockfish-5.ebuild65
2 files changed, 67 insertions, 0 deletions
diff --git a/games-board/stockfish/Manifest b/games-board/stockfish/Manifest
new file mode 100644
index 0000000..ca7bf32
--- /dev/null
+++ b/games-board/stockfish/Manifest
@@ -0,0 +1,2 @@
+DIST stockfish-5-linux.zip 594229 SHA256 2af16941e6227dd5232fa257bad6fd99180d31631fc0e26ba5cba3c74f0bab42 SHA512 142e5b179612404417ee686e1971ae4d49c31a4db646a0190016984defd306899af909867891d505919c89322554addba9f14d4c5077490d926054862221d15e WHIRLPOOL 271de9fcb41dc3fd25c92cd1a5380fbb37d3a446c1f2115111285401bee352e6951506abecbc8021756f045bdc05c52d0d27fdf1a8ff9d3b48a34566248efcc0
+EBUILD stockfish-5.ebuild 1465 SHA256 de2fbc8e9d98684815310a1a1b10a76cbc44ee275920bdc9fe68a6c4e5bb41fd SHA512 3260d290a5f937d591172fed0b1acede7d9c9a680bf40a43db1008365bac29844ee7e6f66bf07b260e6066f48c32fa61169fbc7db6b843820a101fa02f725b06 WHIRLPOOL f6b1684393da1a40deb1516c6065c07c7a2038de1d92e369b783c1afb425beeae5341aedc7d1c8ac56edeb08c9bc24ee0a547a6ecbbb401ef6aaf3ea3a2f982b
diff --git a/games-board/stockfish/stockfish-5.ebuild b/games-board/stockfish/stockfish-5.ebuild
new file mode 100644
index 0000000..95dd07b
--- /dev/null
+++ b/games-board/stockfish/stockfish-5.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+inherit games toolchain-funcs
+
+DESCRIPTION="UCI chess engine http://www.stockfishchess.com/"
+HOMEPAGE="http://www.stockfishchess.com/"
+SRC_URI="http://stockfish.s3.amazonaws.com/stockfish-${PV}-linux.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug optimization"
+
+case $(tc-arch) in
+ "x86" ) IUSE+=" sse" ;;
+ "amd64" ) IUSE+=" popcnt" ;;
+esac
+
+DEPEND="optimization? ( sys-devel/gcc[lto] )"
+
+S="${WORKDIR}/${PN}-${PV}-linux/src"
+
+pkg_setup() {
+ games_pkg_setup
+}
+
+src_compile() {
+ local makeopts="ARCH="
+
+ case $(tc-arch) in
+ "x86" )
+ makeopts+="x86-32"
+ ! use sse && makeopts+="-old"
+ ;;
+ "amd64" )
+ makeopts+="x86-64"
+ use popcnt && makeopts+="-modern"
+ ;;
+ esac
+
+ use debug && makeopts+=" debug=yes"
+ ! use optimization && makeopts+=" optimize=no"
+
+ emake build ${makeopts} || die "emake failed"
+}
+
+src_install() {
+ dogamesbin stockfish || die "dogamesbin failed"
+ dodoc ../Copying.txt ../Readme.md || die "dodoc failed"
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog
+ elog "Note: The opening book hasn't been installed. If you want it, just"
+ elog " download it from ${HOMEPAGE}."
+ elog " In most cases you take now your xboard compatible application,"
+ elog " (xboard, eboard, knights) and just play chess against computer"
+ elog " opponent. Have fun."
+ elog
+}