From b5cf727954fa43565d7e3292766175c49f4b8f7f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 10 May 2023 16:41:33 +0800 Subject: [PATCH] upstream commit to fix manual external links for sphinx-6 https://gitlab.haskell.org/ghc/ghc/-/issues/23286 --- ...51060881df81258ba3b3bdf447294618a4de.patch | 44 +++++++++++++++++++ ghc.spec | 4 ++ 2 files changed, 48 insertions(+) create mode 100644 00dc51060881df81258ba3b3bdf447294618a4de.patch diff --git a/00dc51060881df81258ba3b3bdf447294618a4de.patch b/00dc51060881df81258ba3b3bdf447294618a4de.patch new file mode 100644 index 0000000..91a37b3 --- /dev/null +++ b/00dc51060881df81258ba3b3bdf447294618a4de.patch @@ -0,0 +1,44 @@ +From 00dc51060881df81258ba3b3bdf447294618a4de Mon Sep 17 00:00:00 2001 +From: Matthew Pickering +Date: Tue, 3 Jan 2023 15:56:37 +0000 +Subject: [PATCH] sphinx: Use modern syntax for extlinks + +This fixes the following build error: + +``` + Command line: /opt/homebrew/opt/sphinx-doc/bin/sphinx-build -b man -d /private/tmp/extra-dir-55768274273/.doctrees-man -n -w /private/tmp/extra-dir-55768274273/.log docs/users_guide /private/tmp/extra-dir-55768274273 + ===> Command failed with error code: 2 + + Exception occurred: + File "/opt/homebrew/Cellar/sphinx-doc/6.0.0/libexec/lib/python3.11/site-packages/sphinx/ext/extlinks.py", line 101, in role + title = caption % part + ~~~~~~~~^~~~~~ + TypeError: not all arguments converted during string formatting +``` + +I tested on Sphinx-5.1.1 and Sphinx-6.0.0 + +Thanks for sterni for providing instructions about how to test using +sphinx-6.0.0. + +Fixes #22690 +--- + docs/users_guide/ghc_config.py.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/docs/users_guide/ghc_config.py.in b/docs/users_guide/ghc_config.py.in +index dcc7fbaef62..c9888a13adc 100644 +--- a/docs/users_guide/ghc_config.py.in ++++ b/docs/users_guide/ghc_config.py.in +@@ -1,6 +1,6 @@ + extlinks = { +- 'ghc-ticket': ('https://gitlab.haskell.org/ghc/ghc/issues/%s', '#'), +- 'ghc-wiki': ('https://gitlab.haskell.org/ghc/ghc/wikis/%s', '#'), ++ 'ghc-ticket': ('https://gitlab.haskell.org/ghc/ghc/issues/%s', '%s'), ++ 'ghc-wiki': ('https://gitlab.haskell.org/ghc/ghc/wikis/%s', '#%s'), + } + + libs_base_uri = '../libraries' +-- +GitLab + diff --git a/ghc.spec b/ghc.spec index 305c44d..85c3d74 100644 --- a/ghc.spec +++ b/ghc.spec @@ -114,6 +114,9 @@ ExcludeArch: armv7hl Patch1: ghc-gen_contents_index-haddock-path.patch Patch2: ghc-Cabal-install-PATH-warning.patch Patch3: ghc-gen_contents_index-nodocs.patch +# https://gitlab.haskell.org/ghc/ghc/-/issues/23286 +Patch9: https://gitlab.haskell.org/ghc/ghc/-/commit/00dc51060881df81258ba3b3bdf447294618a4de.patch + # https://phabricator.haskell.org/rGHC4eebc8016f68719e1ccdf460754a97d1f4d6ef05 # https://gitlab.haskell.org/ghc/ghc/-/issues/19684 # DerivedConstants.h not produced atomically @@ -441,6 +444,7 @@ Installing this package causes %{name}-*-prof packages corresponding to %patch -P3 -p1 -b .orig %patch -P2 -p1 -b .orig +%patch -P9 -p1 -b .orig %patch -P10 -p1 -b .orig %patch -P11 -p1 -b .orig11