diff --git a/mcomix-1.2.1-PIL6.patch b/mcomix-1.2.1-PIL6.patch new file mode 100644 index 0000000..ca671e0 --- /dev/null +++ b/mcomix-1.2.1-PIL6.patch @@ -0,0 +1,32 @@ +diff -urp mcomix-1.2.1.old/mcomix/image_tools.py mcomix-1.2.1/mcomix/image_tools.py +--- mcomix-1.2.1.old/mcomix/image_tools.py 2016-02-13 03:51:58.000000000 +0900 ++++ mcomix-1.2.1/mcomix/image_tools.py 2019-09-08 22:39:14.201047442 +0900 +@@ -14,7 +14,7 @@ try: + from PIL import PILLOW_VERSION + PIL_VERSION = ('Pillow', PILLOW_VERSION) + except ImportError: +- from PIL import VERSION as PIL_VERSION ++ from PIL import __version__ as PIL_VERSION + PIL_VERSION = ('PIL', PIL_VERSION) + from cStringIO import StringIO + +mcomix-1.2.1/mcomix ?????: image_tools.py~ +diff -urp mcomix-1.2.1.old/mcomix/run.py mcomix-1.2.1/mcomix/run.py +--- mcomix-1.2.1.old/mcomix/run.py 2016-02-13 03:52:12.000000000 +0900 ++++ mcomix-1.2.1/mcomix/run.py 2019-09-08 22:41:35.700868400 +0900 +@@ -203,12 +203,12 @@ def run(): + + try: + import PIL.Image +- assert PIL.Image.VERSION >= '1.1.5' ++ assert PIL.Image.__version__ >= '1.1.5' + + except AssertionError: + log.error( _("You don't have the required version of the Python Imaging"), end=' ') + log.error( _('Library (PIL) installed.') ) +- log.error( _('Installed PIL version is: %s') % Image.VERSION ) ++ log.error( _('Installed PIL version is: %s') % PIL.Image.__version__ ) + log.error( _('Required PIL version is: 1.1.5 or higher') ) + wait_and_exit() + +mcomix-1.2.1/mcomix ?????: run.py~ diff --git a/mcomix.spec b/mcomix.spec index 5eeb520..04fa247 100644 --- a/mcomix.spec +++ b/mcomix.spec @@ -1,6 +1,6 @@ Name: mcomix Version: 1.2.1 -Release: 10%{?dist} +Release: 11%{?dist} Summary: User-friendly, customizable image viewer for comic books URL: http://mcomix.sourceforge.net/ @@ -9,6 +9,8 @@ License: GPLv2+ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2 # Fedora specific(?): patch to search default localedir for gettext files Patch1: mcomix-0.98-gettext-system-install.patch +# PIL 6 deprecates VERSION +Patch2: mcomix-1.2.1-PIL6.patch BuildArch: noarch BuildRequires: gettext @@ -37,6 +39,7 @@ is written in Python and uses GTK+ through the PyGTK bindings. %prep %setup -q %patch1 -p1 -b .gettext +%patch2 -p1 -b .pil6 # Remove unuseful and invalid entry sed -i mime/mcomix.appdata.xml \ @@ -146,6 +149,9 @@ mv $RPM_BUILD_ROOT%{python2_sitelib}/%{name}/messages/*/ \ %changelog +* Sun Sep 8 2019 Mamoru TASAKA - 1.2.1-11 +- Patch for PIL 6 + * Thu Jul 25 2019 Fedora Release Engineering - 1.2.1-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild