diff options
author | Danilo G. Baio <dbaio@FreeBSD.org> | 2020-05-11 23:51:58 +0000 |
---|---|---|
committer | Danilo G. Baio <dbaio@FreeBSD.org> | 2020-05-11 23:51:58 +0000 |
commit | 75a5f7f0762c1039d83da77f699eed5f26998731 (patch) | |
tree | d08289c54ff9db139f0a17e3129c69e9b0ae39b1 /textproc/py-sphinx/files/patch-sphinx_writers_html.py | |
parent | - pugixml-1.10 conflicts with libSavitar-4.5.0 on (diff) |
Update Sphinx
- Repocopy textproc/py-sphinx to textproc/py-sphinx18
Update it to 1.8.5 (latest version from 1.8.X).
This version supports Python 2 and 3.
Add test target.
- textproc/py-sphinx: Update to 3.0.2
Python 3 only (3.5+).
Add test target.
- Mk/Uses/python.mk: Add PY_SPHINX
Shared macro to use with flavors and not break
ports with USES=python (all versions).
Python >=3.5 --> textproc/py-sphinx (v3.0.2)
Python < 3.5 --> textproc/py-sphinx18 (v1.8.5)
All ports that uses sphinx were changed to use the new variable
${PY_SPHINX} in the dependency line, exceptions:
* Ports that fails to build with sphinx 3.0.2 because of code.
They are pointing to textproc/py-sphinx18 directly.
There aren't many ports.
* Ports that doesn't know Python flavors.
- Add several patches to fix Sphinx consumers
The most common issues are related with pkg-plist, the output
files from Sphinx changes between versions, keep this dynamically
is the better approach.
This will save time in future sphinx updates.
PR: 245629
Exp-run by: antoine
Notes
Notes:
svn path=/head/; revision=534966
Diffstat (limited to 'textproc/py-sphinx/files/patch-sphinx_writers_html.py')
-rw-r--r-- | textproc/py-sphinx/files/patch-sphinx_writers_html.py | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/textproc/py-sphinx/files/patch-sphinx_writers_html.py b/textproc/py-sphinx/files/patch-sphinx_writers_html.py deleted file mode 100644 index dd967c1f7018..000000000000 --- a/textproc/py-sphinx/files/patch-sphinx_writers_html.py +++ /dev/null @@ -1,27 +0,0 @@ ---- sphinx/writers/html.py.orig 2016-10-01 15:14:37 UTC -+++ sphinx/writers/html.py -@@ -16,6 +16,7 @@ import copy - import warnings - - from six import string_types -+import docutils - from docutils import nodes - from docutils.writers.html4css1 import Writer, HTMLTranslator as BaseTranslator - -@@ -497,6 +498,16 @@ class HTMLTranslator(BaseTranslator): - if 'height' not in node: - node['height'] = str(size[1]) - BaseTranslator.visit_image(self, node) -+ -+ # overwritten -+ def depart_image(self, node): -+ if docutils.__version__ >= "0.13": -+ # since docutils-0.13, HTMLWriter does not push context data on visit_image() -+ if node['uri'].lower().endswith(('svg', 'svgz')): -+ self.body.append(self.context.pop()) -+ else: -+ # docutils-0.12 or below, HTML Writer always push context data on visit_image() -+ self.body.append(self.context.pop()) - - def visit_toctree(self, node): - # this only happens when formatting a toc from env.tocs -- in this |