From 1be31140d7bd12e4f517d7a4ad6e67fac73ffbb2 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Apr 17 2020 03:24:54 +0000 Subject: Add 0002-Sphinx-3-support.patch for sphinx 3 support (bz 1823529). --- diff --git a/0002-Sphinx-3-support.patch b/0002-Sphinx-3-support.patch new file mode 100644 index 0000000..adb2625 --- /dev/null +++ b/0002-Sphinx-3-support.patch @@ -0,0 +1,46 @@ +--- a/doc/tools/coqrst/coqdomain.py ++++ b/doc/tools/coqrst/coqdomain.py +@@ -21,6 +21,7 @@ from itertools import chain + from collections import defaultdict + + from docutils import nodes, utils ++from docutils.nodes import math_block + from docutils.transforms import Transform + from docutils.parsers.rst import Directive, directives + from docutils.parsers.rst.roles import code_role #, set_classes +@@ -34,7 +35,6 @@ from sphinx.util.logging import getLogge + from sphinx.directives import ObjectDescription + from sphinx.domains import Domain, ObjType, Index + from sphinx.domains.std import token_xrefs +-from sphinx.ext import mathbase + + from . import coqdoc + from .repl import ansicolors +@@ -74,8 +74,8 @@ def make_target(objtype, targetid): + return "coq:{}.{}".format(objtype, targetid) + + def make_math_node(latex, docname, nowrap): +- node = mathbase.displaymath() +- node['latex'] = latex ++ node = math_block() ++ node['text'] = latex + node['label'] = None # Otherwise equations are numbered + node['nowrap'] = nowrap + node['docname'] = docname +@@ -1249,11 +1249,11 @@ def setup(app): + app.connect('doctree-resolved', CoqtopBlocksTransform.merge_consecutive_coqtop_blocks) + + # Add extra styles +- app.add_stylesheet("ansi.css") +- app.add_stylesheet("coqdoc.css") +- app.add_javascript("notations.js") +- app.add_stylesheet("notations.css") +- app.add_stylesheet("pre-text.css") ++ app.add_css_file("ansi.css") ++ app.add_css_file("coqdoc.css") ++ app.add_js_file("notations.js") ++ app.add_css_file("notations.css") ++ app.add_css_file("pre-text.css") + + # Tell Sphinx about extra settings + app.add_config_value("report_undocumented_coq_objects", None, 'env') diff --git a/coq.spec b/coq.spec index abd7475..52c2234 100644 --- a/coq.spec +++ b/coq.spec @@ -27,6 +27,9 @@ Source3: coqide.appdata.xml # https://github.com/coq/coq/pull/11102 Patch1: 0001-Add-support-for-OCaml-4.10.patch +# Adapt to sphinx 3.x +Patch2: 0002-Sphinx-3-support.patch + BuildRequires: ocaml >= 4.08.0 BuildRequires: ocaml-findlib BuildRequires: ocaml-lablgtk3-devel >= 3.0 @@ -185,6 +188,7 @@ cd - export LD_LIBRARY_PATH=%{_libdir}/ocaml/stublibs export CAML_LD_LIBRARY_PATH=$PWD/kernel/byterun:${CAML_LD_LIBRARY_PATH} +export SPHINXWARNERROR=0 # Gross hack to work around intermittent build failures. See # https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/AEPCSIRZMPRG4ZGXAPAIX45LW7ZQA5XI/ @@ -332,6 +336,9 @@ rm -f %{buildroot}%{coqdocdir}/sphinx/html/.buildinfo %exclude %{coqdocdir}/README.md %changelog +* Thu Apr 16 2020 Jerry James - 8.11.0-3 +- Add 0002-Sphinx-3-support.patch for sphinx 3 support (bz 1823529) + * Sat Apr 04 2020 Richard W.M. Jones - 8.11.0-3 - Update all OCaml dependencies for RPM 4.16.