summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-board/fruit')
-rw-r--r--games-board/fruit/Manifest1
-rw-r--r--games-board/fruit/files/fruit-2.1-gentoo.patch11
-rw-r--r--games-board/fruit/fruit-2.1.ebuild47
-rw-r--r--games-board/fruit/metadata.xml8
4 files changed, 67 insertions, 0 deletions
diff --git a/games-board/fruit/Manifest b/games-board/fruit/Manifest
new file mode 100644
index 000000000000..9d69de5d9ab2
--- /dev/null
+++ b/games-board/fruit/Manifest
@@ -0,0 +1 @@
+DIST fruit_21_linux.zip 716762 SHA256 ad13f6099dc2acebf0112c36cc7d38fd4009316ad60ecc294c5e828380dcd2c0 SHA512 80d80141ca3c2a4521b241a750bd237e0971b531bc4e8e89ae3bdcdbb1436b99b35e64f505b9a61413726744646b6b4ce126bcdb53b90adc727f88a50adee889 WHIRLPOOL f167e696c4f9f69af3ca68612b32e3ccae3358f658ef26c2866bd86b83a0930f6e140f9e2aed3320f5fd2bc9788ff3ef48aff5ab51facc3164316d9fc88f901d
diff --git a/games-board/fruit/files/fruit-2.1-gentoo.patch b/games-board/fruit/files/fruit-2.1-gentoo.patch
new file mode 100644
index 000000000000..bae207f89627
--- /dev/null
+++ b/games-board/fruit/files/fruit-2.1-gentoo.patch
@@ -0,0 +1,11 @@
+--- option.cpp.old 2007-02-07 23:32:25.000000000 +0100
++++ option.cpp 2007-02-07 23:32:51.000000000 +0100
+@@ -29,7 +29,7 @@
+ { "Ponder", true, "false", "check", "", NULL },
+
+ { "OwnBook", true, "true", "check", "", NULL },
+- { "BookFile", true, "book_small.bin", "string", "", NULL },
++ { "BookFile", true, "@GENTOO_DATADIR@/book_small.bin", "string", "", NULL },
+
+ { "NullMove Pruning", true, "Fail High", "combo", "var Always var Fail High var Never", NULL },
+ { "NullMove Reduction", true, "3", "spin", "min 1 max 3", NULL },
diff --git a/games-board/fruit/fruit-2.1.ebuild b/games-board/fruit/fruit-2.1.ebuild
new file mode 100644
index 000000000000..2ba5995b3dea
--- /dev/null
+++ b/games-board/fruit/fruit-2.1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils versionator games
+
+MY_PV=$(replace_all_version_separators '')
+MY_P=${PN}_${MY_PV}_linux
+DESCRIPTION="UCI-only chess engine"
+HOMEPAGE="http://arctrix.com/nas/fruit/"
+SRC_URI="http://arctrix.com/nas/${PN}/${MY_P}.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="app-arch/unzip"
+
+S=${WORKDIR}/${MY_P}/src
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}"-gentoo.patch
+ sed -i \
+ -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}/${PN}:" \
+ option.cpp || die
+ sed -i \
+ -e '/^CXX/d' \
+ -e '/^LDFLAGS/d' \
+ Makefile || die
+}
+
+src_install() {
+ dogamesbin ${PN}
+ insinto "${GAMES_DATADIR}/${PN}"
+ doins ../book_small.bin
+ dodoc ../readme.txt ../technical_10.txt
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "To use this engine you need to install a UCI chess GUI"
+ elog "e.g. games-board/glchess"
+}
diff --git a/games-board/fruit/metadata.xml b/games-board/fruit/metadata.xml
new file mode 100644
index 000000000000..b02037f1efca
--- /dev/null
+++ b/games-board/fruit/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<longdescription lang="en">
+Fruit is a UCI-only chess engine.
+</longdescription>
+</pkgmetadata>