Index: head/textproc/itstool/Makefile =================================================================== --- head/textproc/itstool/Makefile (revision 528413) +++ head/textproc/itstool/Makefile (revision 528414) @@ -1,28 +1,29 @@ # Created by: Koop Mast # $FreeBSD$ # $MCom: ports/trunk/textproc/itstool/Makefile 19804 2014-08-13 14:55:11Z kwm $ PORTNAME= itstool -PORTVERSION= 2.0.5 -PORTREVISION= 2 +PORTVERSION= 2.0.6 CATEGORIES= textproc MASTER_SITES= http://files.itstool.org/itstool/ MAINTAINER= kwm@FreeBSD.org COMMENT= Make XML documents translatable through po files LICENSE= GPLv3 BUILD_DEPENDS= ${PYTHON_SITELIBDIR}/libxml2.py:textproc/py-libxml2@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_SITELIBDIR}/libxml2.py:textproc/py-libxml2@${PY_FLAVOR} USES= python tar:bzip2 GNU_CONFIGURE= yes CONFLICTS_INSTALL= itstool22 + +NO_ARCH= yes post-patch: @${REINPLACE_CMD} -e 's|@PYTHON@|${PYTHON_CMD}|g' \ ${WRKSRC}/itstool.in .include Index: head/textproc/itstool/distinfo =================================================================== --- head/textproc/itstool/distinfo (revision 528413) +++ head/textproc/itstool/distinfo (revision 528414) @@ -1,3 +1,3 @@ -TIMESTAMP = 1547069695 -SHA256 (itstool-2.0.5.tar.bz2) = 100506f8df62cca6225ec3e631a8237e9c04650c77495af4919ac6a100d4b308 -SIZE (itstool-2.0.5.tar.bz2) = 102751 +TIMESTAMP = 1582405002 +SHA256 (itstool-2.0.6.tar.bz2) = 6233cc22726a9a5a83664bf67d1af79549a298c23185d926c3677afa917b92a9 +SIZE (itstool-2.0.6.tar.bz2) = 103067 Index: head/textproc/itstool/files/patch-PR18 =================================================================== --- head/textproc/itstool/files/patch-PR18 (nonexistent) +++ head/textproc/itstool/files/patch-PR18 (revision 528414) @@ -0,0 +1,88 @@ +# https://github.com/itstool/itstool/pull/18 +# https://github.com/itstool/itstool/issues/17 + +From 98d04cdabf1721cb541ecd234c975f13fde4fa41 Mon Sep 17 00:00:00 2001 +From: Guido Trentalancia +Date: Wed, 1 Nov 2017 18:20:36 +0100 +Subject: [PATCH 1/2] Revert "Be more careful about libxml2 memory management" + +This reverts commit 9b84c007a73e8275ca45762f1bfa3ab7c3a852e2. +--- + itstool.in | 13 ++----------- + 1 file changed, 2 insertions(+), 11 deletions(-) + +diff --git itstool.in itstool.in +index a16eba9..c1d0585 100755 +--- itstool.in ++++ itstool.in +@@ -477,7 +477,6 @@ class Document (object): + if load_dtd: + ctxt.loadSubset(1) + if keep_entities: +- ctxt.loadSubset(1) + ctxt.ctxtUseOptions(libxml2.XML_PARSE_DTDLOAD) + ctxt.replaceEntities(0) + else: +@@ -1044,7 +1043,6 @@ class Document (object): + if self._load_dtd: + ctxt.loadSubset(1) + if self._keep_entities: +- ctxt.loadSubset(1) + ctxt.ctxtUseOptions(libxml2.XML_PARSE_DTDLOAD) + ctxt.replaceEntities(0) + else: +@@ -1071,9 +1069,7 @@ class Document (object): + ph_node = msg.get_placeholder(child.name).node + if self.has_child_elements(ph_node): + self.merge_translations(translations, None, ph_node, strict=strict) +- newnode = ph_node.copyNode(1) +- newnode.setTreeDoc(self._doc) +- child.replaceNode(newnode) ++ child.replaceNode(ph_node) + else: + repl = self.get_translated(ph_node, translations, strict=strict, lang=lang) + child.replaceNode(repl) +@@ -1088,15 +1084,10 @@ class Document (object): + (lang + ' ') if lang is not None else '', + msgstr.encode('utf-8'))) + self._xml_err = '' +- ctxt.doc().freeDoc() + return node + retnode = node.copyNode(2) +- retnode.setTreeDoc(self._doc) + for child in xml_child_iter(trnode): +- newnode = child.copyNode(1) +- newnode.setTreeDoc(self._doc) +- retnode.addChild(newnode) +- ++ retnode.addChild(child.copyNode(1)) + ctxt.doc().freeDoc() + return retnode + + +From 1549b6d12eb2f35e5c7f1b1856c21768e92ba794 Mon Sep 17 00:00:00 2001 +From: Guido Trentalancia +Date: Wed, 1 Nov 2017 18:23:44 +0100 +Subject: [PATCH 2/2] Fix a segmentation fault bug introduced with version + 2.0.4. + +https://github.com/itstool/itstool/issues/17 + +This fix seems a lot easier than the previous reverted commit. +--- + itstool.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git itstool.in itstool.in +index c1d0585..e492e95 100755 +--- itstool.in ++++ itstool.in +@@ -1048,7 +1048,7 @@ class Document (object): + else: + ctxt.replaceEntities(1) + ctxt.parseDocument() +- trnode = ctxt.doc().getRootElement() ++ trnode = ctxt.doc().getRootElement().copyNode(1) + try: + self._check_errors() + except libxml2.parserError: Property changes on: head/textproc/itstool/files/patch-PR18 ___________________________________________________________________ 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