Index: head/textproc/py-docutils/Makefile =================================================================== --- head/textproc/py-docutils/Makefile (revision 508052) +++ head/textproc/py-docutils/Makefile (revision 508053) @@ -1,35 +1,36 @@ # Created by: ijliao # $FreeBSD$ PORTNAME= docutils PORTVERSION= 0.15 +PORTREVISION= 1 CATEGORIES= textproc python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= python@FreeBSD.org COMMENT= Python Documentation Utilities LICENSE= BSD2CLAUSE GPLv3+ PD PSFL LICENSE_COMB= multi PORTSCOUT= limit:^[0-9\.]*$$ USES= python USE_PYTHON= autoplist concurrent distutils NO_ARCH= yes OPTIONS_DEFINE= PYGMENTS PYGMENTS_DESC= Syntax highlighting PYGMENTS_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pygments>=1.6:textproc/py-pygments@${PY_FLAVOR} SCRIPTS= rst2html rst2latex rst2man rst2odt rst2odt_prepstyles \ rst2pseudoxml rst2s5 rst2xetex rst2xml rstpep2html post-install: .for script in ${SCRIPTS} ${LN} -s ${script}.py-${PYTHON_VER} ${STAGEDIR}${PREFIX}/bin/${script} .endfor .include Index: head/textproc/py-docutils/files/patch-docutils-nodes.py =================================================================== --- head/textproc/py-docutils/files/patch-docutils-nodes.py (nonexistent) +++ head/textproc/py-docutils/files/patch-docutils-nodes.py (revision 508053) @@ -0,0 +1,43 @@ +Obtained from: https://sourceforge.net/p/docutils/code/8294/ + +--- docutils/nodes.py.orig 2019-04-07 08:08:41 UTC ++++ docutils/nodes.py +@@ -29,8 +29,6 @@ import warnings + import types + import unicodedata + +-import docutils.utils +- + # ============================== + # Functional Node Base Classes + # ============================== +@@ -322,6 +320,20 @@ def ensure_str(s): + return s.encode('ascii', 'backslashreplace') + return s + ++# definition moved here from `utils` to avoid circular import dependency ++def unescape(text, restore_backslashes=False, respect_whitespace=False): ++ """ ++ Return a string with nulls removed or restored to backslashes. ++ Backslash-escaped spaces are also removed. ++ """ ++ # `respect_whitespace` is ignored (since introduction 2016-12-16) ++ if restore_backslashes: ++ return text.replace('\x00', '\\') ++ else: ++ for sep in ['\x00 ', '\x00\n', '\x00']: ++ text = ''.join(text.split(sep)) ++ return text ++ + + class Text(Node, reprunicode): + +@@ -364,7 +376,7 @@ class Text(Node, reprunicode): + return domroot.createTextNode(unicode(self)) + + def astext(self): +- return reprunicode(docutils.utils.unescape(self)) ++ return reprunicode(unescape(self)) + + # Note about __unicode__: The implementation of __unicode__ here, + # and the one raising NotImplemented in the superclass Node had Property changes on: head/textproc/py-docutils/files/patch-docutils-nodes.py ___________________________________________________________________ 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: head/textproc/py-docutils/files/patch-docutils-utils-__init__.py =================================================================== --- head/textproc/py-docutils/files/patch-docutils-utils-__init__.py (nonexistent) +++ head/textproc/py-docutils/files/patch-docutils-utils-__init__.py (revision 508053) @@ -0,0 +1,32 @@ +Obtained from: https://sourceforge.net/p/docutils/code/8294/ + +--- docutils/utils/__init__.py.orig 2019-04-07 08:08:42 UTC ++++ docutils/utils/__init__.py +@@ -18,6 +18,7 @@ import warnings + import unicodedata + from docutils import ApplicationError, DataError, __version_info__ + from docutils import nodes ++from docutils.nodes import unescape + import docutils.io + from docutils.utils.error_reporting import ErrorOutput, SafeString + +@@ -576,18 +577,7 @@ def escape2null(text): + parts.append('\x00' + text[found+1:found+2]) + start = found + 2 # skip character after escape + +-def unescape(text, restore_backslashes=False, respect_whitespace=False): +- """ +- Return a string with nulls removed or restored to backslashes. +- Backslash-escaped spaces are also removed. +- """ +- # `respect_whitespace` is ignored (since introduction 2016-12-16) +- if restore_backslashes: +- return text.replace('\x00', '\\') +- else: +- for sep in ['\x00 ', '\x00\n', '\x00']: +- text = ''.join(text.split(sep)) +- return text ++# `unescape` definition moved to `nodes` to avoid circular import dependency. + + def split_escaped_whitespace(text): + """ Property changes on: head/textproc/py-docutils/files/patch-docutils-utils-__init__.py ___________________________________________________________________ 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