aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Grzybowski <wg@FreeBSD.org>2015-11-10 15:28:15 +0000
committerWilliam Grzybowski <wg@FreeBSD.org>2015-11-10 15:28:15 +0000
commitfa7c499608aa4d658a4df055f547e396247ac19e (patch)
tree6695f9378b82cdc1ad980b2ba56826fc1e0c960d
parent2a4b3e544e85192e2ead26b5dc17b9c677369c0f (diff)
downloadports-fa7c499608aa4d658a4df055f547e396247ac19e.tar.gz
ports-fa7c499608aa4d658a4df055f547e396247ac19e.zip
Notes
-rw-r--r--devel/py-columnize/Makefile11
-rw-r--r--devel/py-columnize/files/extra-patch-____pkginfo____.py11
2 files changed, 20 insertions, 2 deletions
diff --git a/devel/py-columnize/Makefile b/devel/py-columnize/Makefile
index e9fa4f946f9c..1bd1bbba36f7 100644
--- a/devel/py-columnize/Makefile
+++ b/devel/py-columnize/Makefile
@@ -12,7 +12,6 @@ COMMENT= Format a simple (i.e. not nested) list into aligned columns
LICENSE= MIT
MY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}nose>=1.0:${PORTSDIR}/devel/py-nose
-MY_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}backports.shutil_get_terminal_size=1.0:${PORTSDIR}/devel/py-backports.shutil_get_terminal_size
BUILD_DEPENDS= ${MY_DEPENDS}
RUN_DEPENDS= ${MY_DEPENDS}
@@ -20,4 +19,12 @@ RUN_DEPENDS= ${MY_DEPENDS}
USES= python
USE_PYTHON= autoplist distutils
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${PYTHON_MAJOR_VER} == "3"
+EXTRA_PATCHES= ${FILESDIR}/extra-patch-____pkginfo____.py
+.else
+MY_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}backports.shutil_get_terminal_size=1.0:${PORTSDIR}/devel/py-backports.shutil_get_terminal_size
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/devel/py-columnize/files/extra-patch-____pkginfo____.py b/devel/py-columnize/files/extra-patch-____pkginfo____.py
new file mode 100644
index 000000000000..83b00ee7a85d
--- /dev/null
+++ b/devel/py-columnize/files/extra-patch-____pkginfo____.py
@@ -0,0 +1,11 @@
+--- __pkginfo__.py.orig 2015-10-27 08:06:17 UTC
++++ __pkginfo__.py
+@@ -28,7 +28,7 @@ web = 'https://github.com/rocky/pycolumn
+ zip_safe = False
+
+ def read(*rnames):
+- return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
++ return open(os.path.join(os.path.dirname(__file__), *rnames), encoding='utf8').read()
+
+ readme = 'README.txt'
+ if os.path.exists('README.rst'): readme = 'README.rst'