summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2013-10-22 18:16:51 +0000
committerJulian Ospald <hasufell@gentoo.org>2013-10-22 18:16:51 +0000
commit4b778545137bb86c902e865771ca7d5baf56c5ad (patch)
tree1fd8ab8b6d36fed1c2af32bcb39d0bd2e785a601 /games-board
parentVersion bump. Ebuild by Peter Wilmott in the ruby overlay. (diff)
downloadgentoo-2-4b778545137bb86c902e865771ca7d5baf56c5ad.tar.gz
gentoo-2-4b778545137bb86c902e865771ca7d5baf56c5ad.tar.bz2
gentoo-2-4b778545137bb86c902e865771ca7d5baf56c5ad.zip
fix engine detection when python3 is eselected wrt #487706
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)
Diffstat (limited to 'games-board')
-rw-r--r--games-board/pychess/ChangeLog8
-rw-r--r--games-board/pychess/files/pychess-0.10.1-python.patch19
-rw-r--r--games-board/pychess/pychess-0.10.1-r2.ebuild76
3 files changed, 102 insertions, 1 deletions
diff --git a/games-board/pychess/ChangeLog b/games-board/pychess/ChangeLog
index 1e2a5c4883b8..241767e4bf98 100644
--- a/games-board/pychess/ChangeLog
+++ b/games-board/pychess/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for games-board/pychess
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-board/pychess/ChangeLog,v 1.25 2013/05/22 02:34:20 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-board/pychess/ChangeLog,v 1.26 2013/10/22 18:16:51 hasufell Exp $
+
+*pychess-0.10.1-r2 (22 Oct 2013)
+
+ 22 Oct 2013; Julian Ospald <hasufell@gentoo.org> +pychess-0.10.1-r2.ebuild,
+ +files/pychess-0.10.1-python.patch:
+ fix engine detection when python3 is eselected wrt #487706
22 May 2013; Patrick Lauer <patrick@gentoo.org> -pychess-0.10.1.ebuild:
Remove old version with broken dependencies
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/pychess-0.10.1-r2.ebuild b/games-board/pychess/pychess-0.10.1-r2.ebuild
new file mode 100644
index 000000000000..f5365c72cfae
--- /dev/null
+++ b/games-board/pychess/pychess-0.10.1-r2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-board/pychess/pychess-0.10.1-r2.ebuild,v 1.1 2013/10/22 18:16:51 hasufell Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_6 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
+ dev-python/pygobject:2
+ dev-python/pygtk
+ dev-python/pygtksourceview
+ gstreamer? ( dev-python/gst-python )
+ 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
+}