Fix reportlab version check for 3.x and later.diff -r1.15 -r1.16 pkgsrc/print/py-pisa/Makefile
(joerg)
@@ -1,17 +1,18 @@ | @@ -1,17 +1,18 @@ | |||
1 | # $NetBSD: Makefile,v 1.15 2016/11/08 11:42:01 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.16 2016/11/11 12:47:52 joerg Exp $ | |
2 | 2 | |||
3 | DISTNAME= pisa-3.0.33 | 3 | DISTNAME= pisa-3.0.33 | |
4 | PKGNAME= ${PYPKGPREFIX}-${DISTNAME} | 4 | PKGNAME= ${PYPKGPREFIX}-${DISTNAME} | |
5 | PKGREVISION= 1 | |||
5 | CATEGORIES= textproc print www python | 6 | CATEGORIES= textproc print www python | |
6 | MASTER_SITES= ${MASTER_SITE_PYPI:=p/pisa/} | 7 | MASTER_SITES= ${MASTER_SITE_PYPI:=p/pisa/} | |
7 | 8 | |||
8 | OWNER= joerg@NetBSD.org | 9 | OWNER= joerg@NetBSD.org | |
9 | HOMEPAGE= http://www.htmltopdf.org/ | 10 | HOMEPAGE= http://www.htmltopdf.org/ | |
10 | COMMENT= HTML2pdf converter (obsolete, use print/py-weasyprint instead) | 11 | COMMENT= HTML2pdf converter (obsolete, use print/py-weasyprint instead) | |
11 | LICENSE= apache-2.0 | 12 | LICENSE= apache-2.0 | |
12 | 13 | |||
13 | DEPENDS+= ${PYPKGPREFIX}-Pdf-[0-9]*:../../print/py-Pdf | 14 | DEPENDS+= ${PYPKGPREFIX}-Pdf-[0-9]*:../../print/py-Pdf | |
14 | DEPENDS+= ${PYPKGPREFIX}-reportlab>=2.2:../../print/py-reportlab | 15 | DEPENDS+= ${PYPKGPREFIX}-reportlab>=2.2:../../print/py-reportlab | |
15 | DEPENDS+= ${PYPKGPREFIX}-html5lib-[0-9]*:../../textproc/py-html5lib | 16 | DEPENDS+= ${PYPKGPREFIX}-html5lib-[0-9]*:../../textproc/py-html5lib | |
16 | 17 | |||
17 | PYTHON_VERSIONS_INCOMPATIBLE= 34 35 # not ported as of 3.0.33 | 18 | PYTHON_VERSIONS_INCOMPATIBLE= 34 35 # not ported as of 3.0.33 |
@@ -1,7 +1,8 @@ | @@ -1,7 +1,8 @@ | |||
1 | $NetBSD: distinfo,v 1.7 2016/11/08 11:42:01 wiz Exp $ | 1 | $NetBSD: distinfo,v 1.8 2016/11/11 12:47:52 joerg Exp $ | |
2 | 2 | |||
3 | SHA1 (pisa-3.0.33.tar.gz) = 3d7e644b96b7c8f98bfd5823a163c3badd662209 | 3 | SHA1 (pisa-3.0.33.tar.gz) = 3d7e644b96b7c8f98bfd5823a163c3badd662209 | |
4 | RMD160 (pisa-3.0.33.tar.gz) = 1479865d1f0b14f4a37c74fc8aae7e72e9d0efac | 4 | RMD160 (pisa-3.0.33.tar.gz) = 1479865d1f0b14f4a37c74fc8aae7e72e9d0efac | |
5 | SHA512 (pisa-3.0.33.tar.gz) = 5d11d717734ca30876697ce25c77f381a560f4b266b2dbd9f2445ac9b39e2750cc3ff31603d9a1cba6ed51a047fca38ac95a2a4dddf88b238aa5c0d6f810a975 | 5 | SHA512 (pisa-3.0.33.tar.gz) = 5d11d717734ca30876697ce25c77f381a560f4b266b2dbd9f2445ac9b39e2750cc3ff31603d9a1cba6ed51a047fca38ac95a2a4dddf88b238aa5c0d6f810a975 | |
6 | Size (pisa-3.0.33.tar.gz) = 4500555 bytes | 6 | Size (pisa-3.0.33.tar.gz) = 4500555 bytes | |
7 | SHA1 (patch-aa) = 39354cac1592787d43622c04ef776f13b39450ca | 7 | SHA1 (patch-aa) = 39354cac1592787d43622c04ef776f13b39450ca | |
8 | SHA1 (patch-sx_pisa3_pisa__util.py) = 130f9ac339239b71fc6a4920c0cadcccdbc1a913 |
$NetBSD: patch-sx_pisa3_pisa__util.py,v 1.1 2016/11/11 12:47:52 joerg Exp $
--- sx/pisa3/pisa_util.py.orig 2010-06-16 13:43:35.000000000 +0000
+++ sx/pisa3/pisa_util.py
@@ -51,10 +51,10 @@ import shutil
rgb_re = re.compile("^.*?rgb[(]([0-9]+).*?([0-9]+).*?([0-9]+)[)].*?[ ]*$")
-if not(reportlab.Version[0] == "2" and reportlab.Version[2] >= "1"):
+if int(reportlab.Version[0]) < 2 or (reportlab.Version[0] == "2" and reportlab.Version[2] == "0"):
raise ImportError("Reportlab Version 2.1+ is needed!")
-REPORTLAB22 = (reportlab.Version[0] == "2" and reportlab.Version[2] >= "2")
+REPORTLAB22 = not(reportlab.Version[0] == "2" and reportlab.Version[2] == "1")
# print "***", reportlab.Version, REPORTLAB22, reportlab.__file__
import logging