Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Apr 2014 16:58:01 GMT
From:      Olivier Duchateau <olivierd@freebsd.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/189029: [UPDATE] graphics/py-pillow to 2.4.0
Message-ID:  <201404261658.s3QGw17l070961@cgiserv.freebsd.org>
Resent-Message-ID: <201404261700.s3QH01Wk073880@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         189029
>Category:       ports
>Synopsis:       [UPDATE] graphics/py-pillow to 2.4.0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 26 17:00:01 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Olivier Duchateau
>Release:        
>Organization:
>Environment:
>Description:
- Update to 2.4.0
- Adjust URL in pkg-descr file
- Add patch in order to support different localization of headers in graphics/openjpeg > 1.5.x (not in ports tree, it needs exp-run)

In Makefile post-patch target can be removed, because by default openjpeg installs header into openjpeg-2.0/ subdirectory, but on my own port (2.0.1), I follow the current pkg-plist (no subdirectory).
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: Makefile
===================================================================
--- Makefile	(révision 352270)
+++ Makefile	(copie de travail)
@@ -2,9 +2,9 @@
 # $FreeBSD$
 
 PORTNAME=	pillow
-PORTVERSION=	2.3.0
-PORTREVISION=	1
+PORTVERSION=	2.4.0
 CATEGORIES=	graphics python
+MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 DISTNAME=	${PORTNAME:C/p/P/}-${PORTVERSION}
 
@@ -27,7 +27,7 @@
 TIFF_LIB_DEPENDs=	libtiff.so:${PORTSDIR}/graphics/tiff
 WEBP_LIB_DEPENDS=	libwebp.so:${PORTSDIR}/graphics/webp
 
-USE_GITHUB=		yes
+USES=	zip:infozip
 USE_PYTHON=		yes
 USE_PYDISTUTILS=	yes
 
@@ -34,10 +34,6 @@
 PYDISTUTILS_AUTOPLIST=		yes
 PYDISTUTILS_BUILD_TARGET=	build_ext
 
-GH_ACCOUNT=	python-imaging
-GH_PROJECT=	${PORTNAME:C/p/P/}
-GH_COMMIT=	b1b88cf
-
 CONFLICTS_INSTALL=	py*-imaging-*
 
 .include <bsd.port.options.mk>
@@ -78,6 +74,11 @@
 PYDISTUTILS_BUILDARGS+=	--disable-webp
 .endif
 
+post-patch:
+# OpenJPEG header inside ${LOCALBASE}/include (no subdirectory)
+	${REINPLACE_CMD} -e 's|openjpeg-2.0/||' \
+		${WRKSRC}/libImaging/Jpeg2K.h
+
 regression-test: extract
 	@cd ${WRKSRC} && \
 	${PYTHON_CMD} ${PYSETUP} build_ext -i && \
Index: distinfo
===================================================================
--- distinfo	(révision 352270)
+++ distinfo	(copie de travail)
@@ -1,2 +1,2 @@
-SHA256 (Pillow-2.3.0.tar.gz) = 635e366eaaf7b81d7a5d5818af50d42ca1247c42b5e4ad896473fb2d6e3a038f
-SIZE (Pillow-2.3.0.tar.gz) = 2224984
+SHA256 (Pillow-2.4.0.zip) = 2865c68b3a5638466b1837bf4a67c447e0cfdf7463309a068aad0e90aa03f58a
+SIZE (Pillow-2.4.0.zip) = 6519873
Index: files/patch-setup.py
===================================================================
--- files/patch-setup.py	(révision 0)
+++ files/patch-setup.py	(copie de travail)
@@ -0,0 +1,24 @@
+--- ./setup.py.orig	2014-04-01 18:21:44.000000000 +0000
++++ ./setup.py	2014-04-26 18:30:44.000000000 +0000
+@@ -369,9 +369,18 @@
+                     feature.jpeg = "libjpeg"  # alternative name
+ 
+         if feature.want('jpeg2000'):
+-            if _find_include_file(self, "openjpeg-2.0/openjpeg.h"):
+-                if _find_library_file(self, "openjp2"):
+-                    feature.jpeg2000 = "openjp2"
++            if sys.platform.startswith("dragonfly") or sys.platform.startswith("freebsd"): 
++                # needs graphics/openjpeg > 1.5.x
++                if _find_include_file(self, "openjpeg.h"):
++                    if _find_library_file(self, "openjp2"):
++                        feature.jpeg2000 = "openjp2"
++                elif _find_include_file(self, "openjpeg-2.0/openjpeg.h"):
++                    if _find_library_file(self, "openjp2"):
++                        feature.jpeg2000 = "openjp2"
++            else:
++                if _find_include_file(self, "openjpeg-2.0/openjpeg.h"):
++                    if _find_library_file(self, "openjp2"):
++                        feature.jpeg2000 = "openjp2"
+                     
+         if feature.want('tiff'):
+             if _find_library_file(self, "tiff"):

Index: pkg-descr
===================================================================
--- pkg-descr	(révision 352270)
+++ pkg-descr	(copie de travail)
@@ -2,4 +2,4 @@
 was started for and is currently maintained by the Plone community. But it is
 used by many other folks in the Python web community.
 
-WWW: http://github.com/python-imaging/Pillow/
+WWW: http://python-imaging.github.io/


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404261658.s3QGw17l070961>