summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2013-06-23 21:44:48 +0000
committerMike Gilbert <floppym@gentoo.org>2013-06-23 21:44:48 +0000
commit13c26e01af14c94e93c9a9d0a91fb19166183bea (patch)
treee0536e9eb1958a6a999cf23cd0411c38d8c667c4 /games-board
parentRespect AR (bug 470624) (diff)
downloadgentoo-2-13c26e01af14c94e93c9a9d0a91fb19166183bea.tar.gz
gentoo-2-13c26e01af14c94e93c9a9d0a91fb19166183bea.tar.bz2
gentoo-2-13c26e01af14c94e93c9a9d0a91fb19166183bea.zip
Update PIL imports and depend on virtual/python-imaging, bug 471514.
(Portage version: 2.2.0_alpha184/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)
Diffstat (limited to 'games-board')
-rw-r--r--games-board/pysolfc/ChangeLog8
-rw-r--r--games-board/pysolfc/files/pysolfc-PIL-imports.patch49
-rw-r--r--games-board/pysolfc/pysolfc-2.0-r2.ebuild84
3 files changed, 140 insertions, 1 deletions
diff --git a/games-board/pysolfc/ChangeLog b/games-board/pysolfc/ChangeLog
index 9dd5b18a4171..bcd999dffadd 100644
--- a/games-board/pysolfc/ChangeLog
+++ b/games-board/pysolfc/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for games-board/pysolfc
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-board/pysolfc/ChangeLog,v 1.10 2013/06/10 18:25:18 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-board/pysolfc/ChangeLog,v 1.11 2013/06/23 21:44:48 floppym Exp $
+
+*pysolfc-2.0-r2 (23 Jun 2013)
+
+ 23 Jun 2013; Mike Gilbert <floppym@gentoo.org>
+ +files/pysolfc-PIL-imports.patch, +pysolfc-2.0-r2.ebuild:
+ Update PIL imports and depend on virtual/python-imaging, bug 471514.
10 Jun 2013; Michael Sterrett <mr_bones_@gentoo.org> -pysolfc-2.0.ebuild:
old
diff --git a/games-board/pysolfc/files/pysolfc-PIL-imports.patch b/games-board/pysolfc/files/pysolfc-PIL-imports.patch
new file mode 100644
index 000000000000..ed174d8aefe7
--- /dev/null
+++ b/games-board/pysolfc/files/pysolfc-PIL-imports.patch
@@ -0,0 +1,49 @@
+https://sourceforge.net/p/pysolfc/patches/10/
+https://bugs.gentoo.org/show_bug.cgi?id=471514
+
+Index: pysollib/mfxutil.py
+===================================================================
+diff --git a/PySolFC/trunk/pysollib/mfxutil.py b/PySolFC/trunk/pysollib/mfxutil.py
+--- a/PySolFC/trunk/pysollib/mfxutil.py (revision 279)
++++ b/PySolFC/trunk/pysollib/mfxutil.py (working copy)
+@@ -41,18 +41,18 @@
+ Image = ImageTk = ImageOps = None
+ if TOOLKIT == 'tk':
+ try: # PIL
+- import Image
+- import ImageTk
+- import ImageOps
++ from PIL import Image
++ from PIL import ImageTk
++ from PIL import ImageOps
+ except ImportError:
+ Image = None
+ else:
+ # for py2exe
+- import GifImagePlugin
+- import PngImagePlugin
+- import JpegImagePlugin
+- import BmpImagePlugin
+- import PpmImagePlugin
++ from PIL import GifImagePlugin
++ from PIL import PngImagePlugin
++ from PIL import JpegImagePlugin
++ from PIL import BmpImagePlugin
++ from PIL import PpmImagePlugin
+ Image._initialized = 2
+ USE_PIL = False
+ if TOOLKIT == 'tk' and Image and Image.VERSION >= '1.1.7':
+Index: scripts/cardset_viewer.py
+===================================================================
+diff --git a/PySolFC/trunk/scripts/cardset_viewer.py b/PySolFC/trunk/scripts/cardset_viewer.py
+--- a/PySolFC/trunk/scripts/cardset_viewer.py (revision 279)
++++ b/PySolFC/trunk/scripts/cardset_viewer.py (working copy)
+@@ -7,7 +7,7 @@
+ from math import sqrt, sin, cos, pi
+ from Tkinter import *
+ try:
+- import Image, ImageTk
++ from PIL import Image, ImageTk
+ except ImportError:
+ Image = None
+
diff --git a/games-board/pysolfc/pysolfc-2.0-r2.ebuild b/games-board/pysolfc/pysolfc-2.0-r2.ebuild
new file mode 100644
index 000000000000..fa9b23923ce5
--- /dev/null
+++ b/games-board/pysolfc/pysolfc-2.0-r2.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-board/pysolfc/pysolfc-2.0-r2.ebuild,v 1.1 2013/06/23 21:44:48 floppym Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_6 python2_7 )
+PYTHON_REQ_USE="tk"
+
+inherit eutils python-r1 distutils-r1 games
+
+MY_PN=PySolFC
+SOL_URI="mirror://sourceforge/${PN}"
+
+DESCRIPTION="An exciting collection of more than 1000 solitaire card games"
+HOMEPAGE="http://pysolfc.sourceforge.net/"
+SRC_URI="${SOL_URI}/${MY_PN}-${PV}.tar.bz2
+ extra-cardsets? ( ${SOL_URI}/${MY_PN}-Cardsets-${PV}.tar.bz2 )"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="extra-cardsets minimal +sound"
+
+S=${WORKDIR}/${MY_PN}-${PV}
+
+RDEPEND="sound? ( dev-python/pygame[${PYTHON_USEDEP}] )
+ !minimal? ( virtual/python-imaging[tk,${PYTHON_USEDEP}]
+ dev-tcltk/tktable )"
+
+python_prepare_all() {
+ local PATCHES=(
+ "${FILESDIR}/${PN}-PIL-imports.patch" #471514
+ )
+ distutils-r1_python_prepare_all
+
+ sed -i \
+ -e "/pysol.desktop/d" \
+ -e "s:share/icons:share/pixmaps:" \
+ -e "s:data_dir =.*:data_dir = \'share/games/${PN}\':" \
+ setup.py || die
+
+ # avoid installing pysol.py into /usr/bin
+ sed -i \
+ -e '/scripts/d' \
+ setup.py || die
+}
+
+src_prepare() {
+ distutils-r1_src_prepare
+}
+
+src_compile() {
+ distutils-r1_src_compile
+}
+
+python_install_all() {
+ exeinto "${GAMES_DATADIR}"/${PN}
+ doexe pysol.py
+ python_replicate_script "${ED}${GAMES_DATADIR}"/${PN}/pysol.py
+
+ games_make_wrapper ${PN} ./pysol.py "${GAMES_DATADIR}"/${PN}
+
+ make_desktop_entry ${PN} "PySol Fan Club Edition" pysol01
+
+ if use extra-cardsets; then
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r "${WORKDIR}"/${MY_PN}-Cardsets-${PV}/*
+ fi
+
+ doman docs/*.6
+ dohtml docs/*.html
+
+ dodoc AUTHORS README
+
+ docinto docs
+ dodoc docs/README*
+
+ prepgamesdirs
+}
+
+src_install() {
+ distutils-r1_src_install
+}