diff options
author | jose1711 | 2017-03-15 22:13:02 +0100 |
---|---|---|
committer | jose1711 | 2017-03-15 22:13:02 +0100 |
commit | 2986d764dfb45a434ec2bc40088c56b22aeb0e3b (patch) | |
tree | 44e414218a728aeafe2d632c7bd715fd9421ff8f | |
parent | 79069a8c6b64b30e08a0b7c2ea226d2d591aa5a2 (diff) | |
download | aur-2986d764dfb45a434ec2bc40088c56b22aeb0e3b.tar.gz |
Fix imports from PIL module
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 15 | ||||
-rw-r--r-- | pil_imports.patch | 40 |
3 files changed, 56 insertions, 5 deletions
@@ -1,7 +1,9 @@ +# Generated by mksrcinfo v8 +# Wed Mar 15 21:12:45 UTC 2017 pkgbase = cropgui pkgdesc = a simple tool for lossless jpeg cropping pkgver = 0.1.1 - pkgrel = 5 + pkgrel = 6 url = http://emergent.unpythonic.net/01235516977 arch = i686 arch = x86_64 @@ -10,7 +12,9 @@ pkgbase = cropgui depends = tk depends = python2-imaging source = http://media.unpythonic.net/emergent-files/01248401946/cropgui_0.1.1.tar.gz + source = pil_imports.patch md5sums = b2919654044ba8b0552c308c4909b95f + md5sums = cd53bf7d255b4b94d3cc9956b8b9ff4e pkgname = cropgui @@ -3,13 +3,20 @@ pkgname=cropgui arch=('i686' 'x86_64') pkgver=0.1.1 -pkgrel=5 +pkgrel=6 pkgdesc="a simple tool for lossless jpeg cropping" license=('GPL') url="http://emergent.unpythonic.net/01235516977" depends=('libjpeg' 'tk' 'python2-imaging') -source=("http://media.unpythonic.net/emergent-files/01248401946/cropgui_${pkgver}.tar.gz") -md5sums=('b2919654044ba8b0552c308c4909b95f') +source=("http://media.unpythonic.net/emergent-files/01248401946/cropgui_${pkgver}.tar.gz" + pil_imports.patch) +md5sums=('b2919654044ba8b0552c308c4909b95f' + 'cd53bf7d255b4b94d3cc9956b8b9ff4e') + +prepare() { +cd $srcdir/$pkgname +patch -Np1 -i $srcdir/pil_imports.patch +} build() { sed -i '1s/python/python2/' $srcdir/cropgui/*.py @@ -17,7 +24,7 @@ sed -i 's%/usr/bin/cropgui%/usr/share/cropgui/cropgui.py%' $srcdir/cropgui/cropg } package() { -cd $srcdir/cropgui +cd $srcdir/$pkgname mkdir -p $pkgdir/usr/share/cropgui install -D -m755 $srcdir/cropgui/*.py $pkgdir/usr/share/cropgui/ install -D -m644 $srcdir/cropgui/cropgui.glade* $pkgdir/usr/share/cropgui/ diff --git a/pil_imports.patch b/pil_imports.patch new file mode 100644 index 000000000000..b4d08cfcee52 --- /dev/null +++ b/pil_imports.patch @@ -0,0 +1,40 @@ +diff -ura cropgui.orig/cropgui_common.py cropgui.new/cropgui_common.py +--- cropgui.orig/cropgui_common.py 2017-03-15 22:03:11.874917260 +0100 ++++ cropgui.new/cropgui_common.py 2017-03-15 22:04:59.704185802 +0100 +@@ -13,9 +13,9 @@ + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-import Image +-import ImageFilter +-import ImageDraw ++from PIL import Image ++from PIL import ImageFilter ++from PIL import ImageDraw + import subprocess + import threading + import Queue +diff -ura cropgui.orig/cropgui.py cropgui.new/cropgui.py +--- cropgui.orig/cropgui.py 2017-03-15 22:03:11.874917260 +0100 ++++ cropgui.new/cropgui.py 2017-03-15 22:05:33.993953223 +0100 +@@ -19,7 +19,7 @@ + from cropgui_common import _ + + import Tkinter +-import ImageTk ++from PIL import ImageTk + import tkFileDialog + import sys + import os +diff -ura cropgui.orig/filechooser.py cropgui.new/filechooser.py +--- cropgui.orig/filechooser.py 2017-03-15 22:03:11.874917260 +0100 ++++ cropgui.new/filechooser.py 2017-03-15 22:06:24.250279033 +0100 +@@ -8,7 +8,7 @@ + import gobject + + import os +-import Image ++from PIL import Image + + HIGH_WATER, LOW_WATER = 25, 5 + image_cache = {} |