pysolfc: add patch for Pillow compat

This commit is contained in:
Alessio Sergi 2016-03-02 21:15:15 +01:00
parent 1da2215c21
commit d9d66edeaf
2 changed files with 43 additions and 3 deletions

View File

@ -0,0 +1,40 @@
--- pysollib/mfxutil.py.orig
+++ pysollib/mfxutil.py
@@ -41,18 +41,18 @@ from settings import PACKAGE, TOOLKIT
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
--- scripts/cardset_viewer.py.orig
+++ scripts/cardset_viewer.py
@@ -7,7 +7,7 @@ from glob import glob
from math import sqrt, sin, cos, pi
from Tkinter import *
try:
- import Image, ImageTk
+ from PIL import Image, ImageTk
except ImportError:
Image = None

View File

@ -1,13 +1,13 @@
# Template file for 'pysolfc'
pkgname=pysolfc
version=2.0
revision=1
revision=2
noarch=yes
wrksrc="PySolFC-${version}"
build_style=python-module
pycompile_module=pysollib
noarch=yes
hostmakedepends="python"
depends="python python-tkinter"
depends="python-tkinter"
short_desc="A Python solitaire game collection"
maintainer="Michael Gehring <mg@ebfe.org>"
license="GPL-3"