From c473ab989f0c29dc13db66857b2d9b11c1e2e048 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 12 Jun 2017 14:07:20 +0000 Subject: [PATCH] Generate man pages --- ...nx-detection-with-out-of-tree-builds.patch | 29 +++++++++++++++++++ clang.spec | 16 +++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 0001-docs-Fix-Sphinx-detection-with-out-of-tree-builds.patch diff --git a/0001-docs-Fix-Sphinx-detection-with-out-of-tree-builds.patch b/0001-docs-Fix-Sphinx-detection-with-out-of-tree-builds.patch new file mode 100644 index 0000000..2361f8a --- /dev/null +++ b/0001-docs-Fix-Sphinx-detection-with-out-of-tree-builds.patch @@ -0,0 +1,29 @@ +From 9d17579a4fa653627bfafa77621c3a89867da97d Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Tue, 9 May 2017 01:42:33 +0000 +Subject: [PATCH] docs: Fix Sphinx detection with out-of-tree builds + +Adapt to changes made in r302499. + +git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302500 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + docs/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt +index 13b79fdf..d2956c1 100644 +--- a/docs/CMakeLists.txt ++++ b/docs/CMakeLists.txt +@@ -91,8 +91,8 @@ endif() + endif() + + if (LLVM_ENABLE_SPHINX) ++ include(AddSphinxTarget) + if (SPHINX_FOUND) +- include(AddSphinxTarget) + if (${SPHINX_OUTPUT_HTML}) + add_sphinx_target(html clang) + add_custom_command(TARGET docs-clang-html POST_BUILD +-- +1.8.3.1 + diff --git a/clang.spec b/clang.spec index d79146d..d30c73d 100644 --- a/clang.spec +++ b/clang.spec @@ -26,7 +26,7 @@ Name: clang Version: 4.0.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -40,6 +40,7 @@ Source100: clang-config.h Patch0: 0001-CMake-Fix-pthread-handling-for-out-of-tree-builds.patch # This patch is required when the test suite is using python-lit 0.5.0. Patch1: 0001-litsupport-Add-compatibility-cludge-so-it-still-work.patch +Patch2: 0001-docs-Fix-Sphinx-detection-with-out-of-tree-builds.patch BuildRequires: cmake BuildRequires: llvm-devel = %{version} @@ -59,6 +60,8 @@ BuildRequires: zlib-devel BuildRequires: tcl BuildRequires: python-virtualenv BuildRequires: libstdc++-static +BuildRequires: python3-sphinx + Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -124,6 +127,7 @@ A set of extra tools built using Clang's tooling API. %patch1 -p1 -b .lit-fix %setup -q -n cfe-%{version}.src +%patch2 -p1 -b .docs-fix mv ../clang-tools-extra-%{version}.src tools/extra @@ -143,6 +147,9 @@ cd _build -DENABLE_LINKER_BUILD_ID:BOOL=ON \ -DLLVM_ENABLE_EH=ON \ -DLLVM_ENABLE_RTTI=ON \ + -DLLVM_BUILD_DOCS=ON \ + -DLLVM_ENABLE_SPHINX=ON \ + -DSPHINX_WARNINGS_AS_ERRORS=OFF \ \ -DCLANG_BUILD_EXAMPLES:BOOL=OFF \ %if 0%{?__isa_bits} == 64 @@ -180,6 +187,9 @@ rm -vf %{buildroot}%{_datadir}/clang/clang-rename.py # remove diff reformatter rm -vf %{buildroot}%{_datadir}/clang/clang-format-diff.py* +# TODO: Package html docs +rm -Rvf %{buildroot}%{_pkgdocdir} + %check # requires lit.py from LLVM utilities #cd _build @@ -199,6 +209,7 @@ make %{?_smp_mflags} check || : %{_libdir}/clang/ %{clang_binaries} %{_bindir}/c-index-test +%{_mandir}/man1/clang.1.gz %files libs %{_libdir}/*.so.* @@ -226,6 +237,9 @@ make %{?_smp_mflags} check || : %{_bindir}/modularize %changelog +* Thu Jun 08 2017 Tom Stellard - 4.0.0-6 +- Generate man pages + * Thu Jun 08 2017 Tom Stellard - 4.0.0-5 - Ignore test-suite failures until all arches are fixed.