summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorTod Jackson2019-10-22 18:44:32 -0600
committerTod Jackson2019-10-22 18:44:32 -0600
commit2479d4ab3ecebfcec68b73bab31fd05d9c3816aa (patch)
treebd1f702bb4d9da4754ad1f6b582dea64aa84bd4d /PKGBUILD
parentffaa195e8a8106259178bcdb8d75fd852802f585 (diff)
downloadaur-2479d4ab3ecebfcec68b73bab31fd05d9c3816aa.tar.gz
Bump version, fix build with recent Pillow
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD20
1 files changed, 17 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c8fa338be03b..8f21fc4dd686 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,8 @@
# Maintainer: con-f-use <con-f-use@gmx.net>
+# Maintainer: Tod Jackson <tod.jackson@gmail.com>
pkgname=comix
pkgver=4.0.4
-pkgrel=1
+pkgrel=3
epoch=
pkgdesc="A user-friendly, customizable comic/image viewer"
arch=('x86_64')
@@ -9,6 +10,8 @@ url="https://sourceforge.net/projects/comix"
license=('GPLv2')
depends=('unrar' 'python2-pillow' 'pygtk')
makedepends=('tar' 'pygtk' 'python2-pillow')
+optdepends=('gconf')
+conflicts=('mcomix')
options=('emptydirs')
source=("https://downloads.sourceforge.net/project/comix/comix/comix-4.0.4/comix-4.0.4.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fcomix%2Ffiles%2F")
md5sums=('029227a77b122f7080ee0280d41bee78')
@@ -16,11 +19,22 @@ md5sums=('029227a77b122f7080ee0280d41bee78')
prepare() {
cd "$srcdir/$pkgname-$pkgver/src"
sed -i 's/import Image/from PIL import Image/g' thumbbar.py histogram.py image.py library.py thumbnail.py thumbremover.py comix.py ../mime/comicthumb ../install.py
+ # Hack out the check for PIL version
sed -i 's~#!/usr/bin/env python~#!/usr/bin/env python2~g' comix.py ../mime/comicthumb ../install.py
+ # https://github.com/python-pillow/Pillow/blob/master/docs/deprecations.rst#version-constant
+ sed -i 's/assert Image.V/#assert Image.V/' ../src/comix.py
+ sed -i 's/assert Image.V/#assert Image.V/' ../install.py
+ # Fix ordered thumbnails with Pillow
+ sed -i 's/image.tostring/image.tobytes/' ../src/comix.py
}
package() {
cd "$srcdir/$pkgname-$pkgver"
- mkdir -p "$pkgdir/usr/local/"
- python2 install.py install --dir "$pkgdir/usr/local/"
+ mkdir -p "$pkgdir/usr/"
+ python2 install.py install --dir "$pkgdir/usr/"
+ # File conflicts
+ rm -rf "$pkgdir/usr/share/mime/"
+ mkdir -p "$pkgdir/usr/share/mime/"
+ find ./ -name comix.xml
+ cp "mime/comix.xml" "$pkgdir/usr/share/mime/"
}