From afd169846dc70049ccf75c3e2c1169ac63b90a91 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 11 Sep 2023 14:00:31 +0800 Subject: [PATCH] sync ghc9.4: add sphinx7 patch --- ghc.spec | 17 ++++++++++++++--- sphinx7.patch | 26 ++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 sphinx7.patch diff --git a/ghc.spec b/ghc.spec index 206b08b..f60e9e3 100644 --- a/ghc.spec +++ b/ghc.spec @@ -1,5 +1,5 @@ # Start: prod settings -# all bcond_without for production builds: +# all *bcond_without* for production builds: # - performance build (disable for quick build) %bcond perfbuild 1 %bcond build_hadrian 1 @@ -9,7 +9,7 @@ %endif # End: prod settings -# without for production builds +# not for production builds %if %{without perfbuild} # disable profiling libraries (overriding macros.ghc-srpm) %undefine with_ghc_prof @@ -138,6 +138,10 @@ Patch24: buildpath-abi-stability.patch Patch26: no-missing-haddock-file-warning.patch Patch27: haddock-remove-googleapis-fonts.patch +Patch30: https://src.opensuse.org/rpm/ghc/raw/branch/factory/sphinx7.patch + +# https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms + # fedora ghc has been bootstrapped on # %%{ix86} x86_64 s390x ppc64le aarch64 # and retired arches: alpha sparcv9 armv5tel ppc ppc64 s390 armv7hl @@ -456,6 +460,11 @@ rm libffi-tarballs/libffi-*.tar.gz %patch -P26 -p1 -b .orig %patch -P27 -p1 -b .orig +#sphinx 7 +%if 0%{?fedora} >= 40 +%patch -P30 -p1 -b .orig +%endif + %if %{with haddock} && %{without hadrian} %global gen_contents_index gen_contents_index.orig if [ ! -f "libraries/%{gen_contents_index}" ]; then @@ -465,7 +474,6 @@ fi %endif %if %{without hadrian} -# https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms cat > mk/build.mk << EOF %if %{with perfbuild} %ifarch %{ghc_llvm_archs} @@ -552,6 +560,9 @@ cd hadrian %global hadrian_llvm +llvm %endif %define hadrian_docs %{!?with_haddock:--docs=no-haddocks} --docs=%[%{?with_manual} ? "no-sphinx-pdfs" : "no-sphinx"] +# aarch64 with 224 cpus: _build/stage0/bin/ghc: createProcess: pipe: resource exhausted (Too many open files) +# https://koji.fedoraproject.org/koji/taskinfo?taskID=105428124 +%global _smp_ncpus_max 64 # quickest does not build shared libs # try release instead of perf %{hadrian} %{?_smp_mflags} --flavour=%[%{?with_perfbuild} ? "perf" : "quick"]%{!?with_ghc_prof:+no_profiled_libs}%{?hadrian_llvm} %{hadrian_docs} binary-dist-dir diff --git a/sphinx7.patch b/sphinx7.patch new file mode 100644 index 0000000..0eb1dbd --- /dev/null +++ b/sphinx7.patch @@ -0,0 +1,26 @@ +From 52d701b31dc4427b7e321a04be3f5f13a5fc271e Mon Sep 17 00:00:00 2001 +From: "mimi.vx" +Date: Wed, 24 May 2023 12:42:15 +0000 +Subject: [PATCH] Fix for Sphinx 7 removed style key + +Fixes https://gitlab.haskell.org/ghc/ghc/-/issues/23444 +--- + docs/users_guide/rtd-theme/layout.html | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/docs/users_guide/rtd-theme/layout.html b/docs/users_guide/rtd-theme/layout.html +index 2a61142514a..7ffeff7befc 100644 +--- a/docs/users_guide/rtd-theme/layout.html ++++ b/docs/users_guide/rtd-theme/layout.html +@@ -64,7 +64,7 @@ + {%- endif %} + + {# CSS #} +- ++ + + {%- for css in css_files %} + {%- if css|attr("rel") %} +-- +GitLab +