void-packages/srcpkgs/mcomix/patches/run.py.patch
Đoàn Trần Công Danh 765e304c4b srcpkgs/m*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

16 lines
645 B
Diff

Grabbed from https://github.com/mat813/freebsd-ports/tree/d9a5e385afb3dab755ebe5138b09cf7351f992d9/graphics/py-mcomix/files
--- a/mcomix/run.py 2016-02-12 18:52:12 UTC
+++ b/mcomix/run.py
@@ -203,7 +203,11 @@ def run():
try:
import PIL.Image
- assert PIL.Image.VERSION >= '1.1.5'
+ try:
+ assert PIL.Image.VERSION >= '1.1.5'
+ except AttributeError:
+ # Field VERSION deprecated in Pillow 5.2.0 and dropped in 6.0.0
+ assert PIL.__version__ >= '5.2.0'
except AssertionError:
log.error( _("You don't have the required version of the Python Imaging"), end=' ')