From b534a5d60778b13b042c2e68655d101d3f4b258a Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: May 22 2023 15:57:24 +0000 Subject: Avoid recommonmark dependency in RHEL builds python-recommonmark and its dependencies are unwanted in RHEL. This is based on changes already in c9s. --- diff --git a/0009-disable-recommonmark.patch b/0009-disable-recommonmark.patch new file mode 100644 index 0000000..8a259af --- /dev/null +++ b/0009-disable-recommonmark.patch @@ -0,0 +1,38 @@ +From f4e2d711e5cfd8e357d770e2da7a114086ee8659 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timm=20B=C3=A4der?= +Date: Thu, 22 Sep 2022 10:49:43 +0200 +Subject: disable recommonmark + +--- + clang/docs/conf.py | 15 +-------------- + 1 file changed, 1 insertion(+), 14 deletions(-) + +diff --git a/clang/docs/conf.py b/clang/docs/conf.py +index b8a42018191a..912449a7f792 100644 +--- a/clang/docs/conf.py ++++ b/clang/docs/conf.py +@@ -37,20 +37,7 @@ source_suffix = { + '.rst': 'restructuredtext', + } + +-try: +- import recommonmark +-except ImportError: +- # manpages do not use any .md sources +- if not tags.has('builder-man'): +- raise +-else: +- import sphinx +- if sphinx.version_info >= (3, 0): +- # This requires 0.5 or later. +- extensions.append('recommonmark') +- else: +- source_parsers = {'.md': 'recommonmark.parser.CommonMarkParser'} +- source_suffix['.md'] = 'markdown' ++import sphinx + + # The encoding of source files. + #source_encoding = 'utf-8-sig' +-- +2.37.1 + diff --git a/clang.spec b/clang.spec index 77ee04a..dd8089a 100644 --- a/clang.spec +++ b/clang.spec @@ -75,6 +75,10 @@ Patch10: fix-ieee128-cross.diff Patch11: 0001-Change-LLVM_COMMON_CMAKE_UTILS-usage.patch +# RHEL specific patches +# Avoid unwanted dependency on python-recommonmark +Patch101: 0009-disable-recommonmark.patch + %if %{without compat_build} # Patches for clang-tools-extra # See https://reviews.llvm.org/D120301 @@ -107,7 +111,9 @@ BuildRequires: emacs BuildRequires: python3-lit BuildRequires: python3-sphinx +%if %{undefined rhel} BuildRequires: python3-recommonmark +%endif BuildRequires: libatomic # We need python3-devel for %%py3_shebang_fix @@ -276,7 +282,7 @@ rm test/clang-tidy/checkers/altera/struct-pack-align.cpp clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py %setup -q -n %{clang_srcdir} -%autopatch -M200 -p2 +%autopatch -M%{?!rhel:100}%{?rhel:200} -p2 # failing test case rm test/CodeGen/profile-filter.c