Date: Wed, 12 Oct 2011 12:58:14 +0000 From: Nali Toja <nalitoja@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/161517: [patch] graphics/py-imaging: track lcms dep Message-ID: <86aa96pdus.fsf@gmail.com> Resent-Message-ID: <201110121310.p9CDABTN085301@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 161517 >Category: ports >Synopsis: [patch] graphics/py-imaging: track lcms dep >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Oct 12 13:10:10 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Nali Toja >Release: FreeBSD 10.0-CURRENT amd64 >Organization: >Environment: >Description: LittleCMS support was added in 1.1.7. A quick diff of the build glue should have revealed it. lcms is also mentioned in CHANGES file. $ diff -uw Imaging-1.1.[67]/setup.py [...] @@ -247,6 +264,10 @@ class pil_build_ext(build_ext): if dir: add_directory(self.compiler.include_dirs, dir, 0) + if find_include_file(self, "lcms.h"): + if find_library_file(self, "lcms"): + feature.lcms = "lcms" + if _tkinter and find_include_file(self, "tk.h"): # the library names may vary somewhat (e.g. tcl84 or tcl8.4) version = TCL_VERSION[0] + TCL_VERSION[2] @@ -302,6 +323,14 @@ class pil_build_ext(build_ext): "_imagingtiff", ["_imagingtiff.c"], libraries=["tiff"] )) + if os.path.isfile("_imagingcms.c") and feature.lcms: + extra = [] + if sys.platform == "win32": + extra.extend(["user32", "gdi32"]) + exts.append(Extension( + "_imagingcms", ["_imagingcms.c"], libraries=["lcms"] + extra + )) + if sys.platform == "darwin": # locate Tcl/Tk frameworks frameworks = [] >How-To-Repeat: 1. install graphics/lcms 2. install/deinstall the port $ make install deinstall ===> Deinstalling for graphics/py-imaging ===> Deinstalling py27-imaging-1.1.7 pkg_delete: unable to completely remove directory '/usr/local/lib/python2.7/site-packages/PIL' pkg_delete: couldn't entirely delete package `py27-imaging-1.1.7' $ ls /usr/local/lib/python2.7/site-packages/PIL _imagingcms.so >Fix: --- lcms.diff begins here --- Index: graphics/py-imaging/Makefile =================================================================== RCS file: /a/.csup/ports/graphics/py-imaging/Makefile,v retrieving revision 1.35 diff -u -p -r1.35 Makefile --- graphics/py-imaging/Makefile 16 Aug 2010 16:18:23 -0000 1.35 +++ graphics/py-imaging/Makefile 12 Oct 2011 12:39:23 -0000 @@ -17,6 +17,7 @@ MAINTAINER= mainland@apeiron.net COMMENT= The Python Imaging Library LIB_DEPENDS= jpeg.11:${PORTSDIR}/graphics/jpeg \ + lcms.1:${PORTSDIR}/graphics/lcms \ freetype.9:${PORTSDIR}/print/freetype2 UNIQUENAME= py-${PORTNAME} Index: graphics/py-imaging/pkg-plist =================================================================== RCS file: /a/.csup/ports/graphics/py-imaging/pkg-plist,v retrieving revision 1.12 diff -u -p -r1.12 pkg-plist --- graphics/py-imaging/pkg-plist 16 Aug 2010 16:18:23 -0000 1.12 +++ graphics/py-imaging/pkg-plist 12 Oct 2011 12:08:52 -0000 @@ -247,6 +247,7 @@ bin/pilprint.py %%PYTHON_SITELIBDIR%%/PIL/__init__.pyc %%PYTHON_SITELIBDIR%%/PIL/__init__.pyo %%PYTHON_SITELIBDIR%%/PIL/_imaging.so +%%PYTHON_SITELIBDIR%%/PIL/_imagingcms.so %%PYTHON_SITELIBDIR%%/PIL/_imagingft.so %%PYTHON_SITELIBDIR%%/PIL/_imagingmath.so %%TKINTER%%%%PYTHON_SITELIBDIR%%/PIL/_imagingtk.so --- lcms.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86aa96pdus.fsf>