[Git][haskell-team/DHG_packages][master] xmonad: patch from Adam Sjøgren to build man page with newer pandoc API

Clint Adams gitlab at salsa.debian.org
Tue Jul 14 13:20:26 BST 2020



Clint Adams pushed to branch master at Debian Haskell Group / DHG_packages


Commits:
0d800436 by Clint Adams at 2020-07-14T08:19:24-04:00
xmonad: patch from Adam Sjøgren to build man page with newer pandoc API

- - - - -


3 changed files:

- p/xmonad/debian/changelog
- + p/xmonad/debian/patches/newer-pandoc
- p/xmonad/debian/patches/series


Changes:

=====================================
p/xmonad/debian/changelog
=====================================
@@ -1,3 +1,9 @@
+xmonad (0.15-3) unstable; urgency=medium
+
+  * Patch from Adam Sjøgren to build man page with newer pandoc API..
+
+ -- Clint Adams <clint at debian.org>  Tue, 14 Jul 2020 08:07:18 -0400
+
 xmonad (0.15-2) unstable; urgency=medium
 
   [ Ilias Tsitsimpis ]


=====================================
p/xmonad/debian/patches/newer-pandoc
=====================================
@@ -0,0 +1,55 @@
+Clint writes:
+
+> On Sun, Jul 05, 2020 at 05:58:57PM +0200, Adam Sjøgren wrote:
+
+>> Maybe I should try to get rid of the dependency on Text.Pandoc in
+>> xmonad, it is only used to generate the man-page from a markdown file
+>> with some keybindings inserted.
+
+> Or now that we have a newer version of pandoc, you could port
+> util/GenerateManpage.hs to build with the changed API.
+
+Ok, I will give it a shot.
+
+I have sent a patch upstream:
+
+ · https://mail.haskell.org/pipermail/xmonad/2020-July/015392.html
+
+And here is a patch for the current xmonad package in unstable:
+
+Description: update GenerateManPage to new Pandoc API
+
+---
+Last-Update: 2020-07-14
+
+--- a/util/GenerateManpage.hs
++++ b/util/GenerateManpage.hs
+@@ -9,6 +9,7 @@
+ -- Public License version 2 or later.
+ 
+ import Control.Monad.IO.Class (liftIO)
++import Control.Error.Util (hush)
+ import Data.Char
+ import Data.List
+ import qualified Data.Text as T
+@@ -30,14 +31,16 @@
+             . lines
+             $ markdownSource
+ 
+-        manTemplate <- getDefaultTemplate "man"
+-        manBody <- writeMan def { writerTemplate = Just manTemplate } parsed
++        manTemplate <- getDefaultTemplate (T.pack "man")
++        compiledManTemplate <- compileTemplate "" manTemplate
++        manBody <- writeMan def { writerTemplate = hush compiledManTemplate } parsed
+         liftIO $ TIO.writeFile "./man/xmonad.1" $ manBody
+         liftIO $ putStrLn "Documentation created: man/xmonad.1"
+ 
+-        htmltemplate <- getDefaultTemplate "html"
++        htmltemplate <- getDefaultTemplate (T.pack "html")
++        compiledHtmlTemplate <- compileTemplate "" htmltemplate
+         htmlBody <- writeHtml5String def
+-                                     { writerTemplate = Just htmltemplate
++                                     { writerTemplate = hush compiledHtmlTemplate
+                                      , writerTableOfContents = True }
+                                      parsed
+         liftIO $ TIO.writeFile "./man/xmonad.1.html" htmlBody


=====================================
p/xmonad/debian/patches/series
=====================================
@@ -1 +1,2 @@
 use_x-terminal-emulator.patch
+newer-pandoc



View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/commit/0d800436a51a0bb09a03afbcf5c05bbc7bd9751f

-- 
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/commit/0d800436a51a0bb09a03afbcf5c05bbc7bd9751f
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20200714/ecfbaf00/attachment-0001.html>


More information about the Pkg-haskell-commits mailing list