From bcf7ece4a8a94df2fcf7ed5277e8a450f56355c5 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Mon, 22 May 2023 11:57:51 -0400 Subject: [PATCH] Avoid recommonmark dependency in RHEL builds python-recommonmark and its dependencies are unwanted in RHEL. --- 0101-Deactivate-markdown-doc.patch | 25 +++++++++++++++++++++++++ llvm.spec | 11 +++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 0101-Deactivate-markdown-doc.patch diff --git a/0101-Deactivate-markdown-doc.patch b/0101-Deactivate-markdown-doc.patch new file mode 100644 index 0000000..92e048d --- /dev/null +++ b/0101-Deactivate-markdown-doc.patch @@ -0,0 +1,25 @@ +diff -Naur a/llvm/docs/conf.py b/llvm/docs/conf.py +--- a/llvm/docs/conf.py 2020-09-15 09:12:24.318287611 +0000 ++++ b/llvm/docs/conf.py 2020-09-15 15:01:00.025893199 +0000 +@@ -36,20 +36,7 @@ + '.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' diff --git a/llvm.spec b/llvm.spec index abbc6e2..0d59ada 100644 --- a/llvm.spec +++ b/llvm.spec @@ -75,7 +75,7 @@ Name: %{pkg_name} Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Low Level Virtual Machine License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -90,6 +90,8 @@ Source6: release-keys.asc # See https://reviews.llvm.org/D137890 for the next two patches Patch2: 0001-llvm-Add-install-targets-for-gtest.patch +# RHEL-specific patch to avoid unwanted recommonmark dep +Patch101: 0101-Deactivate-markdown-doc.patch # Patching third-party dir with a 200 offset in patch number Patch201: 0201-third-party-Add-install-targets-for-gtest.patch @@ -103,7 +105,9 @@ BuildRequires: libffi-devel BuildRequires: ncurses-devel BuildRequires: python3-psutil BuildRequires: python3-sphinx +%if %{undefined rhel} BuildRequires: python3-recommonmark +%endif BuildRequires: multilib-rpm-config %if %{with gold} BuildRequires: binutils-devel @@ -218,7 +222,7 @@ cd .. mv %{third_party_srcdir} third-party %setup -T -q -b 0 -n %{llvm_srcdir} -%autopatch -M200 -p2 +%autopatch -M%{?!rhel:100}%{?rhel:200} -p2 %py3_shebang_fix \ test/BugPoint/compile-custom.ll.py \ @@ -559,6 +563,9 @@ fi %endif %changelog +* Fri May 19 2023 Yaakov Selkowitz - 16.0.4-2 +- Avoid recommonmark dependency in RHEL builds + * Thu May 18 2023 Tulio Magno Quites Machado Filho - 16.0.4-1 - Update to LLVM 16.0.4