Date: Wed, 29 May 2019 11:42:02 +0000 (UTC) From: Kubilay Kocak <koobs@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r502951 - in head/x11/cinnamon: . files Message-ID: <201905291142.x4TBg2OL048816@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: koobs Date: Wed May 29 11:42:02 2019 New Revision: 502951 URL: https://svnweb.freebsd.org/changeset/ports/502951 Log: x11/cinnamon: Remove unnecessary version check Bug 237426 updates Pillow to 6.0.0, which removed the Image.VERSION variable, after a period of deprecation. Cinnamon currently uses this variable, so backport upstream commit c843f3664064742e2672e0fea528571a882d84ad [1] to compensate, so we don't need to wait for the Gnome teams Cinnamon 4 update, which has already pulled it in. Thanks to Charli Li for pointing this commit out. While I'm here, fix all stage-qa errors and ports/framework compliance issues: - Add missing LIB_DEPENDS - Add missing USE_{GNOME,X11} components - Add USES=gnome, gl - Fix gstreamer dependencies (GSTREAMER1, not GSTREAMER) - Add LICENCE{_FILE} - Fix more/all shebangs, remove custom REINPLACE_CMD section - Remove GH_ACCOUNT (no longer necessary) [1] https://github.com/linuxmint/cinnamon/pull/8496 [2] https://github.com/linuxmint/cinnamon/issues/8495 PR: 238070, 237426 Reported by: kai Tested by: Michal Kilijanek (via Twitter) Approved by: kwm (gnome, maintainer) MFH: 2019Q2 Added: head/x11/cinnamon/files/patch-files_usr_lib_cinnamon-settings_bin_imtools.py (contents, props changed) Modified: head/x11/cinnamon/Makefile head/x11/cinnamon/distinfo Modified: head/x11/cinnamon/Makefile ============================================================================== --- head/x11/cinnamon/Makefile Wed May 29 11:29:51 2019 (r502950) +++ head/x11/cinnamon/Makefile Wed May 29 11:42:02 2019 (r502951) @@ -3,13 +3,16 @@ PORTNAME= cinnamon PORTVERSION= 2.4.6 -PORTREVISION= 11 +PORTREVISION= 12 CATEGORIES= x11 gnome DIST_SUBDIR= gnome3 MAINTAINER= gnome@FreeBSD.org COMMENT= Fork of GNOME Shell with layout similar to GNOME 2 +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING + BUILD_DEPENDS= ca_root_nss>=0:security/ca_root_nss \ gnome-autogen.sh:devel/gnome-common LIB_DEPENDS= libstartup-notification-1.so:x11/startup-notification \ @@ -21,10 +24,17 @@ LIB_DEPENDS= libstartup-notification-1.so:x11/startup- libfolks.so:net-im/folks \ libpulse.so:audio/pulseaudio \ libcroco-0.6.so:textproc/libcroco \ + libsoup-2.4.so:devel/libsoup \ + libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ + libcogl.so:graphics/cogl \ + libpolkit-agent-1.so:sysutils/polkit \ libclutter-glx-1.0.so:graphics/clutter \ + libmozjs-24.so:lang/spidermonkey24 \ libcjs.so:lang/cjs \ + libjson-glib-1.0.so:devel/json-glib \ libcinnamon-menu-3.so:x11/cinnamon-menus \ + libcinnamon-desktop.so:x11/cinnamon-desktop \ libaccountsservice.so:sysutils/accountsservice RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dbus>=0:devel/py-dbus@${PY_FLAVOR} \ ca_root_nss>=0:security/ca_root_nss \ @@ -36,31 +46,33 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dbus>=0:devel/py-d ${PYTHON_PKGNAMEPREFIX}pillow>=0:graphics/py-pillow@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}lxml>=0:devel/py-lxml@${PY_FLAVOR} -USES= autoreconf compiler:c11 gettext gmake libtool \ - pathfix pkgconfig python:2.7 shebangfix -USE_GNOME= evolutiondataserver3 gconf2 gnomedesktop3 \ - gnomeprefix gtk30 intlhack introspection:build - +USES= autoreconf compiler:c11 gettext gmake gnome gl libtool \ + localbase:ldflags pathfix pkgconfig python:2.7 shebangfix USE_GITHUB= yes +USE_GL= gl egl +USE_GNOME= cairo evolutiondataserver3 gconf2 gnomedesktop3 \ + gnomeprefix gtk30 intlhack introspection +USE_GSTREAMER1= yes +USE_LDCONFIG= yes +USE_XORG= x11 xfixes sm xrandr xext xdamage xcomposite xi + GH_ACCOUNT= linuxmint -GH_PROJECT= Cinnamon # this happens before moving the file to ${PREFIX} (which then will be copied to ${STAGEDIR}${PREFIX}) -SHEBANG_FILES= files/usr/bin/cinnamon2d -USE_XORG= x11 xfixes sm -USE_GSTREAMER= theora vp8 ogg +SHEBANG_FILES= files/* *.py + INSTALLS_ICONS= yes -USE_LDCONFIG= yes + GNU_CONFIGURE= yes CONFIGURE_ARGS+=--enable-compile-warnings=no \ --with-ca-certificates=${LOCALBASE}/share/certs/ca-root-nss.crt -CPPFLAGS+= -I${LOCALASE}/include -LDFLAGS+= -L${LOCALBASE}/lib + INSTALL_TARGET= install-strip GLIB_SCHEMAS= org.cinnamon.gschema.xml OPTIONS_DEFINE= NLS + NLS_RUN_DEPENDS= cinnamon-translations>=0:misc/cinnamon-translations post-patch: @@ -138,13 +150,6 @@ post-patch: ${WRKSRC}/files${PREFIX}/share/xsessions/cinnamon2d.desktop \ ${WRKSRC}/files${PREFIX}/share/xsessions/cinnamon.desktop \ ${WRKSRC}/files${PREFIX}/share/applications/cinnamon2d.desktop - -# Some python files use #! /usr/bin/python (note the space between the bang and the python interpreter - @${FIND} ${WRKSRC} -name \* | ${XARGS} ${EGREP} -l "#!.*\/usr\/bin\/python" | \ - ${XARGS} ${REINPLACE_CMD} -e "s|#!.*python.*|#!/usr/bin/env python|g" - - @${FIND} ${WRKSRC} -name '*.orig' -delete - @${FIND} ${WRKSRC} -name '*.bak' -delete post-install: @${PYTHON_CMD} ${WRKSRC}/files/generate_desktop_files Modified: head/x11/cinnamon/distinfo ============================================================================== --- head/x11/cinnamon/distinfo Wed May 29 11:29:51 2019 (r502950) +++ head/x11/cinnamon/distinfo Wed May 29 11:42:02 2019 (r502951) @@ -1,3 +1,3 @@ -TIMESTAMP = 1483466871 -SHA256 (gnome3/linuxmint-Cinnamon-2.4.6_GH0.tar.gz) = f0f8b0c56e8c6ee53daa06bea28c04967960eefed601db2f0ae745ca2abe78e1 -SIZE (gnome3/linuxmint-Cinnamon-2.4.6_GH0.tar.gz) = 2813177 +TIMESTAMP = 1559109478 +SHA256 (gnome3/linuxmint-cinnamon-2.4.6_GH0.tar.gz) = f265afa5546f16ba27a6715a5eca90336c0c7339f049eeeaf81238af03a5b338 +SIZE (gnome3/linuxmint-cinnamon-2.4.6_GH0.tar.gz) = 2813103 Added: head/x11/cinnamon/files/patch-files_usr_lib_cinnamon-settings_bin_imtools.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11/cinnamon/files/patch-files_usr_lib_cinnamon-settings_bin_imtools.py Wed May 29 11:42:02 2019 (r502951) @@ -0,0 +1,60 @@ +From c843f3664064742e2672e0fea528571a882d84ad Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <eschwartz93@gmail.com> +Date: Fri, 5 Apr 2019 11:28:45 -0400 +Subject: [PATCH] PIL: remove unnnecessary version check and code fork (#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 #8495 + +--- files/usr/lib/cinnamon-settings/bin/imtools.py.orig 2019-05-23 10:40:29 UTC ++++ files/usr/lib/cinnamon-settings/bin/imtools.py +@@ -618,32 +618,6 @@ def has_transparency(image): + return (image.mode == 'P' and 'transparency' in image.info) or\ + 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. +@@ -654,7 +628,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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905291142.x4TBg2OL048816>