Index: textproc/itstool/Makefile =================================================================== --- textproc/itstool/Makefile (revision 478359) +++ textproc/itstool/Makefile (working copy) @@ -3,8 +3,7 @@ # $MCom: ports/trunk/textproc/itstool/Makefile 19804 2014-08-13 14:55:11Z kwm $ PORTNAME= itstool -PORTVERSION= 2.0.2 -PORTREVISION= 2 +PORTVERSION= 2.0.4 CATEGORIES= textproc MASTER_SITES= http://files.itstool.org/itstool/ @@ -16,7 +15,7 @@ BUILD_DEPENDS= ${PYTHON_SITELIBDIR}/libxml2.py:textproc/py-libxml2@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_SITELIBDIR}/libxml2.py:textproc/py-libxml2@${PY_FLAVOR} -USES= python:2.7,run tar:bzip2 +USES= python:3.6,run tar:bzip2 GNU_CONFIGURE= yes post-patch: Index: textproc/itstool/distinfo =================================================================== --- textproc/itstool/distinfo (revision 478359) +++ textproc/itstool/distinfo (working copy) @@ -1,2 +1,3 @@ -SHA256 (itstool-2.0.2.tar.bz2) = bf909fb59b11a646681a8534d5700fec99be83bb2c57badf8c1844512227033a -SIZE (itstool-2.0.2.tar.bz2) = 96748 +TIMESTAMP = 1514992492 +SHA256 (itstool-2.0.4.tar.bz2) = 97c208b51da33e0b553e830b92655f8deb9132f8fbe9a646771f95c33226eb60 +SIZE (itstool-2.0.4.tar.bz2) = 102107 Index: textproc/itstool/files/patch-itstool =================================================================== --- textproc/itstool/files/patch-itstool (nonexistent) +++ textproc/itstool/files/patch-itstool (working copy) @@ -0,0 +1,24 @@ +--- itstool.orig 2017-10-16 15:57:18 UTC ++++ itstool +@@ -1585,10 +1585,10 @@ if __name__ == '__main__': + sys.stderr.write('Error: Could not merge translations:\n%s\n' % ustr(e)) + sys.exit(1) + serialized = doc._doc.serialize('utf-8') +- if PY3: ++ #if PY3: + # For some reason, under py3, our serialized data is returns as a str. + # Let's encode it to bytes +- serialized = serialized.encode('utf-8') ++ #serialized = serialized.encode('utf-8') + fout = out + fout_is_str = isinstance(fout, string_types) + if fout_is_str: +@@ -1596,6 +1596,8 @@ if __name__ == '__main__': + fout.write(serialized) + if fout_is_str: + fout.close() ++ if opts.output is not None and not os.path.isdir(opts.output): ++ out.close() + elif opts.join is not None: + translations = {} + for filename in args[1:]: Property changes on: textproc/itstool/files/patch-itstool ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: textproc/itstool/files/patch-itstool.in =================================================================== --- textproc/itstool/files/patch-itstool.in (nonexistent) +++ textproc/itstool/files/patch-itstool.in (working copy) @@ -0,0 +1,23 @@ +--- itstool.in.orig 2018-01-04 12:25:37 UTC ++++ itstool.in +@@ -1585,8 +1585,9 @@ if __name__ == '__main__': + sys.stderr.write('Error: Could not merge translations:\n%s\n' % ustr(e)) + sys.exit(1) + serialized = doc._doc.serialize('utf-8') +- if PY3: +- # For some reason, under py3, our serialized data is returns as a str. ++ if PY3 and sys.version_info[1] < 6: ++ # XXX: ++ # For some reason, under py3 (less py3.6), our serialized data is returns as a str. + # Let's encode it to bytes + serialized = serialized.encode('utf-8') + fout = out +@@ -1596,6 +1597,8 @@ if __name__ == '__main__': + fout.write(serialized) + if fout_is_str: + fout.close() ++ if opts.output is not None and not os.path.isdir(opts.output): ++ out.close() + elif opts.join is not None: + translations = {} + for filename in args[1:]: Property changes on: textproc/itstool/files/patch-itstool.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property