From 4b778545137bb86c902e865771ca7d5baf56c5ad Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Tue, 22 Oct 2013 18:16:51 +0000 Subject: fix engine detection when python3 is eselected wrt #487706 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key E73C35B3) --- games-board/pychess/ChangeLog | 8 ++- .../pychess/files/pychess-0.10.1-python.patch | 19 ++++++ games-board/pychess/pychess-0.10.1-r2.ebuild | 76 ++++++++++++++++++++++ 3 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 games-board/pychess/files/pychess-0.10.1-python.patch create mode 100644 games-board/pychess/pychess-0.10.1-r2.ebuild (limited to 'games-board') 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 +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 -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 = """ + + + dk +- ++ + +- ++ + + + us 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 +} -- cgit v1.2.3-65-gdbad