ports/186866: [patch] print/py-reportlab2 Update from 2.5 to 2.7
Kozlov Sergey
kozlov.sergey.404 at gmail.com
Tue Feb 18 14:00:00 UTC 2014
>Number: 186866
>Category: ports
>Synopsis: [patch] print/py-reportlab2 Update from 2.5 to 2.7
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Feb 18 14:00:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Kozlov Sergey
>Release: 9.2-RELEASE-p3
>Organization:
ARC
>Environment:
FreeBSD sonya 9.2-RELEASE-p3 FreeBSD 9.2-RELEASE-p3 #1: Fri Jan 17 19:43:47 EET 2014 root at sonya:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
Updated port py-reportlab2 to 2.7
There is newer version of reportlab (3.0), but there is known migrating issues.
I'm working on making the py-reportlab3 port.
Changes:
- Add '2' as PKGNAMESUFFIX which makes many auto-generated variables usable without correction
- Change deprecated LICENSE
- Usage of Adobe CMaps is deprecated long ago (https://bitbucket.org/rptlab/reportlab/commits/9877f90e0ad9f04f61b454cee4c2e88a07b70e6b), remove it
- Freetype fonts are brought in by py-imaging, the FREETYPE option has no effect, remove it
- This version only supports python version from 2.5 to 2.7, define it in the port
- Use PYDISTUTILS_AUTOPLIST
- Stagify
- Change patch+reinplace+reinplace chain to one simple reinplace
- Whitespace allignment in BROKEN
- Doc generation script needs PYTHONPATH set because it uses reportlab, which is not yet installed
- Change from tab to space after 'WWW:' in pkg-descr
Please remove the 'files/patch-setup.py' file and the 'files' directory itself.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
Index: Makefile
===================================================================
--- Makefile (revision 344318)
+++ Makefile (working copy)
@@ -1,68 +1,57 @@
# Created by: Li-Wen Hsu <lwhsu at lwhsu.org>
# $FreeBSD$
-PORTNAME= reportlab2
-PORTVERSION= 2.5
+PORTNAME= reportlab
+PORTVERSION= 2.7
CATEGORIES= print python
MASTER_SITES= http://www.reportlab.com/ftp/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
-DISTFILES= reportlab-${PORTVERSION}${EXTRACT_SUFX} pfbfer-${PFBFER_VERSION}.zip
-EXTRACT_ONLY= reportlab-${PORTVERSION}${EXTRACT_SUFX}
+PKGNAMESUFFIX= 2
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
+ pfbfer-${PFBFER_VERSION}.zip
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= buganini at gmail.com
COMMENT= Library to create PDF documents using the Python language
-LICENSE= BSD
+LICENSE= BSD3CLAUSE
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}imaging>0:${PORTSDIR}/graphics/py-imaging
-OPTIONS_DEFINE= CJK FREETYPE DOCS
-OPTIONS_DEFAULT= CJK FREETYPE
-CJK_DESC= Adobe CMaps
+OPTIONS_DEFINE= DOCS
-WRKSRC= ${WRKDIR}/reportlab-${PORTVERSION}
-
CONFLICTS= py2[0-9]-reportlab-[0-9]*
PFBFER_VERSION= 20070710
-USE_PYTHON= yes
+USE_PYTHON= 2.5-2.7
USE_PYDISTUTILS= yes
-PYDISTUTILS_PKGNAME= reportlab
+PYDISTUTILS_AUTOPLIST= yes
-MAKE_ENV= PACKAGE_PATH="${REPORTLABDIR}"
-
-REPORTLABDIR= ${PYTHONPREFIX_SITELIBDIR}/reportlab
-DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
DOCS= reportlab-graphics-reference.pdf \
reportlab-reference.pdf \
reportlab-userguide.pdf
-NO_STAGE= yes
+DOCS_PLIST_FILES= ${DOCSDIR}/reportlab-graphics-reference.pdf \
+ ${DOCSDIR}/reportlab-reference.pdf \
+ ${DOCSDIR}/reportlab-userguide.pdf
+DOCS_PLIST_DIRS= ${DOCSDIR}
+
post-patch:
- @${REINPLACE_CMD} -e 's|/usr/ports/distfiles|${DISTDIR}|g' ${WRKSRC}/setup.py
- @${REINPLACE_CMD} -e 's|pfbfer.zip|pfbfer-${PFBFER_VERSION}.zip|g' ${WRKSRC}/setup.py
+ @${REINPLACE_CMD} -e 's|http://www.reportlab.com/ftp|file://${DISTDIR}|g' ${WRKSRC}/setup.py
.include <bsd.port.options.mk>
.if ${ARCH} == "sparc64"
-BROKEN= Does not install on sparc64
-
+BROKEN= Does not install on sparc64
.endif
-.if ${PORT_OPTIONS:MCJK}
-RUN_DEPENDS+= ${LOCALBASE}/share/fonts/adobe-cmaps/ac15/cid2code.txt:${PORTSDIR}/print/adobe-cmaps
-.endif
-
-.if ${PORT_OPTIONS:MFREETYPE}
-LIB_DEPENDS+= freetype.9:${PORTSDIR}/print/freetype2
-.endif
-
post-install:
.if ${PORT_OPTIONS:MDOCS}
- @cd ${WRKSRC}/docs && ${PYTHON_CMD} genAll.py
- ${MKDIR} ${DOCSDIR}
+ @cd ${WRKSRC}/docs && \
+ PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR} ${PYTHON_CMD} genAll.py
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
.for i in ${DOCS}
- ${CP} ${WRKSRC}/docs/${i} ${DOCSDIR}
+ ${CP} ${WRKSRC}/docs/${i} ${STAGEDIR}${DOCSDIR}
.endfor
.endif
Index: distinfo
===================================================================
--- distinfo (revision 344318)
+++ distinfo (working copy)
@@ -1,4 +1,4 @@
-SHA256 (reportlab-2.5.tar.gz) = 805152084cc8421104a5e1e705482a1034598ecb4c266670dfba31996de6ff69
-SIZE (reportlab-2.5.tar.gz) = 1917306
+SHA256 (reportlab-2.7.tar.gz) = 82b56935e4a75641b40eb22050f0b6e46a0f0a9ebfacdf3b24a1e9c0eef2af6d
+SIZE (reportlab-2.7.tar.gz) = 1951460
SHA256 (pfbfer-20070710.zip) = fb1462ff6ce8efae58a0c496f0537c5ac16d4895c68f1640c2973db574ddb376
SIZE (pfbfer-20070710.zip) = 677333
Index: pkg-descr
===================================================================
--- pkg-descr (revision 344318)
+++ pkg-descr (working copy)
@@ -19,4 +19,4 @@
scientific papers
- Going from XML to PDF in one step!
-WWW: http://www.reportlab.org/rl_toolkit.html
+WWW: http://www.reportlab.org/rl_toolkit.html
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list