mirror of
https://src.fedoraproject.org/rpms/llvm.git
synced 2024-11-24 09:32:42 +00:00
Don't build HTML documentation. Add lldb man pages.
* Install a redirection index.html page to point users to the upstream HTML documentation. * Remove myst parser patch for RHEL. * Remove -DLLVM_INCLUDE_DOCS * Add lldb man-pages
This commit is contained in:
parent
680f925c31
commit
836ccfcbb2
3 changed files with 51 additions and 114 deletions
|
@ -1,41 +0,0 @@
|
||||||
From d8742e9b361e5fd6fee2298b8ea0aeb4671ec05a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nikita Popov <npopov@redhat.com>
|
|
||||||
Date: Wed, 22 May 2024 09:39:26 +0200
|
|
||||||
Subject: [PATCH] Remove myst_parser dependency for RHEL
|
|
||||||
|
|
||||||
---
|
|
||||||
clang/docs/conf.py | 3 +--
|
|
||||||
llvm/docs/conf.py | 3 +--
|
|
||||||
2 files changed, 2 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/clang/docs/conf.py b/clang/docs/conf.py
|
|
||||||
index 4cee382a718f..d2e2198e05d4 100644
|
|
||||||
--- a/clang/docs/conf.py
|
|
||||||
+++ b/clang/docs/conf.py
|
|
||||||
@@ -43,8 +43,7 @@ try:
|
|
||||||
|
|
||||||
extensions.append("myst_parser")
|
|
||||||
except ImportError:
|
|
||||||
- if not tags.has("builder-man"):
|
|
||||||
- raise
|
|
||||||
+ pass
|
|
||||||
|
|
||||||
|
|
||||||
# The encoding of source files.
|
|
||||||
diff --git a/llvm/docs/conf.py b/llvm/docs/conf.py
|
|
||||||
index 7f2ed5309606..354a41f11280 100644
|
|
||||||
--- a/llvm/docs/conf.py
|
|
||||||
+++ b/llvm/docs/conf.py
|
|
||||||
@@ -36,8 +36,7 @@ try:
|
|
||||||
|
|
||||||
extensions.append("myst_parser")
|
|
||||||
except ImportError:
|
|
||||||
- if not tags.has("builder-man"):
|
|
||||||
- raise
|
|
||||||
+ pass
|
|
||||||
|
|
||||||
# Automatic anchors for markdown titles
|
|
||||||
from llvm_slug import make_slug
|
|
||||||
--
|
|
||||||
2.44.0
|
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
From 50cd36c2156d375a6d50f661908b460fbbd22e78 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nikita Popov <npopov@redhat.com>
|
|
||||||
Date: Wed, 22 May 2024 09:39:26 +0200
|
|
||||||
Subject: [PATCH] Remove myst_parser dependency for RHEL
|
|
||||||
|
|
||||||
---
|
|
||||||
clang/docs/conf.py | 3 +--
|
|
||||||
llvm/docs/conf.py | 5 +----
|
|
||||||
2 files changed, 2 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/clang/docs/conf.py b/clang/docs/conf.py
|
|
||||||
index 4cee382a718f..d2e2198e05d4 100644
|
|
||||||
--- a/clang/docs/conf.py
|
|
||||||
+++ b/clang/docs/conf.py
|
|
||||||
@@ -43,8 +43,7 @@ try:
|
|
||||||
|
|
||||||
extensions.append("myst_parser")
|
|
||||||
except ImportError:
|
|
||||||
- if not tags.has("builder-man"):
|
|
||||||
- raise
|
|
||||||
+ pass
|
|
||||||
|
|
||||||
|
|
||||||
# The encoding of source files.
|
|
||||||
diff --git a/llvm/docs/conf.py b/llvm/docs/conf.py
|
|
||||||
index d9fa6961032b..e38c009a457d 100644
|
|
||||||
--- a/llvm/docs/conf.py
|
|
||||||
+++ b/llvm/docs/conf.py
|
|
||||||
@@ -36,10 +36,7 @@ try:
|
|
||||||
|
|
||||||
extensions.append("myst_parser")
|
|
||||||
except ImportError:
|
|
||||||
- if not tags.has("builder-man"):
|
|
||||||
- raise
|
|
||||||
-else:
|
|
||||||
- myst_enable_extensions = ["substitution"]
|
|
||||||
+ pass
|
|
||||||
|
|
||||||
# Automatic anchors for markdown titles
|
|
||||||
myst_heading_anchors = 6
|
|
||||||
--
|
|
||||||
2.46.0
|
|
||||||
|
|
81
llvm.spec
81
llvm.spec
|
@ -182,7 +182,7 @@
|
||||||
#region main package
|
#region main package
|
||||||
Name: %{pkg_name_llvm}
|
Name: %{pkg_name_llvm}
|
||||||
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}}
|
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}}
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: The Low Level Virtual Machine
|
Summary: The Low Level Virtual Machine
|
||||||
|
|
||||||
License: Apache-2.0 WITH LLVM-exception OR NCSA
|
License: Apache-2.0 WITH LLVM-exception OR NCSA
|
||||||
|
@ -261,13 +261,6 @@ Patch2000: 0001-19-Always-build-shared-libs-for-LLD.patch
|
||||||
#endregion LLD patches
|
#endregion LLD patches
|
||||||
|
|
||||||
#region RHEL patches
|
#region RHEL patches
|
||||||
# All RHEL
|
|
||||||
%if %{maj_ver} >= 20
|
|
||||||
Patch500: 0001-20-Remove-myst_parser-dependency-for-RHEL.patch
|
|
||||||
%else
|
|
||||||
Patch500: 0001-19-Remove-myst_parser-dependency-for-RHEL.patch
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# RHEL 8 only
|
# RHEL 8 only
|
||||||
Patch501: 0001-Fix-page-size-constant-on-aarch64-and-ppc64le.patch
|
Patch501: 0001-Fix-page-size-constant-on-aarch64-and-ppc64le.patch
|
||||||
#endregion RHEL patches
|
#endregion RHEL patches
|
||||||
|
@ -803,13 +796,9 @@ The package contains the LLDB Python module.
|
||||||
# automatically apply patches based on LLVM version
|
# automatically apply patches based on LLVM version
|
||||||
%autopatch -m%{maj_ver}00 -M%{maj_ver}99 -p1
|
%autopatch -m%{maj_ver}00 -M%{maj_ver}99 -p1
|
||||||
|
|
||||||
%if %{defined rhel}
|
%if %{defined rhel} && 0%{?rhel} == 8
|
||||||
%patch -p1 -P500
|
|
||||||
|
|
||||||
%if %{rhel} == 8
|
|
||||||
%patch -p1 -P501
|
%patch -p1 -P501
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
|
|
||||||
#region LLVM preparation
|
#region LLVM preparation
|
||||||
|
|
||||||
|
@ -844,10 +833,6 @@ The package contains the LLDB Python module.
|
||||||
|
|
||||||
#endregion COMPILER-RT preparation
|
#endregion COMPILER-RT preparation
|
||||||
|
|
||||||
#region LLDB preparation
|
|
||||||
# Empty lldb/docs/CMakeLists.txt because we cannot build it
|
|
||||||
echo "" > lldb/docs/CMakeLists.txt
|
|
||||||
#endregion LLDB preparation
|
|
||||||
#endregion prep
|
#endregion prep
|
||||||
|
|
||||||
#region build
|
#region build
|
||||||
|
@ -929,14 +914,20 @@ popd
|
||||||
#endregion compiler-rt options
|
#endregion compiler-rt options
|
||||||
|
|
||||||
#region docs options
|
#region docs options
|
||||||
|
|
||||||
|
# Add all *enabled* documentation targets (no doxygen but sphinx)
|
||||||
%global cmake_config_args %{cmake_config_args} \\\
|
%global cmake_config_args %{cmake_config_args} \\\
|
||||||
-DLLVM_BUILD_DOCS:BOOL=ON \\\
|
|
||||||
-DLLVM_ENABLE_SPHINX:BOOL=ON \\\
|
|
||||||
-DSPHINX_EXECUTABLE=%{_bindir}/sphinx-build-3 \\\
|
|
||||||
-DSPHINX_WARNINGS_AS_ERRORS=OFF \\\
|
|
||||||
-DLLVM_ENABLE_DOXYGEN:BOOL=OFF \\\
|
-DLLVM_ENABLE_DOXYGEN:BOOL=OFF \\\
|
||||||
-DLLVM_INCLUDE_DOCS:BOOL=ON \\\
|
-DLLVM_ENABLE_SPHINX:BOOL=ON \\\
|
||||||
-DLLVM_INSTALL_SPHINX_HTML_DIR=%{_pkgdocdir}/html
|
-DLLVM_BUILD_DOCS:BOOL=ON
|
||||||
|
|
||||||
|
# Configure sphinx:
|
||||||
|
# Build man-pages but no HTML docs using sphinx
|
||||||
|
%global cmake_config_args %{cmake_config_args} \\\
|
||||||
|
-DSPHINX_EXECUTABLE=%{_bindir}/sphinx-build-3 \\\
|
||||||
|
-DSPHINX_OUTPUT_HTML:BOOL=OFF \\\
|
||||||
|
-DSPHINX_OUTPUT_MAN:BOOL=ON \\\
|
||||||
|
-DSPHINX_WARNINGS_AS_ERRORS=OFF
|
||||||
#endregion docs options
|
#endregion docs options
|
||||||
|
|
||||||
#region lldb options
|
#region lldb options
|
||||||
|
@ -1193,6 +1184,35 @@ done
|
||||||
mkdir -p %{buildroot}%{pkg_datadir}/llvm/cmake
|
mkdir -p %{buildroot}%{pkg_datadir}/llvm/cmake
|
||||||
cp -Rv cmake/* %{buildroot}%{pkg_datadir}/llvm/cmake
|
cp -Rv cmake/* %{buildroot}%{pkg_datadir}/llvm/cmake
|
||||||
|
|
||||||
|
# Install a placeholder to redirect users of the formerly shipped
|
||||||
|
# HTML documentation to the upstream HTML documentation.
|
||||||
|
mkdir -pv %{buildroot}%{_pkgdocdir}/html
|
||||||
|
cat <<EOF > %{buildroot}%{_pkgdocdir}/html/index.html
|
||||||
|
<!doctype html>
|
||||||
|
<html lang=en>
|
||||||
|
<head>
|
||||||
|
<title>LLVM %{maj_ver}.%{min_ver} documentation</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>
|
||||||
|
LLVM %{maj_ver}.%{min_ver} Documentation
|
||||||
|
</h1>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="https://releases.llvm.org/%{maj_ver}.%{min_ver}.0/docs/index.html">
|
||||||
|
Click here for the upstream documentation of LLVM %{maj_ver}.%{min_ver}.
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="https://llvm.org/docs/">
|
||||||
|
Click here for the latest upstream documentation of LLVM.
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
EOF
|
||||||
|
|
||||||
#endregion LLVM installation
|
#endregion LLVM installation
|
||||||
|
|
||||||
#region CLANG installation
|
#region CLANG installation
|
||||||
|
@ -1270,9 +1290,7 @@ chmod a+x %{buildroot}%{install_datadir}/scan-view/{Reporter.py,startfile.py}
|
||||||
rm -vf %{buildroot}%{install_datadir}/clang/clang-format-bbedit.applescript
|
rm -vf %{buildroot}%{install_datadir}/clang/clang-format-bbedit.applescript
|
||||||
rm -vf %{buildroot}%{install_datadir}/clang/clang-format-sublime.py*
|
rm -vf %{buildroot}%{install_datadir}/clang/clang-format-sublime.py*
|
||||||
|
|
||||||
# TODO: Package html docs
|
# Remove unpackaged files
|
||||||
rm -Rvf %{buildroot}%{install_docdir}/LLVM/clang/html
|
|
||||||
rm -Rvf %{buildroot}%{install_docdir}/LLVM/clang-tools/html
|
|
||||||
rm -Rvf %{buildroot}%{install_datadir}/clang-doc/clang-doc-default-stylesheet.css
|
rm -Rvf %{buildroot}%{install_datadir}/clang-doc/clang-doc-default-stylesheet.css
|
||||||
rm -Rvf %{buildroot}%{install_datadir}/clang-doc/index.js
|
rm -Rvf %{buildroot}%{install_datadir}/clang-doc/index.js
|
||||||
|
|
||||||
|
@ -1361,9 +1379,6 @@ rm %{buildroot}%{install_bindir}/llvm-omp-kernel-replay
|
||||||
|
|
||||||
#region LLD installation
|
#region LLD installation
|
||||||
|
|
||||||
# Remove LLD's HTML documentation files
|
|
||||||
rm -Rvf %{buildroot}%{install_docdir}/LLVM/lld/html
|
|
||||||
|
|
||||||
%if %{without compat_build}
|
%if %{without compat_build}
|
||||||
# Required when using update-alternatives:
|
# Required when using update-alternatives:
|
||||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Alternatives/
|
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Alternatives/
|
||||||
|
@ -2086,7 +2101,7 @@ fi
|
||||||
|
|
||||||
%files -n %{pkg_name_llvm}-doc
|
%files -n %{pkg_name_llvm}-doc
|
||||||
%license llvm/LICENSE.TXT
|
%license llvm/LICENSE.TXT
|
||||||
%doc %{_pkgdocdir}/html
|
%doc %{_pkgdocdir}/html/index.html
|
||||||
|
|
||||||
%files -n %{pkg_name_llvm}-static
|
%files -n %{pkg_name_llvm}-static
|
||||||
%license llvm/LICENSE.TXT
|
%license llvm/LICENSE.TXT
|
||||||
|
@ -2463,6 +2478,8 @@ fi
|
||||||
%{install_libdir}/liblldb*.so
|
%{install_libdir}/liblldb*.so
|
||||||
%{install_libdir}/liblldb.so.*
|
%{install_libdir}/liblldb.so.*
|
||||||
%{install_libdir}/liblldbIntelFeatures.so.*
|
%{install_libdir}/liblldbIntelFeatures.so.*
|
||||||
|
%{_mandir}/man1/lldb-server%{exec_suffix}.1.gz
|
||||||
|
%{_mandir}/man1/lldb%{exec_suffix}.1.gz
|
||||||
%if %{with bundle_compat_lib}
|
%if %{with bundle_compat_lib}
|
||||||
%{_libdir}/liblldb.so.%{compat_maj_ver}*
|
%{_libdir}/liblldb.so.%{compat_maj_ver}*
|
||||||
%endif
|
%endif
|
||||||
|
@ -2478,6 +2495,10 @@ fi
|
||||||
|
|
||||||
#region changelog
|
#region changelog
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 19 2024 Konrad Kleine <kkleine@redhat.com> - 19.1.3-4
|
||||||
|
- Remove HTML documentation
|
||||||
|
- Add lldb man pages
|
||||||
|
|
||||||
* Mon Nov 18 2024 Josh Stone <jistone@redhat.com> - 19.1.3-3
|
* Mon Nov 18 2024 Josh Stone <jistone@redhat.com> - 19.1.3-3
|
||||||
- Fix profiling after a binutils NOTE change (rhbz#2322754)
|
- Fix profiling after a binutils NOTE change (rhbz#2322754)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue