diff options
author | jperkin <jperkin@pkgsrc.org> | 2017-12-15 09:14:52 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2017-12-15 09:14:52 +0000 |
commit | be859189905c184e755dc55019c506a1c934f802 (patch) | |
tree | f4830ead91f17b7460cf9cd67ad549a0e95fe147 /textproc | |
parent | 6aa741184d400b9ae88e2ab4bf1f3312853ec099 (diff) | |
download | pkgsrc-be859189905c184e755dc55019c506a1c934f802.tar.gz |
itstool: Apply upstream fix for itstool/itstool#17.
Fixes segfaults breaking various dependencies. Bump PKGREVISION.
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/itstool/Makefile | 3 | ||||
-rw-r--r-- | textproc/itstool/distinfo | 3 | ||||
-rw-r--r-- | textproc/itstool/patches/patch-itstool.in | 50 |
3 files changed, 54 insertions, 2 deletions
diff --git a/textproc/itstool/Makefile b/textproc/itstool/Makefile index 520c5763f58..1e17dc27a04 100644 --- a/textproc/itstool/Makefile +++ b/textproc/itstool/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.14 2017/11/06 18:28:22 prlw1 Exp $ +# $NetBSD: Makefile,v 1.15 2017/12/15 09:14:52 jperkin Exp $ DISTNAME= itstool-2.0.4 +PKGREVISION= 1 CATEGORIES= textproc MASTER_SITES= http://files.itstool.org/itstool/ EXTRACT_SUFX= .tar.bz2 diff --git a/textproc/itstool/distinfo b/textproc/itstool/distinfo index 1abea70af06..c5e09c9e0f5 100644 --- a/textproc/itstool/distinfo +++ b/textproc/itstool/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.7 2017/11/06 18:28:22 prlw1 Exp $ +$NetBSD: distinfo,v 1.8 2017/12/15 09:14:52 jperkin Exp $ SHA1 (itstool-2.0.4.tar.bz2) = 5345615becb5c463c6e7f2462e387fdc327f3a35 RMD160 (itstool-2.0.4.tar.bz2) = 7237fd8b3fb2d354135fdf16caeeb03b9a022e14 SHA512 (itstool-2.0.4.tar.bz2) = f5cfa9c75710f9cc43a61caeb92ca04ec77023bce6fb14d770dda82efde2e5d9050245618c249d309227a3d43555cb1739f5fe680b4a370786ed4631fa9ee4b7 Size (itstool-2.0.4.tar.bz2) = 102107 bytes +SHA1 (patch-itstool.in) = 70ce932b2c4b816ebd1c295b0d87a114ddde9d06 diff --git a/textproc/itstool/patches/patch-itstool.in b/textproc/itstool/patches/patch-itstool.in new file mode 100644 index 00000000000..97270845f57 --- /dev/null +++ b/textproc/itstool/patches/patch-itstool.in @@ -0,0 +1,50 @@ +$NetBSD: patch-itstool.in,v 1.1 2017/12/15 09:14:52 jperkin Exp $ + +Apply upstream fix for https://github.com/itstool/itstool/issues/17 + +--- itstool.in.orig 2017-12-15 09:05:24.914034930 +0000 ++++ itstool.in +@@ -477,6 +477,7 @@ 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: +@@ -1043,6 +1044,7 @@ 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: +@@ -1069,7 +1071,9 @@ 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) +- child.replaceNode(ph_node) ++ newnode = ph_node.copyNode(1) ++ newnode.setTreeDoc(self._doc) ++ child.replaceNode(newnode) + else: + repl = self.get_translated(ph_node, translations, strict=strict, lang=lang) + child.replaceNode(repl) +@@ -1084,10 +1088,15 @@ 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): +- retnode.addChild(child.copyNode(1)) ++ newnode = child.copyNode(1) ++ newnode.setTreeDoc(self._doc) ++ retnode.addChild(newnode) ++ + ctxt.doc().freeDoc() + return retnode + |