[DHG_packages] 04/04: ghc: Come up with a haddock --mathjax fix

Joachim Breitner nomeata at moszumanska.debian.org
Sun Jan 17 19:37:41 UTC 2016


This is an automated email from the git hooks/post-receive script.

nomeata pushed a commit to branch experimental
in repository DHG_packages.

commit 3380e94b11dbba681edbf8ac5bfac5e41a550832
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Fri Jan 15 17:41:07 2016 +0100

    ghc: Come up with a haddock --mathjax fix
    
    Re: https://github.com/haskell/haddock/issues/475
---
 p/ghc/debian/patches/haddock-mathjax-fix | 123 +++++++++++++++++++++++++++++++
 p/ghc/debian/patches/series              |   1 +
 2 files changed, 124 insertions(+)

diff --git a/p/ghc/debian/patches/haddock-mathjax-fix b/p/ghc/debian/patches/haddock-mathjax-fix
new file mode 100644
index 0000000..6a955a5
--- /dev/null
+++ b/p/ghc/debian/patches/haddock-mathjax-fix
@@ -0,0 +1,123 @@
+Index: ghc/utils/haddock/haddock-api/src/Haddock/Backends/Xhtml.hs
+===================================================================
+--- ghc.orig/utils/haddock/haddock-api/src/Haddock/Backends/Xhtml.hs	2015-12-28 15:44:05.000000000 +0100
++++ ghc/utils/haddock/haddock-api/src/Haddock/Backends/Xhtml.hs	2016-01-16 08:47:16.347819737 +0100
+@@ -90,11 +90,11 @@
+ 
+   when (isNothing maybe_index_url) $
+     ppHtmlIndex odir doctitle maybe_package
+-      themes maybe_contents_url maybe_source_url maybe_wiki_url
++      themes maybe_mathjax_url maybe_contents_url maybe_source_url maybe_wiki_url
+       (map toInstalledIface visible_ifaces) debug
+ 
+   mapM_ (ppHtmlModule odir doctitle themes
+-           maybe_source_url maybe_wiki_url
++           maybe_mathjax_url maybe_source_url maybe_wiki_url
+            maybe_contents_url maybe_index_url unicode qual debug) visible_ifaces
+ 
+ 
+@@ -269,7 +269,7 @@
+   writeFile (joinPath [odir, contentsHtmlFile]) (renderToString debug html)
+ 
+   -- XXX: think of a better place for this?
+-  ppHtmlContentsFrame odir doctitle themes ifaces debug
++  ppHtmlContentsFrame odir doctitle themes mathjax_url ifaces debug
+ 
+ 
+ ppPrologue :: Qualification -> String -> Maybe (MDoc GHC.RdrName) -> Html
+@@ -342,12 +342,12 @@
+         << toHtml txt
+ 
+ 
+-ppHtmlContentsFrame :: FilePath -> String -> Themes
++ppHtmlContentsFrame :: FilePath -> String -> Themes -> Maybe String
+   -> [InstalledInterface] -> Bool -> IO ()
+-ppHtmlContentsFrame odir doctitle themes ifaces debug = do
++ppHtmlContentsFrame odir doctitle themes maybe_mathjax_url ifaces debug = do
+   let mods = flatModuleTree ifaces
+       html =
+-        headHtml doctitle Nothing themes Nothing +++
++        headHtml doctitle Nothing themes maybe_mathjax_url +++
+         miniBody << divModuleList <<
+           (sectionName << "Modules" +++
+            ulist << [ li ! [theclass "module"] << m | m <- mods ])
+@@ -365,13 +365,14 @@
+             -> Maybe String
+             -> Themes
+             -> Maybe String
++            -> Maybe String
+             -> SourceURLs
+             -> WikiURLs
+             -> [InstalledInterface]
+             -> Bool
+             -> IO ()
+ ppHtmlIndex odir doctitle _maybe_package themes
+-  maybe_contents_url maybe_source_url maybe_wiki_url ifaces debug = do
++  maybe_mathjax_url maybe_contents_url maybe_source_url maybe_wiki_url ifaces debug = do
+   let html = indexPage split_indices Nothing
+               (if split_indices then [] else index)
+ 
+@@ -387,7 +388,7 @@
+ 
+   where
+     indexPage showLetters ch items =
+-      headHtml (doctitle ++ " (" ++ indexName ch ++ ")") Nothing themes Nothing +++
++      headHtml (doctitle ++ " (" ++ indexName ch ++ ")") Nothing themes maybe_mathjax_url +++
+       bodyHtml doctitle Nothing
+         maybe_source_url maybe_wiki_url
+         maybe_contents_url Nothing << [
+@@ -487,11 +488,11 @@
+ 
+ ppHtmlModule
+         :: FilePath -> String -> Themes
+-        -> SourceURLs -> WikiURLs
++        -> Maybe String -> SourceURLs -> WikiURLs
+         -> Maybe String -> Maybe String -> Bool -> QualOption
+         -> Bool -> Interface -> IO ()
+ ppHtmlModule odir doctitle themes
+-  maybe_source_url maybe_wiki_url
++  maybe_mathjax_url maybe_source_url maybe_wiki_url
+   maybe_contents_url maybe_index_url unicode qual debug iface = do
+   let
+       mdl = ifaceMod iface
+@@ -499,7 +500,7 @@
+       mdl_str = moduleString mdl
+       real_qual = makeModuleQual qual aliases mdl
+       html =
+-        headHtml mdl_str (Just $ "mini_" ++ moduleHtmlFile mdl) themes Nothing +++
++        headHtml mdl_str (Just $ "mini_" ++ moduleHtmlFile mdl) themes maybe_mathjax_url +++
+         bodyHtml doctitle (Just iface)
+           maybe_source_url maybe_wiki_url
+           maybe_contents_url maybe_index_url << [
+@@ -509,14 +510,14 @@
+ 
+   createDirectoryIfMissing True odir
+   writeFile (joinPath [odir, moduleHtmlFile mdl]) (renderToString debug html)
+-  ppHtmlModuleMiniSynopsis odir doctitle themes iface unicode real_qual debug
++  ppHtmlModuleMiniSynopsis odir doctitle themes maybe_mathjax_url iface unicode real_qual debug
+ 
+ ppHtmlModuleMiniSynopsis :: FilePath -> String -> Themes
+-  -> Interface -> Bool -> Qualification -> Bool -> IO ()
+-ppHtmlModuleMiniSynopsis odir _doctitle themes iface unicode qual debug = do
++  -> Maybe String -> Interface -> Bool -> Qualification -> Bool -> IO ()
++ppHtmlModuleMiniSynopsis odir _doctitle themes maybe_mathjax_url iface unicode qual debug = do
+   let mdl = ifaceMod iface
+       html =
+-        headHtml (moduleString mdl) Nothing themes Nothing +++
++        headHtml (moduleString mdl) Nothing themes maybe_mathjax_url +++
+         miniBody <<
+           (divModuleHeader << sectionName << moduleString mdl +++
+            miniSynopsis mdl iface unicode qual)
+Index: ghc/utils/haddock/haddock-api/src/Haddock.hs
+===================================================================
+--- ghc.orig/utils/haddock/haddock-api/src/Haddock.hs	2015-12-28 15:44:05.000000000 +0100
++++ ghc/utils/haddock/haddock-api/src/Haddock.hs	2016-01-17 17:23:38.147511235 +0100
+@@ -292,7 +292,7 @@
+ 
+   when (Flag_GenIndex `elem` flags) $ do
+     ppHtmlIndex odir title pkgStr
+-                themes opt_contents_url sourceUrls' opt_wiki_urls
++                themes opt_mathjax opt_contents_url sourceUrls' opt_wiki_urls
+                 allVisibleIfaces pretty
+     copyHtmlBits odir libDir themes
+ 
diff --git a/p/ghc/debian/patches/series b/p/ghc/debian/patches/series
index 44464b1..b788f3d 100644
--- a/p/ghc/debian/patches/series
+++ b/p/ghc/debian/patches/series
@@ -5,3 +5,4 @@ hurd.diff
 buildpath-abi-stability.patch
 reproducible-tmp-names
 D1782.diff
+haddock-mathjax-fix

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/DHG_packages.git



More information about the Pkg-haskell-commits mailing list