aboutsummaryrefslogtreecommitdiff
path: root/print/hplip
diff options
context:
space:
mode:
authorKai Knoblich <kai@FreeBSD.org>2019-06-02 21:00:06 +0000
committerKai Knoblich <kai@FreeBSD.org>2019-06-02 21:00:06 +0000
commit0c4024a80bbf9b679280ecce6f76a2bf54461dfc (patch)
tree95bbc8261a4bf28f1686a6c1536f72a08fbced35 /print/hplip
parent481590f8aa1430c5c40ec2c5d6f305dbcc92ad5d (diff)
downloadports-0c4024a80bbf9b679280ecce6f76a2bf54461dfc.tar.gz
ports-0c4024a80bbf9b679280ecce6f76a2bf54461dfc.zip
print/hplip: Fix runtime with graphics/py-pillow 6.0.0
Fix a possible runtime error in installers/dcheck.py when graphics/py-pillow is updated to 6.0.0, which removed the previously deprecated constant Image.VERSION . PR: 238072, 237426 (related) Approved by: woodsb02 (maintainer)
Notes
Notes: svn path=/head/; revision=503333
Diffstat (limited to 'print/hplip')
-rw-r--r--print/hplip/Makefile2
-rw-r--r--print/hplip/files/patch-installer_dcheck.py16
2 files changed, 15 insertions, 3 deletions
diff --git a/print/hplip/Makefile b/print/hplip/Makefile
index 2449a48e17de..24e669481279 100644
--- a/print/hplip/Makefile
+++ b/print/hplip/Makefile
@@ -3,7 +3,7 @@
PORTNAME= hplip
PORTVERSION= 3.17.11
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= print
MASTER_SITES= SF
diff --git a/print/hplip/files/patch-installer_dcheck.py b/print/hplip/files/patch-installer_dcheck.py
index 10a435c16bfd..abea82e34aa9 100644
--- a/print/hplip/files/patch-installer_dcheck.py
+++ b/print/hplip/files/patch-installer_dcheck.py
@@ -1,4 +1,4 @@
---- installer/dcheck.py.orig 2016-08-26 10:05:26 UTC
+--- installer/dcheck.py.orig 2019-05-23 09:47:03 UTC
+++ installer/dcheck.py
@@ -48,7 +48,11 @@ mod_output = ''
def update_ld_output():
@@ -13,7 +13,19 @@
if status != 0:
log.debug("ldconfig failed.")
-@@ -378,6 +382,8 @@ def get_libpthread_version():
+@@ -370,7 +374,10 @@ def get_pil_version():
+ except ImportError:
+ return '-'
+ else:
+- return Image.VERSION
++ if hasattr(Image, "__version__"): # required for Pillow >= 6.0.0
++ return Image.__version__
++ else:
++ return Image.VERSION
+
+ def get_libpthread_version():
+ try:
+@@ -378,6 +385,8 @@ def get_libpthread_version():
except ImportError:
return '-'
else: