aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharlie Li <git@vishwin.info>2019-04-22 07:56:53 +0800
committerCharlie Li <git@vishwin.info>2020-05-08 13:47:19 +0800
commit3b8fd28d6f7bd3a036ad3a281bc6449bd06a07bb (patch)
tree2cde74bc325a8a6138db7f62e4b8beca29c344d2
parent5b9953bc748658943a05b0971fb03d10760efaa4 (diff)
downloadfreebsd-ports-gnome-3b8fd28d6f7bd3a036ad3a281bc6449bd06a07bb.tar.gz
freebsd-ports-gnome-3b8fd28d6f7bd3a036ad3a281bc6449bd06a07bb.tar.zst
freebsd-ports-gnome-3b8fd28d6f7bd3a036ad3a281bc6449bd06a07bb.zip
x11/cinnamon: pull in commit c843f3664064742e2672e0fea528571a882d84ad (by Eli Schwartz):
PIL: remove unnnecessary version check and code fork (linuxmint/cinnamon#8496) The Image.VERSION variable was deprecated some time ago and is now gone entirely. But its only use was to determine whether we were using at least the latest version of PIL, or any version of its fork, Pillow. And PIL was last developed in 2009 and does not support python3 at all, so we are guaranteed to be using Pillow. Moreover, the check does not really matter, as Pillow is guaranteed to load any image it opens, without the user doing so manually. Fixes linuxmint/cinnamon#8495
-rw-r--r--x11/cinnamon/Makefile1
-rw-r--r--x11/cinnamon/files/patch-files_usr_share_cinnamon_cinnamon-settings_bin_imtools.py43
2 files changed, 44 insertions, 0 deletions
diff --git a/x11/cinnamon/Makefile b/x11/cinnamon/Makefile
index a3ebd075697f..3f4b3391b24c 100644
--- a/x11/cinnamon/Makefile
+++ b/x11/cinnamon/Makefile
@@ -3,6 +3,7 @@
PORTNAME= cinnamon
PORTVERSION= 4.0.10
+PORTREVISION= 1
CATEGORIES= x11 gnome
DIST_SUBDIR= gnome
diff --git a/x11/cinnamon/files/patch-files_usr_share_cinnamon_cinnamon-settings_bin_imtools.py b/x11/cinnamon/files/patch-files_usr_share_cinnamon_cinnamon-settings_bin_imtools.py
new file mode 100644
index 000000000000..e06c86b8f3d5
--- /dev/null
+++ b/x11/cinnamon/files/patch-files_usr_share_cinnamon_cinnamon-settings_bin_imtools.py
@@ -0,0 +1,43 @@
+--- files/usr/share/cinnamon/cinnamon-settings/bin/imtools.py.orig 2019-03-21 16:46:14 UTC
++++ files/usr/share/cinnamon/cinnamon-settings/bin/imtools.py
+@@ -620,31 +620,6 @@ def has_transparency(image):
+ has_alpha(image)
+
+
+-if Image.VERSION == '1.1.7':
+-
+- def split(image):
+- """Work around for bug in Pil 1.1.7
+-
+- :param image: input image
+- :type image: PIL image object
+- :returns: the different color bands of the image (eg R, G, B)
+- :rtype: tuple
+- """
+- image.load()
+- return image.split()
+-else:
+-
+- def split(image):
+- """Work around for bug in Pil 1.1.7
+-
+- :param image: input image
+- :type image: PIL image object
+- :returns: the different color bands of the image (eg R, G, B)
+- :rtype: tuple
+- """
+- return image.split()
+-
+-
+ def get_alpha(image):
+ """Gets the image alpha band. Can handles P mode images with transpareny.
+ Returns a band with all values set to 255 if no alpha band exists.
+@@ -655,7 +630,7 @@ def get_alpha(image):
+ :rtype: single band image object
+ """
+ if has_alpha(image):
+- return split(image)[-1]
++ return image.split()[-1]
+ if image.mode == 'P' and 'transparency' in image.info:
+ return image.convert('RGBA').split()[-1]
+ # No alpha layer, create one.