ports/devel/llvm/18/patches/patch-clang_docs_conf_py

21 lines
586 B
Text

Index: clang/docs/conf.py
--- clang/docs/conf.py.orig
+++ clang/docs/conf.py
@@ -35,8 +35,16 @@ templates_path = ["_templates"]
import sphinx
-if sphinx.version_info >= (3, 0):
+# When building man pages, we do not use the markdown pages,
+# So, we can continue without the myst_parser dependencies.
+# Doing so reduces dependencies of some packaged llvm distributions.
+try:
+ import myst_parser
+
extensions.append("myst_parser")
+except ImportError:
+ if not tags.has("builder-man"):
+ raise
# The encoding of source files.
# source_encoding = 'utf-8-sig'