summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Lass2015-10-25 12:55:30 +0100
committerMichael Lass2015-10-25 13:06:42 +0100
commit86f9d30fa731af5ce603947f650dce71bf9e01e1 (patch)
tree914b300dfafdeb3293f2da15032e1579fb78614f
parentf99af289c3c90f5bf0fe6eab804572ead27e8b15 (diff)
downloadaur-macrofusion.tar.gz
Add two custom patches
* Add version speicification to certain gi modules. When they are missing this leads to warnings, or in some cases even to import errors. * Replace Image.fromstring with Image.frombytes. This is required to work with newer versions of python-pillow. fromstring was deprecated for a long time and was only an alias for fromstring anyway. Credits go to francoismelchior on AUR for digging into this.
-rw-r--r--.SRCINFO6
-rw-r--r--01-specify-gi-versions.patch15
-rw-r--r--02-use-frombytes.patch12
-rw-r--r--PKGBUILD23
4 files changed, 52 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index abaded1ccdde..cd82264a839f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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):
+
diff --git a/PKGBUILD b/PKGBUILD
index cc544b298a7f..28a446f9897f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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