Commit 6c1a9366 authored by Gianfranco Costamagna's avatar Gianfranco Costamagna

ghc: fix build with upstream patch, taken from ghc 8.6 branch

parent b03c59fe
ghc (8.4.4+dfsg1-2) UNRELEASED; urgency=medium
ghc (8.4.4+dfsg1-2) unstable; urgency=medium
[ Clint Adams ]
* Patch Sphinx config to use locally-installed MathJax instead of a
copy on the Internet. closes: #919518.
-- Clint Adams <clint@debian.org> Fri, 18 Jan 2019 17:36:40 -0500
[ Gianfranco Costamagna ]
* Fix sphinx 1.8 build with upstream patch (Closes: #923445)
-- Gianfranco Costamagna <locutusofborg@debian.org> Thu, 28 Feb 2019 15:18:49 +0100
ghc (8.4.4+dfsg1-1) unstable; urgency=medium
......
Origin: https://git.haskell.org/ghc.git/commitdiff/a257782f56e5e330349d4cc7db71e297d8396c67
diff -Nru ghc-8.4.4+dfsg1/docs/users_guide/flags.py ghc-8.6.3+dfsg1/docs/users_guide/flags.py
--- ghc-8.4.4+dfsg1/docs/users_guide/flags.py 2017-11-28 17:39:29.000000000 +0100
+++ ghc-8.6.3+dfsg1/docs/users_guide/flags.py 2018-09-21 00:18:23.000000000 +0200
@@ -46,9 +46,11 @@
from docutils import nodes
from docutils.parsers.rst import Directive, directives
+import sphinx
from sphinx import addnodes
from sphinx.domains.std import GenericObject
from sphinx.errors import SphinxError
+from distutils.version import LooseVersion
from utils import build_table_from_list
### Settings
@@ -597,14 +599,18 @@
### Initialization
def setup(app):
+ # The override argument to add_directive_to_domain is only supported by >= 1.8
+ sphinx_version = LooseVersion(sphinx.__version__)
+ override_arg = {'override': True} if sphinx_version >= LooseVersion('1.8') else {}
# Add ghc-flag directive, and override the class with our own
app.add_object_type('ghc-flag', 'ghc-flag')
- app.add_directive_to_domain('std', 'ghc-flag', Flag)
+ app.add_directive_to_domain('std', 'ghc-flag', Flag, **override_arg)
# Add extension directive, and override the class with our own
app.add_object_type('extension', 'extension')
- app.add_directive_to_domain('std', 'extension', LanguageExtension)
+ app.add_directive_to_domain('std', 'extension', LanguageExtension,
+ **override_arg)
# NB: language-extension would be misinterpreted by sphinx, and produce
# lang="extensions" XML attributes
......@@ -16,3 +16,4 @@ haddock-out-of-memory.patch
kfreebsd-aclocal.m4
revert-llvm-fixes
local-mathjax
fix-build-sphinx.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment