Commit 5d8ca3b9 authored by Clint Adams's avatar Clint Adams
Browse files

xmonad/xmonad-contrib patches because of X11 change

parent d8675791
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
--- a/xmonad-contrib.cabal
+++ b/xmonad-contrib.cabal
@@ -63,7 +63,7 @@
                    random,
                    mtl >= 1 && < 3,
                    unix,
-                   X11>=1.6.1 && < 1.9,
+                   X11>=1.6.1 && < 1.10,
                    xmonad>=0.13   && < 0.14,
                    utf8-string
 
+2 −0
Original line number Diff line number Diff line
use-x-www-browser.patch
newer-x11
+19 −0
Original line number Diff line number Diff line
Description: Use x-www-browser instead of firefox
Author: Joachim Breitner <nomeata@debian.org>
Origin: vendor
Bug-Debian: http://bugs.debian.org/553330
Forwarded: not-needed
Last-Update: 2012-07-07
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/XMonad/Prompt/Shell.hs
+++ b/XMonad/Prompt/Shell.hs
@@ -155,7 +155,7 @@
    or pass it to a shell; so in that case, define $BROWSER as something like \"xterm -e elinks\"
    or as the name of a shell script doing much the same thing. -}
 getBrowser :: IO String
-getBrowser = env "BROWSER" "firefox"
+getBrowser = env "BROWSER" "x-www-browser"
 
 -- | Like 'getBrowser', but should be of a text editor. This gets the $EDITOR variable, defaulting to \"emacs\".
 getEditor :: IO String
+36 −0
Original line number Diff line number Diff line
Index: xmonad-0.9.2/XMonad/Core.hs
===================================================================
--- xmonad-0.9.2.orig/XMonad/Core.hs	2011-04-05 21:39:02.000000000 +0530
+++ xmonad-0.9.2/XMonad/Core.hs	2011-04-05 21:39:13.000000000 +0530
@@ -1,7 +1,7 @@
 {-# LANGUAGE ExistentialQuantification, FlexibleInstances, GeneralizedNewtypeDeriving,
              MultiParamTypeClasses, TypeSynonymInstances, CPP, DeriveDataTypeable #-}
 -- required for deriving Typeable
-{- # OPTIONS_GHC -fglasgow-exts #-}
+{-# OPTIONS_GHC -fglasgow-exts #-}

 -----------------------------------------------------------------------------
 -- |
Index: xmonad-0.9.2/XMonad/Layout.hs
===================================================================
--- xmonad-0.9.2.orig/XMonad/Layout.hs	2011-04-05 21:39:03.000000000 +0530
+++ xmonad-0.9.2/XMonad/Layout.hs	2011-04-05 21:39:13.000000000 +0530
@@ -1,4 +1,4 @@
-{- # OPTIONS_GHC -fglasgow-exts    #-} -- For deriving Data/Typeable
+{-# OPTIONS_GHC -fglasgow-exts    #-} -- For deriving Data/Typeable
 {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, PatternGuards, TypeSynonymInstances, DeriveDataTypeable #-}

 -- --------------------------------------------------------------------------
Index: xmonad-0.9.2/XMonad/Operations.hs
===================================================================
--- xmonad-0.9.2.orig/XMonad/Operations.hs	2011-04-05 21:39:02.000000000 +0530
+++ xmonad-0.9.2/XMonad/Operations.hs	2011-04-05 21:41:11.000000000 +0530
@@ -1,7 +1,6 @@
-{-# OPTIONS_GHC -fno-warn-orphans #-}
+{-# OPTIONS_GHC -fglasgow-exts -fno-warn-orphans #-}
 {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, PatternGuards, TypeSynonymInstances, DeriveDataTypeable #-}

-{- # OPTIONS_GHC -fglasgow-exts    #-} -- For deriving Data/Typeable
 -- --------------------------------------------------------------------------
 -- |
 -- Module      :  XMonad.Operations
+95 −0
Original line number Diff line number Diff line
--- a/util/GenerateManpage.hs
+++ b/util/GenerateManpage.hs
@@ -27,6 +27,9 @@
 import Text.Regex.Posix
 import Data.Char
 import Data.List
+import Control.Monad.IO.Class (liftIO)
+import qualified Data.Text as T
+import qualified Data.Text.IO as TIO
 
 import Distribution.PackageDescription.Parse
 import Distribution.Verbosity
@@ -35,7 +38,7 @@
 import Text.PrettyPrint.HughesPJ
 import Distribution.Text
 
-import Text.Pandoc -- works with 1.15.x
+import Text.Pandoc -- works with 2.1
 
 releaseDate = "31 December 2012"
 
@@ -68,31 +71,34 @@
     keybindings <- (intercalate "\n\n" . map markdownDefn . allBindings)
                     `liftM` readFile "./src/XMonad/Config.hs"
 
-    let manHeader = unwords [".TH xmonad 1","\""++releaseDate++"\"",releaseName,"\"xmonad manual\""]
-
-    Right parsed <- readMarkdown def
-        . unlines
-        . replace "___KEYBINDINGS___" keybindings
-        . lines
-        <$> readFile "./man/xmonad.1.markdown"
-
-    Right template <- getDefaultTemplate Nothing "man"
-    writeFile "./man/xmonad.1"
-        . (manHeader ++)
-        . writeMan def{ writerTemplate = Just template }
-        $ parsed
-    putStrLn "Documentation created: man/xmonad.1"
-
-    Right template <- getDefaultTemplate Nothing "html"
-    writeFile "./man/xmonad.1.html"
-        . writeHtmlString def
-            { writerVariables =
-                        [("include-before"
-                            ,"<h1>"++releaseName++"</h1>"++
-                             "<p>Section: xmonad manual (1)<br/>"++
-                             "Updated: "++releaseDate++"</p>"++
-                             "<hr/>")]
-            , writerTemplate = Just template
-            , writerTableOfContents = True }
-        $ parsed
-    putStrLn "Documentation created: man/xmonad.1.html"
+    let manHeader = T.pack .
+                    unwords
+                    $ [".TH xmonad 1","\""++releaseDate++"\"",releaseName,"\"xmonad manual\""]
+
+    markdownSource <- readFile "./man/xmonad.1.markdown"
+
+    runIOorExplode $ do
+        parsed <- readMarkdown def
+            . T.pack
+            . unlines
+            . replace "___KEYBINDINGS___" keybindings
+            . lines
+            $ markdownSource
+
+        manTemplate <- getDefaultTemplate "man"
+        manBody <- writeMan def { writerTemplate = Just manTemplate } parsed
+        liftIO $ TIO.writeFile "./man/xmonad.1" $ T.append manHeader manBody
+        liftIO $ putStrLn "Documentation created: man/xmonad.1"
+
+        htmltemplate <- getDefaultTemplate "html"
+        htmlBody <- writeHtml5String def
+                { writerVariables =
+                            [("include-before"
+                                ,"<h1>"++releaseName++"</h1>"++
+                                 "<p>Section: xmonad manual (1)<br/>"++
+                                 "Updated: "++releaseDate++"</p>"++
+                                 "<hr/>")]
+                , writerTemplate = Just htmltemplate
+                , writerTableOfContents = True } parsed
+        liftIO $ TIO.writeFile "./man/xmonad.1.html" htmlBody
+        liftIO $ putStrLn "Documentation created: man/xmonad.1.html"
--- a/xmonad.cabal
+++ b/xmonad.cabal
@@ -113,7 +113,7 @@
     if flag(generatemanpage)
         build-depends: base,
                        Cabal,
-                       pandoc,
+                       pandoc >= 2,
                        pretty,
                        regex-posix
     else
Loading