diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | 01-specify-gi-versions.patch | 15 | ||||
-rw-r--r-- | 02-use-frombytes.patch | 12 | ||||
-rw-r--r-- | PKGBUILD | 23 |
4 files changed, 52 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = macrofusion pkgdesc = GUI to combine photos to get deeper DOF or HDR pkgver = 0.7.4 - pkgrel = 4 + pkgrel = 5 url = http://sourceforge.net/projects/macrofusion/ install = macrofusion.install arch = any @@ -14,7 +14,11 @@ pkgbase = macrofusion depends = hugin depends = libgexiv2 source = http://downloads.sourceforge.net/project/macrofusion/macrofusion-0.7.4/macrofusion_0.7.4.orig.tar.gz + source = 01-specify-gi-versions.patch + source = 02-use-frombytes.patch sha256sums = 2d061f0a2e858c86ae700351cf9785bc7058938e02ce6fcf40b192fbb0b60b11 + sha256sums = 7eb5ef4c3c3a86a5457d0b5aaef31318ab4101f720b7c79f4cdba770634db934 + sha256sums = 73b11f7dee7f7002f6cf6bbd4c94e39ee255dbbbdaf29850d522347e28f79e6f pkgname = macrofusion diff --git a/01-specify-gi-versions.patch b/01-specify-gi-versions.patch new file mode 100644 index 000000000000..52be64d3ef44 --- /dev/null +++ b/01-specify-gi-versions.patch @@ -0,0 +1,15 @@ +diff -u -r a/macrofusion.py b/macrofusion.py +--- a/macrofusion.py 2015-10-25 12:50:10.678720912 +0100 ++++ b/macrofusion.py 2015-10-25 12:50:56.232888991 +0100 +@@ -17,6 +17,11 @@ + import operator + import cairo + import random ++ ++ import gi ++ gi.require_version('Gdk', '3.0') ++ gi.require_version('Gtk', '3.0') ++ gi.require_version('GExiv2', '0.10') + from gi.repository import Gdk, Gtk, GObject, GdkPixbuf, GExiv2 + except: + print('An error occured. Python or one of its sub modules is absent...\nIt would be wise to check your python installation.') diff --git a/02-use-frombytes.patch b/02-use-frombytes.patch new file mode 100644 index 000000000000..4bd9b5c13836 --- /dev/null +++ b/02-use-frombytes.patch @@ -0,0 +1,12 @@ +diff -u -r a/macrofusion.py b/macrofusion.py +--- a/macrofusion.py 2015-10-25 12:58:58.621978780 +0100 ++++ b/macrofusion.py 2015-10-25 12:59:55.896423282 +0100 +@@ -623,7 +623,7 @@ + + def pixbuf2Image(self, pb): + width,height = pb.get_width(),pb.get_height() +- return Image.fromstring("RGB",(width,height),pb.get_pixels() ) ++ return Image.frombytes("RGB",(width,height),pb.get_pixels() ) + + def put_files_to_the_list(self, fichiers): + @@ -7,15 +7,32 @@ pkgname=macrofusion pkgver=0.7.4 -pkgrel=4 +pkgrel=5 pkgdesc="GUI to combine photos to get deeper DOF or HDR" url="http://sourceforge.net/projects/macrofusion/" depends=('python-cairo' 'python-gobject' 'python-pillow' 'perl-image-exiftool' 'enblend-enfuse' 'hugin' 'libgexiv2') arch=('any') -source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}-${pkgver}/${pkgname}_${pkgver}.orig.tar.gz") +source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}-${pkgver}/${pkgname}_${pkgver}.orig.tar.gz" + "01-specify-gi-versions.patch" + "02-use-frombytes.patch") license=('GPL') install=$pkgname.install -sha256sums=('2d061f0a2e858c86ae700351cf9785bc7058938e02ce6fcf40b192fbb0b60b11') +sha256sums=('2d061f0a2e858c86ae700351cf9785bc7058938e02ce6fcf40b192fbb0b60b11' + '7eb5ef4c3c3a86a5457d0b5aaef31318ab4101f720b7c79f4cdba770634db934' + '73b11f7dee7f7002f6cf6bbd4c94e39ee255dbbbdaf29850d522347e28f79e6f') + +prepare() { + cd ${srcdir}/${pkgname}-${pkgver} + + # Add version specification to certain gi modules. When they are missing + # this leads to warnings, or in some cases even to import errors. + patch -p1 < ${srcdir}/01-specify-gi-versions.patch + + # Replace Image.fromstring with Image.frombytes to work with newer versions + # of python-pillow. fromstring was deprecated for a long time and was only + # an alias for fromstring anyway. + patch -p1 < ${srcdir}/02-use-frombytes.patch +} package() { # Installation is a bit tricky. See README and parts of the python script to see |