summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-board/pychess')
-rw-r--r--games-board/pychess/Manifest1
-rw-r--r--games-board/pychess/files/pychess-0.10.1-python.patch19
-rw-r--r--games-board/pychess/metadata.xml8
-rw-r--r--games-board/pychess/pychess-0.10.1-r2.ebuild75
4 files changed, 103 insertions, 0 deletions
diff --git a/games-board/pychess/Manifest b/games-board/pychess/Manifest
new file mode 100644
index 000000000000..209e82da2b87
--- /dev/null
+++ b/games-board/pychess/Manifest
@@ -0,0 +1 @@
+DIST pychess-0.10.1.tar.gz 1939605 SHA256 8a8ac9fc6a4605d189a9728f55183130b6a304cbf2dc5b2e923297303fe4ae8a SHA512 1000c840954b93bd3720fd3265b6cc0ac33df22373eb965d4ac03d16f7589af3b10bf2ebc28a2ff555b5e4101bffbfe96d52051e6c51a084229a3cc1691f1dd8 WHIRLPOOL 7554456eea487cefe3d8303aacdfa5748345b9682a8c557a2ed53090cc9a5beacc5b2e874db222b75fc03bcaf61dd9d7c3e2df23a13a4db820d4bd34c2f7b66e
diff --git a/games-board/pychess/files/pychess-0.10.1-python.patch b/games-board/pychess/files/pychess-0.10.1-python.patch
new file mode 100644
index 000000000000..11a6cce49c02
--- /dev/null
+++ b/games-board/pychess/files/pychess-0.10.1-python.patch
@@ -0,0 +1,19 @@
+python binary name is hardcoded, but
+we need to sed it in during installation
+
+https://bugs.gentoo.org/show_bug.cgi?id=487706
+
+--- a/lib/pychess/Players/engineNest.py
++++ b/lib/pychess/Players/engineNest.py
+@@ -70,9 +70,9 @@ backup = """
+ <engines version="%s">
+ <engine protocol="cecp" protover="2" binname="PyChess.py">
+ <meta><country>dk</country></meta>
+- <vm binname="python"><args><arg name='0' value="-u"/></args></vm></engine>
++ <vm binname="@PYTHON@"><args><arg name='0' value="-u"/></args></vm></engine>
+ <engine protocol="cecp" protover="2" binname="shatranj.py">
+- <vm binname="python"><args><arg name='0' value="-u"/></args></vm>
++ <vm binname="@PYTHON@"><args><arg name='0' value="-u"/></args></vm>
+ <args><arg name='0' value='-xboard'/></args></engine>
+ <engine protocol="cecp" protover="2" binname="gnuchess">
+ <meta><country>us</country></meta>
diff --git a/games-board/pychess/metadata.xml b/games-board/pychess/metadata.xml
new file mode 100644
index 000000000000..19399130691b
--- /dev/null
+++ b/games-board/pychess/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>
+ <upstream>
+ <remote-id type="google-code">pychess</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-board/pychess/pychess-0.10.1-r2.ebuild b/games-board/pychess/pychess-0.10.1-r2.ebuild
new file mode 100644
index 000000000000..5245d16a57ab
--- /dev/null
+++ b/games-board/pychess/pychess-0.10.1-r2.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
+
+inherit fdo-mime gnome2-utils distutils-r1 games
+
+DESCRIPTION="A chess client for Gnome"
+HOMEPAGE="http://pychess.googlepages.com/home"
+SRC_URI="http://pychess.googlecode.com/files/${P/_/}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="gstreamer"
+
+DEPEND="dev-python/librsvg-python
+ dev-python/pycairo[${PYTHON_USEDEP}]
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ dev-python/pygtk:2[${PYTHON_USEDEP}]
+ dev-python/pygtksourceview:2[${PYTHON_USEDEP}]
+ gstreamer? ( dev-python/gst-python:0.10[${PYTHON_USEDEP}] )
+ dev-python/gconf-python
+ x11-themes/gnome-icon-theme"
+RDEPEND=${DEPEND}
+
+PATCHES=( "${FILESDIR}"/${P}-python.patch )
+
+S=${WORKDIR}/${P/_/}
+
+python_install() {
+ distutils-r1_python_install --install-scripts="${GAMES_BINDIR}"
+
+ # bug 487706
+ sed -i \
+ -e "s/@PYTHON@/${EPYTHON}/" \
+ "${ED%/}/$(python_get_sitedir)"/${PN}/Players/engineNest.py || die
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ dodoc AUTHORS README
+ prepgamesdirs
+}
+
+src_prepare() {
+ distutils-r1_src_prepare
+}
+
+src_compile() {
+ distutils-r1_src_compile
+}
+
+src_install() {
+ distutils-r1_src_install
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}