From 1cd73657c4a72f137d6f5e7578b310f2e38d5b46 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 5 Sep 2022 20:08:40 +0800 Subject: [PATCH] python3-recommonmark is only in Fedora --- 0001-Deactivate-markdown-doc.patch | 25 +++++++++++++++++++++++++ llvm12.spec | 16 ++++++++++++++-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 0001-Deactivate-markdown-doc.patch diff --git a/0001-Deactivate-markdown-doc.patch b/0001-Deactivate-markdown-doc.patch new file mode 100644 index 0000000..92e048d --- /dev/null +++ b/0001-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/llvm12.spec b/llvm12.spec index 865a149..f4ffadb 100644 --- a/llvm12.spec +++ b/llvm12.spec @@ -48,7 +48,7 @@ Name: %{pkg_name} Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}} -Release: 5%{?dist} +Release: 6%{?dist} Summary: The Low Level Virtual Machine License: NCSA @@ -64,6 +64,9 @@ Source4: lit.fedora.cfg.py Patch0: 0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch +# RHEL-specific patches +Patch101: 0001-Deactivate-markdown-doc.patch + BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake @@ -73,7 +76,9 @@ BuildRequires: libffi-devel BuildRequires: ncurses-devel BuildRequires: python3-psutil BuildRequires: python3-sphinx +%if %{defined fedora} BuildRequires: python3-recommonmark +%endif BuildRequires: multilib-rpm-config %if %{with gold} BuildRequires: binutils-devel @@ -175,7 +180,11 @@ LLVM's modified googletest sources. %prep %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' -%autosetup -n %{llvm_srcdir} -p2 +%setup -q -n %{llvm_srcdir} +%patch0 -p2 +%if %{undefined fedora} +%patch101 -p2 +%endif pathfix.py -i %{__python3} -pn \ test/BugPoint/compile-custom.ll.py \ @@ -499,6 +508,9 @@ fi %endif %changelog +* Mon Sep 5 2022 Jens Petersen - 12.0.1-6 +- python3-recommonmark is only in Fedora + * Thu Jul 21 2022 Fedora Release Engineering - 12.0.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild