Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cabal: Fix sphinx bug in User Manual creation #17345

Merged
merged 1 commit into from Jan 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion lang/cabal/Portfile
Expand Up @@ -4,7 +4,7 @@ PortSystem 1.0

name cabal
version 3.8.1.0
revision 1
revision 2
categories lang haskell devel
platforms darwin
license BSD
Expand Down Expand Up @@ -148,6 +148,13 @@ if {${name} eq ${subport}} {
delete ${haskell_cabal.cabal_root}/bin/ghc-pkg
}

# https://trac.macports.org/ticket/66680#comment:12
# please remove afer this this sphinx issue is fixed:
# https://github.com/haskell/cabal/issues/8681
# diff -NaurdwB ./cabal-orig/doc/conf.py ./cabal-new/doc/conf.py | sed -E -e 's/\.\/cabal-(orig|new)/\./' | sed -E -e 's|/opt/local|@PREFIX@|g' > ~/Downloads/patch-doc_conf_py.diff
patchfiles-append \
patch-doc_conf_py.diff

haskell_cabal.env \
"CABAL_CONFIG=${haskell_cabal.cabal_root}/config" \
"GHC=${prefix}/bin/ghc"
Expand Down Expand Up @@ -183,6 +190,7 @@ if {${name} eq ${subport}} {
}

subport cabal-prebuilt {
revision 1
supported_archs arm64 x86_64

use_configure no
Expand Down
19 changes: 19 additions & 0 deletions lang/cabal/files/patch-doc_conf_py.diff
@@ -0,0 +1,19 @@
--- ./doc/conf.py 2023-01-15 15:54:29
+++ ./doc/conf.py 2023-01-15 15:57:09
@@ -28,12 +28,12 @@

# extlinks -- see http://www.sphinx-doc.org/en/stable/ext/extlinks.html
extlinks = {
- 'issue': ('https://github.com/haskell/cabal/issues/%s', '#'),
+ 'issue': ('https://github.com/haskell/cabal/issues/%s', '#%s'),

- 'ghc-wiki': ('https://gitlab.haskell.org/ghc/ghc/-/wikis/%s', ''),
- 'ghc-ticket': ('https://gitlab.haskell.org/ghc/ghc/-/issues/%s', 'GHC #'),
+ 'ghc-wiki': ('https://gitlab.haskell.org/ghc/ghc/-/wikis/%s', None),
+ 'ghc-ticket': ('https://gitlab.haskell.org/ghc/ghc/-/issues/%s', 'GHC #%s'),

- 'hackage-pkg': ('http://hackage.haskell.org/package/%s', ''),
+ 'hackage-pkg': ('http://hackage.haskell.org/package/%s', None),
}

# General information about the project.